diff --git a/Code/Framework/AzCore/AzCore/Memory/Memory.h b/Code/Framework/AzCore/AzCore/Memory/Memory.h index af175c7a64..d2c570d48d 100644 --- a/Code/Framework/AzCore/AzCore/Memory/Memory.h +++ b/Code/Framework/AzCore/AzCore/Memory/Memory.h @@ -844,7 +844,7 @@ namespace AZ return AZ::AllocatorInstance::Get().GetUnAllocatedMemory(isPrint); } - virtual IAllocatorAllocate* GetSubAllocator() override + IAllocatorAllocate* GetSubAllocator() override { return AZ::AllocatorInstance::Get().GetSubAllocator(); } diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.h b/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.h index d6d67c2aa2..ac811ae478 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.h +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetProcessorMessages.h @@ -866,7 +866,7 @@ namespace AzFramework FileIsReadOnlyResponse() = default; FileIsReadOnlyResponse(bool isReadOnly); - unsigned int GetMessageType() const; + unsigned int GetMessageType() const override; bool m_isReadOnly; }; @@ -945,7 +945,7 @@ namespace AzFramework FileModTimeRequest() = default; FileModTimeRequest(const AZ::OSString& filePath); - unsigned int GetMessageType() const; + unsigned int GetMessageType() const override; AZ::OSString m_filePath; }; diff --git a/Code/Framework/AzFramework/AzFramework/TargetManagement/TargetManagementAPI.h b/Code/Framework/AzFramework/AzFramework/TargetManagement/TargetManagementAPI.h index 6582e145cb..bbfb4c88c1 100644 --- a/Code/Framework/AzFramework/AzFramework/TargetManagement/TargetManagementAPI.h +++ b/Code/Framework/AzFramework/AzFramework/TargetManagement/TargetManagementAPI.h @@ -195,7 +195,7 @@ namespace AzFramework TmMsgCallback(const MsgCB& cb = NULL) : m_cb(cb) {} - virtual void OnReceivedMsg(TmMsgPtr msg) + void OnReceivedMsg(TmMsgPtr msg) override { if (m_cb) { diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h index 0243395d1e..9c929d63e8 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h @@ -54,7 +54,7 @@ namespace AzNetworking //! Handler callback for timed out items. //! @param item containing registered timeout details //! @return ETimeoutResult for whether to re-register or discard the timeout params - virtual TimeoutResult HandleTimeout(TimeoutQueue::TimeoutItem& item) override; + TimeoutResult HandleTimeout(TimeoutQueue::TimeoutItem& item) override; TimeoutQueue m_timeoutQueue; SequenceGenerator m_sequenceGenerator; diff --git a/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp b/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp index 9dc7ae0ccf..bc9ecab2cb 100644 --- a/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp +++ b/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp @@ -33,7 +33,7 @@ namespace UnitTest ; } - PacketDispatchResult OnPacketReceived([[maybe_unused]] IConnection* connection, const IPacketHeader& packetHeader, [[maybe_unused]] ISerializer& serializer) + PacketDispatchResult OnPacketReceived([[maybe_unused]] IConnection* connection, const IPacketHeader& packetHeader, [[maybe_unused]] ISerializer& serializer) override { EXPECT_TRUE((packetHeader.GetPacketType() == static_cast(CorePackets::PacketType::InitiateConnectionPacket)) || (packetHeader.GetPacketType() == static_cast(CorePackets::PacketType::HeartbeatPacket))); diff --git a/Code/Framework/AzNetworking/Tests/UdpTransport/UdpTransportTests.cpp b/Code/Framework/AzNetworking/Tests/UdpTransport/UdpTransportTests.cpp index 02c7085023..c4de3fc6dd 100644 --- a/Code/Framework/AzNetworking/Tests/UdpTransport/UdpTransportTests.cpp +++ b/Code/Framework/AzNetworking/Tests/UdpTransport/UdpTransportTests.cpp @@ -36,7 +36,7 @@ namespace UnitTest ; } - PacketDispatchResult OnPacketReceived([[maybe_unused]] IConnection* connection, const IPacketHeader& packetHeader, [[maybe_unused]] ISerializer& serializer) + PacketDispatchResult OnPacketReceived([[maybe_unused]] IConnection* connection, const IPacketHeader& packetHeader, [[maybe_unused]] ISerializer& serializer) override { EXPECT_TRUE((packetHeader.GetPacketType() == static_cast(CorePackets::PacketType::InitiateConnectionPacket)) || (packetHeader.GetPacketType() == static_cast(CorePackets::PacketType::HeartbeatPacket))); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/LogPanel_Panel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/LogPanel_Panel.h index 18a03cafe9..fdf7866284 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/LogPanel_Panel.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/LogPanel_Panel.h @@ -300,13 +300,13 @@ namespace AzToolsFramework bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override; void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; - QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; + QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override; - void setEditorData(QWidget* editor, const QModelIndex& index) const; - void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; + void setEditorData(QWidget* editor, const QModelIndex& index) const override; + void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override; QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override; - void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const; + void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override; QWidget* pOwnerWidget; QLabel* m_painterLabel; diff --git a/Code/Framework/GridMate/GridMate/Carrier/DefaultHandshake.h b/Code/Framework/GridMate/GridMate/Carrier/DefaultHandshake.h index 9225cca8d7..4e1d6f59bb 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/DefaultHandshake.h +++ b/Code/Framework/GridMate/GridMate/Carrier/DefaultHandshake.h @@ -25,34 +25,34 @@ namespace GridMate DefaultHandshake(unsigned int timeOut, VersionType version); virtual ~DefaultHandshake(); /// Called from the system to write initial handshake data. - virtual void OnInitiate(ConnectionID id, WriteBuffer& wb); + void OnInitiate(ConnectionID id, WriteBuffer& wb) override; /** * Called when a system receives a handshake initiation from another system. * You can write a reply in the WriteBuffer. * return true if you accept this connection and false if you reject it. */ - virtual HandshakeErrorCode OnReceiveRequest(ConnectionID id, ReadBuffer& rb, WriteBuffer& wb); + HandshakeErrorCode OnReceiveRequest(ConnectionID id, ReadBuffer& rb, WriteBuffer& wb) override; /** * If we already have a valid connection and we receive another connection request, the system will * call this function to verify the state of the connection. */ - virtual bool OnConfirmRequest(ConnectionID id, ReadBuffer& rb); + bool OnConfirmRequest(ConnectionID id, ReadBuffer& rb) override; /** * Called when we receive Ack from the other system on our initial data \ref OnInitiate. * return true to accept the ack or false to reject the handshake. */ - virtual bool OnReceiveAck(ConnectionID id, ReadBuffer& rb); + bool OnReceiveAck(ConnectionID id, ReadBuffer& rb) override; /** * Called when we receive Ack from the other system while we were connected. This callback is called * so we can just confirm that our connection is valid! */ - virtual bool OnConfirmAck(ConnectionID id, ReadBuffer& rb); + bool OnConfirmAck(ConnectionID id, ReadBuffer& rb) override; /// Return true if you want to reject early reject a connection. - virtual bool OnNewConnection(const AZStd::string& address); + bool OnNewConnection(const AZStd::string& address) override; /// Called when we close a connection. - virtual void OnDisconnect(ConnectionID id); + void OnDisconnect(ConnectionID id) override; /// Return timeout in milliseconds of the handshake procedure. - virtual unsigned int GetHandshakeTimeOutMS() const { return m_handshakeTimeOutMS; } + unsigned int GetHandshakeTimeOutMS() const override { return m_handshakeTimeOutMS; } private: unsigned int m_handshakeTimeOutMS; VersionType m_version; diff --git a/Code/Framework/GridMate/GridMate/Carrier/DefaultSimulator.h b/Code/Framework/GridMate/GridMate/Carrier/DefaultSimulator.h index 07681a5837..e975223442 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/DefaultSimulator.h +++ b/Code/Framework/GridMate/GridMate/Carrier/DefaultSimulator.h @@ -23,21 +23,21 @@ namespace GridMate friend class CarrierThread; /// Called from Carrier, so simulator can use the low level driver directly. - virtual void BindDriver(Driver* driver); + void BindDriver(Driver* driver) override; /// Called from Carrier when driver can no longer be used(ie. will be destroyed) - virtual void UnbindDriver(); + void UnbindDriver() override; /// Called when Carrier has established a new connection. - virtual void OnConnect(const AZStd::intrusive_ptr& address); + void OnConnect(const AZStd::intrusive_ptr& address) override; /// Called when Carrier has lost a connection. - virtual void OnDisconnect(const AZStd::intrusive_ptr& address); + void OnDisconnect(const AZStd::intrusive_ptr& address) override; /// Called when Carrier has send a package. - virtual bool OnSend(const AZStd::intrusive_ptr& to, const void* data, unsigned int dataSize); + bool OnSend(const AZStd::intrusive_ptr& to, const void* data, unsigned int dataSize) override; /// Called when Carrier receives package receive. - virtual bool OnReceive(const AZStd::intrusive_ptr& from, const void* data, unsigned int dataSize); + bool OnReceive(const AZStd::intrusive_ptr& from, const void* data, unsigned int dataSize) override; /// Called from Carrier when no more data has arrived and you can supply you data (with latency, out of order, etc. - virtual unsigned int ReceiveDataFrom(AZStd::intrusive_ptr& from, char* data, unsigned int maxDataSize); + unsigned int ReceiveDataFrom(AZStd::intrusive_ptr& from, char* data, unsigned int maxDataSize) override; - virtual void Update(); + void Update() override; public: GM_CLASS_ALLOCATOR(DefaultSimulator); diff --git a/Code/Framework/GridMate/GridMate/Carrier/SocketDriver.h b/Code/Framework/GridMate/GridMate/Carrier/SocketDriver.h index 835414b374..eb4130a477 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/SocketDriver.h +++ b/Code/Framework/GridMate/GridMate/Carrier/SocketDriver.h @@ -88,11 +88,11 @@ namespace GridMate bool operator==(const SocketDriverAddress& rhs) const; bool operator!=(const SocketDriverAddress& rhs) const; - virtual AZStd::string ToString() const; - virtual AZStd::string ToAddress() const; - virtual AZStd::string GetIP() const; - virtual unsigned int GetPort() const; - virtual const void* GetTargetAddress(unsigned int& addressSize) const; + AZStd::string ToString() const override; + AZStd::string ToAddress() const override; + AZStd::string GetIP() const override; + unsigned int GetPort() const override; + const void* GetTargetAddress(unsigned int& addressSize) const override; union { @@ -117,11 +117,11 @@ namespace GridMate * Platform specific functionality. */ /// Return maximum number of active connections at the same time. - virtual unsigned int GetMaxNumConnections() const { return 32; } + unsigned int GetMaxNumConnections() const override { return 32; } /// Return maximum data size we can send/receive at once in bytes, supported by the platform. - virtual unsigned int GetMaxSendSize() const; + unsigned int GetMaxSendSize() const override; /// Return packet overhead size in bytes. - virtual unsigned int GetPacketOverheadSize() const; + unsigned int GetPacketOverheadSize() const override; /** * User should implement create and bind a UDP socket. This socket will be used for all communications. @@ -132,39 +132,39 @@ namespace GridMate * \param receiveBufferSize socket receive buffer size in bytes, use 0 for default values. * \param sendBufferSize socket send buffer size, use 0 for default values. */ - virtual ResultCode Initialize(int familyType = BSD_AF_INET, const char* address = nullptr, unsigned int port = 0, bool isBroadcast = false, unsigned int receiveBufferSize = 0, unsigned int sendBufferSize = 0); + ResultCode Initialize(int familyType = BSD_AF_INET, const char* address = nullptr, unsigned int port = 0, bool isBroadcast = false, unsigned int receiveBufferSize = 0, unsigned int sendBufferSize = 0) override; /// Returns communication port (must be called after Initialize, otherwise it will return 0) - virtual unsigned int GetPort() const; + unsigned int GetPort() const override; /// Send data to a user defined address - virtual ResultCode Send(const AZStd::intrusive_ptr& to, const char* data, unsigned int dataSize); + ResultCode Send(const AZStd::intrusive_ptr& to, const char* data, unsigned int dataSize) override; /** * Receives a datagram and stores the source address. maxDataSize must be >= than GetMaxSendSize(). Returns the num of of received bytes. * \note If a datagram from a new connection is received, NewConnectionCB will be called. If it rejects the connection the returned from pointer * will be NULL while the actual data will be returned. */ - virtual unsigned int Receive(char* data, unsigned int maxDataSize, AZStd::intrusive_ptr& from, ResultCode* resultCode = 0); + unsigned int Receive(char* data, unsigned int maxDataSize, AZStd::intrusive_ptr& from, ResultCode* resultCode = 0) override; /** * Wait for data to be to the ready for receive. Time out is the maximum time to wait * before this function returns. If left to default value it will be in blocking mode (wait until data is ready to be received). * \returns true if there is data to be received (always true if timeOut == 0), otherwise false. */ - virtual bool WaitForData(AZStd::chrono::microseconds timeOut = AZStd::chrono::microseconds(0)); + bool WaitForData(AZStd::chrono::microseconds timeOut = AZStd::chrono::microseconds(0)) override; /** * When you enter wait for data mode, for many reasons you might want to stop wait for data. * If you implement this function you need to make sure it's a thread safe function. */ - virtual void StopWaitForData(); + void StopWaitForData() override; /// Return true if WaitForData was interrupted before the timeOut expired, otherwise false. - virtual bool WasStopeedWaitingForData() { return m_isStoppedWaitForData; } + bool WasStopeedWaitingForData() override { return m_isStoppedWaitForData; } /// @{ Address conversion functionality. They MUST implemented thread safe. Generally this is not a problem since they just part local data. /// Create address from ip and port. If ip == NULL we will assign a broadcast address. - virtual AZStd::string IPPortToAddress(const char* ip, unsigned int port) const { return IPPortToAddressString(ip, port); } - virtual bool AddressToIPPort(const AZStd::string& address, AZStd::string& ip, unsigned int& port) const { return AddressStringToIPPort(address, ip, port); } + AZStd::string IPPortToAddress(const char* ip, unsigned int port) const override { return IPPortToAddressString(ip, port); } + bool AddressToIPPort(const AZStd::string& address, AZStd::string& ip, unsigned int& port) const override { return AddressStringToIPPort(address, ip, port); } /// Create address for the socket driver from IP and port static AZStd::string IPPortToAddressString(const char* ip, unsigned int port); /// Decompose an address to IP and port @@ -174,7 +174,7 @@ namespace GridMate static BSDSocketFamilyType AddressFamilyType(const char* ip) { return AddressFamilyType(AZStd::string(ip)); } /// @} - virtual AZStd::intrusive_ptr CreateDriverAddress(const AZStd::string& address) = 0; + AZStd::intrusive_ptr CreateDriverAddress(const AZStd::string& address) override = 0; /// Additional CreateDriverAddress function should be implemented. virtual AZStd::intrusive_ptr CreateDriverAddress(const sockaddr* sockAddr) = 0; @@ -352,10 +352,10 @@ namespace GridMate * \note Driver address allocates internal resources, use it only when you intend to communicate. Otherwise operate with * the string address. */ - virtual AZStd::intrusive_ptr CreateDriverAddress(const AZStd::string& address); - virtual AZStd::intrusive_ptr CreateDriverAddress(const sockaddr* addr); + AZStd::intrusive_ptr CreateDriverAddress(const AZStd::string& address) override; + AZStd::intrusive_ptr CreateDriverAddress(const sockaddr* addr) override; /// Called only from the DriverAddress when the use count becomes 0 - virtual void DestroyDriverAddress(DriverAddress* address); + void DestroyDriverAddress(DriverAddress* address) override; typedef AZStd::unordered_set AddressSetType; AddressSetType m_addressMap; diff --git a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h b/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h index 59f178976f..7af318287a 100644 --- a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h +++ b/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h @@ -33,42 +33,42 @@ namespace GridMate ////////////////////////////////////////////////////////////////////////// // Driller - virtual const char* GroupName() const { return "GridMate"; } - virtual const char* GetName() const { return "SessionDriller"; } - virtual const char* GetDescription() const { return "Drills GridSession, Search, etc."; } - virtual void Start(const Param* params = NULL, int numParams = 0); - virtual void Stop(); + const char* GroupName() const override { return "GridMate"; } + const char* GetName() const override { return "SessionDriller"; } + const char* GetDescription() const override { return "Drills GridSession, Search, etc."; } + void Start(const Param* params = NULL, int numParams = 0) override; + void Stop() override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Session Event Bus /// Callback that is called when the Session service is ready to process sessions. - virtual void OnSessionServiceReady(); + void OnSessionServiceReady() override; //virtual OnCommucationChanged() = 0 Callback that notifies the title when a member's communication settings change. /// Callback that notifies the title when a game search query have completed. - virtual void OnGridSearchComplete(GridSearch* gridSearch); + void OnGridSearchComplete(GridSearch* gridSearch) override; /// Callback that notifies the title when a new member joins the game session. - virtual void OnMemberJoined(GridSession* session, GridMember* member); + void OnMemberJoined(GridSession* session, GridMember* member) override; /// Callback that notifies the title that a member is leaving the game session. member pointer is NOT valid after the callback returns. - virtual void OnMemberLeaving(GridSession* session, GridMember* member); + void OnMemberLeaving(GridSession* session, GridMember* member) override; // \todo a better way will be (after we solve migration) is to supply a reason to OnMemberLeaving... like the member was kicked. // this will require that we actually remove the replica at the same moment. /// Callback that host decided to kick a member. You will receive a OnMemberLeaving when the actual member leaves the session. - virtual void OnMemberKicked(GridSession* session, GridMember* member); + void OnMemberKicked(GridSession* session, GridMember* member) override; /// After this callback it is safe to access session features. If host session is fully operational if client wait for OnSessionJoined. - virtual void OnSessionCreated(GridSession* session); + void OnSessionCreated(GridSession* session) override; /// Called on client machines to indicate that we join successfully. - virtual void OnSessionJoined(GridSession* session); + void OnSessionJoined(GridSession* session) override; /// Callback that notifies the title when a session will be left. session pointer is NOT valid after the callback returns. - virtual void OnSessionDelete(GridSession* session); + void OnSessionDelete(GridSession* session) override; /// Called when a session error occurs. - virtual void OnSessionError(GridSession* session, const AZStd::string& errorMsg); + void OnSessionError(GridSession* session, const AZStd::string& errorMsg) override; /// Called when the actual game(match) starts - virtual void OnSessionStart(GridSession* session); + void OnSessionStart(GridSession* session) override; /// Called when the actual game(match) ends - virtual void OnSessionEnd(GridSession* session); + void OnSessionEnd(GridSession* session) override; /// Called when we have our last chance to write statistics data for member in the session. - virtual void OnWriteStatistics(GridSession* session, GridMember* member, StatisticsData& data); + void OnWriteStatistics(GridSession* session, GridMember* member, StatisticsData& data) override; ////////////////////////////////////////////////////////////////////////// }; } diff --git a/Code/Framework/GridMate/GridMate/Replica/DataSet.h b/Code/Framework/GridMate/GridMate/Replica/DataSet.h index b0c5e669c1..1c1b6209c5 100644 --- a/Code/Framework/GridMate/GridMate/Replica/DataSet.h +++ b/Code/Framework/GridMate/GridMate/Replica/DataSet.h @@ -525,12 +525,12 @@ namespace GridMate void Set(const DataType& val) { m_value = val; } const DataType& Get() const { return m_value; } - virtual void Marshal(WriteBuffer& wb) + void Marshal(WriteBuffer& wb) override { wb.Write(m_value, m_marshaler); } - virtual void Unmarshal(ReadBuffer& rb) + void Unmarshal(ReadBuffer& rb) override { rb.Read(m_value, m_marshaler); } diff --git a/Code/Framework/GridMate/GridMate/Replica/MigrationSequence.h b/Code/Framework/GridMate/GridMate/Replica/MigrationSequence.h index ea4ed683b7..35febb873a 100644 --- a/Code/Framework/GridMate/GridMate/Replica/MigrationSequence.h +++ b/Code/Framework/GridMate/GridMate/Replica/MigrationSequence.h @@ -64,8 +64,8 @@ namespace GridMate /////////////////////////////////////////////////////////////////// // ReplicaMgrCallbackBus - virtual void OnDeactivateReplica(ReplicaId replicaId, ReplicaManager* pMgr) override; - virtual void OnPeerRemoved(PeerId peerId, ReplicaManager* pMgr) override; + void OnDeactivateReplica(ReplicaId replicaId, ReplicaManager* pMgr) override; + void OnPeerRemoved(PeerId peerId, ReplicaManager* pMgr) override; /////////////////////////////////////////////////////////////////// void OnReceivedAckUpstreamSuspended(PeerId from, AZ::u32 requestTime); diff --git a/Code/Legacy/CryCommon/IMiniLog.h b/Code/Legacy/CryCommon/IMiniLog.h index 51ff5f586e..ad6921cf09 100644 --- a/Code/Legacy/CryCommon/IMiniLog.h +++ b/Code/Legacy/CryCommon/IMiniLog.h @@ -119,8 +119,8 @@ struct CNullMiniLog // The default implementation just won't do anything //##@{ void LogV([[maybe_unused]] const char* szFormat, [[maybe_unused]] va_list args) {} - void LogV([[maybe_unused]] ELogType nType, [[maybe_unused]] const char* szFormat, [[maybe_unused]] va_list args) {} - void LogV ([[maybe_unused]] ELogType nType, [[maybe_unused]] int flags, [[maybe_unused]] const char* szFormat, [[maybe_unused]] va_list args) {} + void LogV([[maybe_unused]] ELogType nType, [[maybe_unused]] const char* szFormat, [[maybe_unused]] va_list args) override {} + void LogV ([[maybe_unused]] ELogType nType, [[maybe_unused]] int flags, [[maybe_unused]] const char* szFormat, [[maybe_unused]] va_list args) override {} //##@} }; diff --git a/Code/Legacy/CryCommon/SimpleSerialize.h b/Code/Legacy/CryCommon/SimpleSerialize.h index 2fd57b7bc3..8b7108ba6a 100644 --- a/Code/Legacy/CryCommon/SimpleSerialize.h +++ b/Code/Legacy/CryCommon/SimpleSerialize.h @@ -54,39 +54,39 @@ public: { } - void BeginGroup(const char* szName) + void BeginGroup(const char* szName) override { m_impl.BeginGroup(szName); } - bool BeginOptionalGroup(const char* szName, bool condition) + bool BeginOptionalGroup(const char* szName, bool condition) override { return m_impl.BeginOptionalGroup(szName, condition); } - void EndGroup() + void EndGroup() override { m_impl.EndGroup(); } - bool IsReading() const + bool IsReading() const override { return m_impl.IsReading(); } - void WriteStringValue(const char* name, SSerializeString& value) + void WriteStringValue(const char* name, SSerializeString& value) override { m_impl.Value(name, value); } - void ReadStringValue(const char* name, SSerializeString& curValue) + void ReadStringValue(const char* name, SSerializeString& curValue) override { m_impl.Value(name, curValue); } -#define SERIALIZATION_TYPE(T) \ - void Value(const char* name, T& x) override \ - { \ - m_impl.Value(name, x); \ +#define SERIALIZATION_TYPE(T) \ + void Value(const char* name, T& x) override \ + { \ + m_impl.Value(name, x); \ } #include "SerializationTypes.h" #undef SERIALIZATION_TYPE diff --git a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h index 836d2c2484..d7230347e9 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h @@ -25,9 +25,9 @@ public: CLevelInfo() = default; // ILevelInfo - virtual const char* GetName() const { return m_levelName.c_str(); } - virtual const char* GetPath() const { return m_levelPath.c_str(); } - virtual const char* GetAssetName() const { return m_levelAssetName.c_str(); } + const char* GetName() const override { return m_levelName.c_str(); } + const char* GetPath() const override { return m_levelPath.c_str(); } + const char* GetAssetName() const override { return m_levelAssetName.c_str(); } // ~ILevelInfo @@ -62,9 +62,9 @@ public: CLevel() {} virtual ~CLevel() = default; - virtual void Release() { delete this; } + void Release() override { delete this; } - virtual ILevelInfo* GetLevelInfo() { return &m_levelInfo; } + ILevelInfo* GetLevelInfo() override { return &m_levelInfo; } private: CLevelInfo m_levelInfo; @@ -77,38 +77,35 @@ public: CLevelSystem(ISystem* pSystem, const char* levelsFolder); virtual ~CLevelSystem(); - void Release() { delete this; }; + void Release() override { delete this; }; // ILevelSystem - virtual void Rescan(const char* levelsFolder); - virtual int GetLevelCount(); - virtual ILevelInfo* GetLevelInfo(int level); - virtual ILevelInfo* GetLevelInfo(const char* levelName); + void Rescan(const char* levelsFolder) override; + int GetLevelCount() override; + ILevelInfo* GetLevelInfo(int level) override; + ILevelInfo* GetLevelInfo(const char* levelName) override; - virtual void AddListener(ILevelSystemListener* pListener); - virtual void RemoveListener(ILevelSystemListener* pListener); + void AddListener(ILevelSystemListener* pListener) override; + void RemoveListener(ILevelSystemListener* pListener) override; - virtual bool LoadLevel(const char* levelName); - virtual void UnloadLevel(); - virtual bool IsLevelLoaded() { return m_bLevelLoaded; } + bool LoadLevel(const char* levelName) override; + void UnloadLevel() override; + bool IsLevelLoaded() override { return m_bLevelLoaded; } const char* GetCurrentLevelName() const override { if (m_pCurrentLevel && m_pCurrentLevel->GetLevelInfo()) { return m_pCurrentLevel->GetLevelInfo()->GetName(); } - else - { - return ""; - } + return ""; } // If the level load failed then we need to have a different shutdown procedure vs when a level is naturally unloaded - virtual void SetLevelLoadFailed(bool loadFailed) { m_levelLoadFailed = loadFailed; } - virtual bool GetLevelLoadFailed() { return m_levelLoadFailed; } + void SetLevelLoadFailed(bool loadFailed) override { m_levelLoadFailed = loadFailed; } + bool GetLevelLoadFailed() override { return m_levelLoadFailed; } // Unsupported by legacy level system. - virtual AZ::Data::AssetType GetLevelAssetType() const { return {}; } + AZ::Data::AssetType GetLevelAssetType() const override { return {}; } // ~ILevelSystem diff --git a/Code/Legacy/CrySystem/XConsoleVariable.h b/Code/Legacy/CrySystem/XConsoleVariable.h index 13808e7dd6..3ff71f9f39 100644 --- a/Code/Legacy/CrySystem/XConsoleVariable.h +++ b/Code/Legacy/CrySystem/XConsoleVariable.h @@ -34,7 +34,7 @@ public: void Release() override; void ForceSet(const char* s) override; void SetOnChangeCallback(ConsoleVarFunc pChangeFunc) override; - virtual uint64 AddOnChangeFunctor(const SFunctor& pChangeFunctor) override; + uint64 AddOnChangeFunctor(const AZStd::function& pChangeFunctor) override; ConsoleVarFunc GetOnChangeCallback() const override; bool ShouldReset() const { return (m_nFlags & VF_RESETTABLE) != 0; } @@ -77,7 +77,7 @@ protected: // ------------------------------------------------------------------ char* m_pDataProbeString; // value client is required to have for data probes int m_nFlags; // e.g. VF_CHEAT, ... - typedef std::vector> > ChangeFunctorContainer; + using ChangeFunctorContainer = std::vector> >; ChangeFunctorContainer m_changeFunctors; ConsoleVarFunc m_pChangeFunc; // Callback function that is called when this variable changes. CXConsole* m_pConsole; // used for the callback OnBeforeVarChange() @@ -169,15 +169,15 @@ public: // interface ICVar -------------------------------------------------------------------------------------- - virtual int GetIVal() const { return (int)m_fValue; } - virtual int64 GetI64Val() const { return (int64)m_fValue; } - virtual float GetFVal() const { return m_fValue; } - virtual const char* GetString() const; - virtual void ResetImpl() { Set(m_fDefault); } - virtual void Set(const char* s); - virtual void Set(float f); - virtual void Set(int i); - virtual int GetType() { return CVAR_FLOAT; } + int GetIVal() const override { return (int)m_fValue; } + int64 GetI64Val() const override { return (int64)m_fValue; } + float GetFVal() const override { return m_fValue; } + const char* GetString() const override; + void ResetImpl() override { Set(m_fDefault); } + void Set(const char* s) override; + void Set(float f) override; + void Set(int i) override; + int GetType() override { return CVAR_FLOAT; } protected: @@ -212,15 +212,15 @@ public: // interface ICVar -------------------------------------------------------------------------------------- - virtual int GetIVal() const { return m_iValue; } - virtual int64 GetI64Val() const { return m_iValue; } - virtual float GetFVal() const { return (float)m_iValue; } - virtual const char* GetString() const; - virtual void ResetImpl() { Set(m_iDefault); } - virtual void Set(const char* s); - virtual void Set(float f); - virtual void Set(int i); - virtual int GetType() { return CVAR_INT; } + int GetIVal() const override { return m_iValue; } + int64 GetI64Val() const override { return m_iValue; } + float GetFVal() const override { return (float)m_iValue; } + const char* GetString() const override; + void ResetImpl() override { Set(m_iDefault); } + void Set(const char* s) override; + void Set(float f) override; + void Set(int i) override; + int GetType() override { return CVAR_INT; } private: // -------------------------------------------------------------------------------------------- @@ -246,26 +246,26 @@ public: // interface ICVar -------------------------------------------------------------------------------------- - virtual int GetIVal() const { return atoi(m_sValue.c_str()); } - virtual int64 GetI64Val() const { return _atoi64(m_sValue.c_str()); } - virtual float GetFVal() const { return (float)atof(m_sValue.c_str()); } - virtual const char* GetString() const + int GetIVal() const override { return atoi(m_sValue.c_str()); } + int64 GetI64Val() const override { return _atoi64(m_sValue.c_str()); } + float GetFVal() const override { return (float)atof(m_sValue.c_str()); } + const char* GetString() const override { return m_sValue.c_str(); } - virtual void ResetImpl() { Set(m_sDefault.c_str()); } - virtual void Set(const char* s); - virtual void Set(float f) + void ResetImpl() override { Set(m_sDefault.c_str()); } + void Set(const char* s) override; + void Set(float f) override { stack_string s = stack_string::format("%g", f); Set(s.c_str()); } - virtual void Set(int i) + void Set(int i) override { stack_string s = stack_string::format("%d", i); Set(s.c_str()); } - virtual int GetType() { return CVAR_STRING; } + int GetType() override { return CVAR_STRING; } private: // -------------------------------------------------------------------------------------------- @@ -290,19 +290,19 @@ public: // interface ICVar -------------------------------------------------------------------------------------- - virtual int GetIVal() const { return (int)m_fValue; } - virtual int64 GetI64Val() const { return (int64)m_fValue; } - virtual float GetFVal() const { return m_fValue; } - virtual const char* GetString() const; - virtual void ResetImpl() { Set(m_fDefault); } - virtual void Set(const char* s); - virtual void Set(float f); - virtual void Set(int i); - virtual int GetType() { return CVAR_FLOAT; } + int GetIVal() const override { return (int)m_fValue; } + int64 GetI64Val() const override { return (int64)m_fValue; } + float GetFVal() const override { return m_fValue; } + const char* GetString() const override; + void ResetImpl() override { Set(m_fDefault); } + void Set(const char* s) override; + void Set(float f) override; + void Set(int i) override; + int GetType() override { return CVAR_FLOAT; } protected: - virtual const char *GetOwnDataProbeString() const + const char *GetOwnDataProbeString() const override { static char szReturnString[8]; diff --git a/Code/Legacy/CrySystem/XML/XMLBinaryNode.h b/Code/Legacy/CrySystem/XML/XMLBinaryNode.h index d6c66e79f3..b4706f1b85 100644 --- a/Code/Legacy/CrySystem/XML/XMLBinaryNode.h +++ b/Code/Legacy/CrySystem/XML/XMLBinaryNode.h @@ -63,17 +63,17 @@ public: //void* operator new( size_t nSize ); //void operator delete( void *ptr ); - virtual void DeleteThis() { } + void DeleteThis() override { } //! Create new XML node. - XmlNodeRef createNode(const char* tag); + XmlNodeRef createNode(const char* tag) override; // Summary: // Reference counting. - virtual void AddRef() { ++m_pData->nRefCount; }; + void AddRef() override { ++m_pData->nRefCount; }; // Notes: // When ref count reach zero XML node dies. - virtual void Release() + void Release() override { if (--m_pData->nRefCount <= 0) { @@ -82,105 +82,105 @@ public: }; //! Get XML node tag. - const char* getTag() const { return _string(_node()->nTagStringOffset); }; - void setTag([[maybe_unused]] const char* tag) { assert(0); }; + const char* getTag() const override { return _string(_node()->nTagStringOffset); }; + void setTag([[maybe_unused]] const char* tag) override { assert(0); }; //! Return true if given tag is equal to node tag. - bool isTag(const char* tag) const; + bool isTag(const char* tag) const override; //! Get XML Node attributes. - virtual int getNumAttributes() const { return (int)_node()->nAttributeCount; }; + int getNumAttributes() const override { return (int)_node()->nAttributeCount; }; //! Return attribute key and value by attribute index. - virtual bool getAttributeByIndex(int index, const char** key, const char** value); + bool getAttributeByIndex(int index, const char** key, const char** value) override; //! Return attribute key and value by attribute index, string version. virtual bool getAttributeByIndex(int index, XmlString& key, XmlString& value); - virtual void shareChildren([[maybe_unused]] const XmlNodeRef& fromNode) { assert(0); }; - virtual void copyAttributes(XmlNodeRef fromNode) { assert(0); }; + void shareChildren([[maybe_unused]] const XmlNodeRef& fromNode) override { assert(0); }; + void copyAttributes(XmlNodeRef fromNode) override { assert(0); }; //! Get XML Node attribute for specified key. - const char* getAttr(const char* key) const; + const char* getAttr(const char* key) const override; //! Get XML Node attribute for specified key. // Returns true if the attribute exists, false otherwise. - bool getAttr(const char* key, const char** value) const; + bool getAttr(const char* key, const char** value) const override; //! Check if attributes with specified key exist. - bool haveAttr(const char* key) const; + bool haveAttr(const char* key) const override; - XmlNodeRef newChild([[maybe_unused]] const char* tagName) { assert(0); return 0; }; - void replaceChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) { assert(0); }; - void insertChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) { assert(0); }; - void addChild([[maybe_unused]] const XmlNodeRef& node) { assert(0); }; - void removeChild([[maybe_unused]] const XmlNodeRef& node) { assert(0); }; + XmlNodeRef newChild([[maybe_unused]] const char* tagName) override { assert(0); return 0; }; + void replaceChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) override { assert(0); }; + void insertChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) override { assert(0); }; + void addChild([[maybe_unused]] const XmlNodeRef& node) override { assert(0); }; + void removeChild([[maybe_unused]] const XmlNodeRef& node) override { assert(0); }; //! Remove all child nodes. - void removeAllChilds() { assert(0); }; + void removeAllChilds() override { assert(0); }; //! Get number of child XML nodes. - int getChildCount() const { return (int)_node()->nChildCount; }; + int getChildCount() const override { return (int)_node()->nChildCount; }; //! Get XML Node child nodes. - XmlNodeRef getChild(int i) const; + XmlNodeRef getChild(int i) const override; //! Find node with specified tag. - XmlNodeRef findChild(const char* tag) const; + XmlNodeRef findChild(const char* tag) const override; void deleteChild([[maybe_unused]] const char* tag) { assert(0); }; - void deleteChildAt([[maybe_unused]] int nIndex) { assert(0); }; + void deleteChildAt([[maybe_unused]] int nIndex) override { assert(0); }; //! Get parent XML node. - XmlNodeRef getParent() const; + XmlNodeRef getParent() const override; //! Returns content of this node. - const char* getContent() const { return _string(_node()->nContentStringOffset); }; - void setContent([[maybe_unused]] const char* str) { assert(0); }; + const char* getContent() const override { return _string(_node()->nContentStringOffset); }; + void setContent([[maybe_unused]] const char* str) override { assert(0); }; - XmlNodeRef clone() { assert(0); return 0; }; + XmlNodeRef clone() override { assert(0); return 0; }; //! Returns line number for XML tag. - int getLine() const { return 0; }; + int getLine() const override { return 0; }; //! Set line number in xml. - void setLine([[maybe_unused]] int line) { assert(0); }; + void setLine([[maybe_unused]] int line) override { assert(0); }; //! Returns XML of this node and sub nodes. - virtual IXmlStringData* getXMLData([[maybe_unused]] int nReserveMem = 0) const { assert(0); return 0; }; - XmlString getXML([[maybe_unused]] int level = 0) const { assert(0); return ""; }; - bool saveToFile([[maybe_unused]] const char* fileName) { assert(0); return false; }; // saves in one huge chunk - bool saveToFile([[maybe_unused]] const char* fileName, [[maybe_unused]] size_t chunkSizeBytes, [[maybe_unused]] AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle) { assert(0); return false; }; // save in small memory chunks + IXmlStringData* getXMLData([[maybe_unused]] int nReserveMem = 0) const override { assert(0); return 0; }; + XmlString getXML([[maybe_unused]] int level = 0) const override { assert(0); return ""; }; + bool saveToFile([[maybe_unused]] const char* fileName) override { assert(0); return false; }; // saves in one huge chunk + bool saveToFile([[maybe_unused]] const char* fileName, [[maybe_unused]] size_t chunkSizeBytes, [[maybe_unused]] AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle) override { assert(0); return false; }; // save in small memory chunks //! Set new XML Node attribute (or override attribute with same key). using IXmlNode::setAttr; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const char* value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] int value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] unsigned int value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] int64 value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] uint64 value, [[maybe_unused]] bool useHexFormat = true /* ignored */) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] float value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] f64 value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec2& value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Ang3& value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec3& value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec4& value) { assert(0); }; - void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Quat& value) { assert(0); }; - void delAttr([[maybe_unused]] const char* key) { assert(0); }; - void removeAllAttributes() { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const char* value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] int value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] unsigned int value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] int64 value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] uint64 value, [[maybe_unused]] bool useHexFormat = true /* ignored */) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] float value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] f64 value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec2& value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Ang3& value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec3& value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec4& value) override { assert(0); }; + void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Quat& value) override { assert(0); }; + void delAttr([[maybe_unused]] const char* key) override { assert(0); }; + void removeAllAttributes() override { assert(0); }; //! Get attribute value of node. - bool getAttr(const char* key, int& value) const; - bool getAttr(const char* key, unsigned int& value) const; - bool getAttr(const char* key, int64& value) const; - bool getAttr(const char* key, uint64& value, bool useHexFormat = true /* ignored */) const; - bool getAttr(const char* key, float& value) const; - bool getAttr(const char* key, f64& value) const; - bool getAttr(const char* key, bool& value) const; - bool getAttr(const char* key, XmlString& value) const {const char* v(NULL); bool boHasAttribute(getAttr(key, &v)); value = v; return boHasAttribute; } - bool getAttr(const char* key, Vec2& value) const; - bool getAttr(const char* key, Ang3& value) const; - bool getAttr(const char* key, Vec3& value) const; - bool getAttr(const char* key, Vec4& value) const; - bool getAttr(const char* key, Quat& value) const; - bool getAttr(const char* key, ColorB& value) const; + bool getAttr(const char* key, int& value) const override; + bool getAttr(const char* key, unsigned int& value) const override; + bool getAttr(const char* key, int64& value) const override; + bool getAttr(const char* key, uint64& value, bool useHexFormat = true /* ignored */) const override; + bool getAttr(const char* key, float& value) const override; + bool getAttr(const char* key, f64& value) const override; + bool getAttr(const char* key, bool& value) const override; + bool getAttr(const char* key, XmlString& value) const override {const char* v(NULL); bool boHasAttribute(getAttr(key, &v)); value = v; return boHasAttribute; } + bool getAttr(const char* key, Vec2& value) const override; + bool getAttr(const char* key, Ang3& value) const override; + bool getAttr(const char* key, Vec3& value) const override; + bool getAttr(const char* key, Vec4& value) const override; + bool getAttr(const char* key, Quat& value) const override; + bool getAttr(const char* key, ColorB& value) const override; private: ////////////////////////////////////////////////////////////////////////// @@ -217,7 +217,7 @@ private: } protected: - virtual void setParent([[maybe_unused]] const XmlNodeRef& inRef) { assert(0); } + void setParent([[maybe_unused]] const XmlNodeRef& inRef) override { assert(0); } ////////////////////////////////////////////////////////////////////////// private: diff --git a/Code/Tools/GridHub/GridHub/gridhub.hxx b/Code/Tools/GridHub/GridHub/gridhub.hxx index 849dbb92e1..14ed468345 100644 --- a/Code/Tools/GridHub/GridHub/gridhub.hxx +++ b/Code/Tools/GridHub/GridHub/gridhub.hxx @@ -57,8 +57,8 @@ public slots: protected: void SanityCheckDetectionTimeout(); - void timerEvent(QTimerEvent *event); - void closeEvent(QCloseEvent *event); + void timerEvent(QTimerEvent *event) override; + void closeEvent(QCloseEvent *event) override; void SystemTick(); private: @@ -125,7 +125,7 @@ public: /// Callback that is called when the Session service is ready to process sessions. void OnSessionServiceReady() override {} /// Callback that notifies the title when a game search query have completed. - void OnGridSearchComplete(GridMate::GridSearch* gridSearch) { (void)gridSearch; } + void OnGridSearchComplete(GridMate::GridSearch* gridSearch) override { (void)gridSearch; } /// Callback that notifies the title when a new member joins the game session. void OnMemberJoined(GridMate::GridSession* session, GridMate::GridMember* member) override; /// Callback that notifies the title that a member is leaving the game session. member pointer is NOT valid after the callback returns. @@ -133,25 +133,25 @@ public: // \todo a better way will be (after we solve migration) is to supply a reason to OnMemberLeaving... like the member was kicked. // this will require that we actually remove the replica at the same moment. /// Callback that host decided to kick a member. You will receive a OnMemberLeaving when the actual member leaves the session. - void OnMemberKicked(GridMate::GridSession* session, GridMate::GridMember* member, AZ::u8 reason) { (void)session;(void)member;(void)reason; } + void OnMemberKicked(GridMate::GridSession* session, GridMate::GridMember* member, AZ::u8 reason) override { (void)session;(void)member;(void)reason; } /// After this callback it is safe to access session features. If host session is fully operational if client wait for OnSessionJoined. void OnSessionCreated(GridMate::GridSession* session) override; /// Called on client machines to indicate that we join successfully. - void OnSessionJoined(GridMate::GridSession* session) { (void)session; } + void OnSessionJoined(GridMate::GridSession* session) override { (void)session; } /// Callback that notifies the title when a session will be left. session pointer is NOT valid after the callback returns. void OnSessionDelete(GridMate::GridSession* session) override; /// Called when a session error occurs. - void OnSessionError(GridMate::GridSession* session, const AZStd::string& errorMsg ) { (void)session; (void)errorMsg; } + void OnSessionError(GridMate::GridSession* session, const AZStd::string& errorMsg ) override { (void)session; (void)errorMsg; } /// Called when the actual game(match) starts - void OnSessionStart(GridMate::GridSession* session) { (void)session; } + void OnSessionStart(GridMate::GridSession* session) override { (void)session; } /// Called when the actual game(match) ends - void OnSessionEnd(GridMate::GridSession* session) { (void)session; } + void OnSessionEnd(GridMate::GridSession* session) override { (void)session; } /// Called when we start a host migration. - void OnMigrationStart(GridMate::GridSession* session) { (void)session; } + void OnMigrationStart(GridMate::GridSession* session) override { (void)session; } /// Called so the user can select a member that should be the new Host. Value will be ignored if NULL, current host or the member has invalid connection id. - void OnMigrationElectHost(GridMate::GridSession* session,GridMate::GridMember*& newHost) { (void)session;(void)newHost; } + void OnMigrationElectHost(GridMate::GridSession* session,GridMate::GridMember*& newHost) override { (void)session;(void)newHost; } /// Called when the host migration has completed. - void OnMigrationEnd(GridMate::GridSession* session,GridMate::GridMember* newHost) { (void)session;(void)newHost; } + void OnMigrationEnd(GridMate::GridSession* session,GridMate::GridMember* newHost) override { (void)session;(void)newHost; } ////////////////////////////////////////////////////////////////////////// void SetUI(GridHub* ui) { m_ui = ui; } diff --git a/Code/Tools/GridHub/GridHub/main.cpp b/Code/Tools/GridHub/GridHub/main.cpp index 3b853910be..fe27301714 100644 --- a/Code/Tools/GridHub/GridHub/main.cpp +++ b/Code/Tools/GridHub/GridHub/main.cpp @@ -140,7 +140,7 @@ protected: * ComponentApplication::RegisterCoreComponents and then register the application * specific core components. */ - virtual void RegisterCoreComponents(); + void RegisterCoreComponents() override; /** AZ::SystemTickBus::Handler @@ -220,7 +220,7 @@ public: } //virtual bool QGridHubApplication::winEventFilter( MSG *msg , long *result) - virtual bool nativeEventFilter(const QByteArray &eventType, void *message, [[maybe_unused]] long *result) + bool nativeEventFilter(const QByteArray &eventType, void *message, [[maybe_unused]] long *result) override { #ifdef AZ_PLATFORM_WINDOWS if ((eventType == "windows_generic_MSG")||(eventType == "windows_dispatcher_MSG")) diff --git a/Code/Tools/RemoteConsole/Core/RemoteConsoleCore.h b/Code/Tools/RemoteConsole/Core/RemoteConsoleCore.h index d9a6f7aba6..458cfc44a2 100644 --- a/Code/Tools/RemoteConsole/Core/RemoteConsoleCore.h +++ b/Code/Tools/RemoteConsole/Core/RemoteConsoleCore.h @@ -94,11 +94,11 @@ struct SNoDataEvent { SNoDataEvent() : IRemoteEvent(T) {}; - virtual IRemoteEvent* Clone() { return new SNoDataEvent(); } + IRemoteEvent* Clone() override { return new SNoDataEvent(); } protected: - virtual void WriteToBuffer([[maybe_unused]] char* buffer, int& size, [[maybe_unused]] int maxsize) { size = 0; } - virtual IRemoteEvent* CreateFromBuffer([[maybe_unused]] const char* buffer, [[maybe_unused]] int size) { return Clone(); } + void WriteToBuffer([[maybe_unused]] char* buffer, int& size, [[maybe_unused]] int maxsize) override { size = 0; } + IRemoteEvent* CreateFromBuffer([[maybe_unused]] const char* buffer, [[maybe_unused]] int size) override { return Clone(); } }; ///////////////////////////////////////////////////////////////////////////////////////////// @@ -109,17 +109,17 @@ struct SStringEvent SStringEvent(const char* data) : IRemoteEvent(T) , m_data(data) {}; - virtual IRemoteEvent* Clone() { return new SStringEvent(GetData()); } + IRemoteEvent* Clone() override { return new SStringEvent(GetData()); } const char* GetData() const { return m_data.c_str(); } protected: - virtual void WriteToBuffer(char* buffer, int& size, int maxsize) + void WriteToBuffer(char* buffer, int& size, int maxsize) override { const char* data = GetData(); size = min((int)strlen(data), maxsize); memcpy(buffer, data, size); } - virtual IRemoteEvent* CreateFromBuffer(const char* buffer, [[maybe_unused]] int size) { return new SStringEvent(buffer); } + IRemoteEvent* CreateFromBuffer(const char* buffer, [[maybe_unused]] int size) override { return new SStringEvent(buffer); } private: AZStd::string m_data; diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h b/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h index 240331496e..10b14ed5af 100644 --- a/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h +++ b/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h @@ -75,7 +75,7 @@ namespace AWSCore return (m_requestUrl.length() > 0); } - std::shared_ptr GetCredentialsProvider() + std::shared_ptr GetCredentialsProvider() override { ServiceClientJobConfigType::EnsureSettingsApplied(); return m_credentialsProvider; diff --git a/Gems/AssetValidation/Code/Source/AssetValidationSystemComponent.h b/Gems/AssetValidation/Code/Source/AssetValidationSystemComponent.h index 8f7a177ca2..e8b2c0acc3 100644 --- a/Gems/AssetValidation/Code/Source/AssetValidationSystemComponent.h +++ b/Gems/AssetValidation/Code/Source/AssetValidationSystemComponent.h @@ -92,7 +92,7 @@ namespace AssetValidation //////////////////////////////////////////////////////////////////////// // ArchiveNotificationBus interface implementation - void FileAccess(const char* filePath) /*override*/; + void FileAccess(const char* filePath) override /*override*/; //////////////////////////////////////////////////////////////////////// bool AddSeedList(const char* seedPath) override; diff --git a/Gems/Atom/RHI/Code/CMakeLists.txt b/Gems/Atom/RHI/Code/CMakeLists.txt index 879fc7d2ce..ae471b1ca1 100644 --- a/Gems/Atom/RHI/Code/CMakeLists.txt +++ b/Gems/Atom/RHI/Code/CMakeLists.txt @@ -55,9 +55,6 @@ ly_add_target( Gem::Atom_RHI.Reflect PUBLIC ${RENDERDOC_DEPENDENCY} - COMPILE_DEFINITIONS - PUBLIC - ${RENDERDOC_DEFINE} ) ly_add_target( diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h index c628cb61e0..8fd083d4b9 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h @@ -38,7 +38,7 @@ namespace AZ void Init(const Descriptor& descriptor); - void Shutdown(); + void Shutdown() override; void GarbageCollect(); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Scope.h b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Scope.h index 86140e2c7c..dad356cab6 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Scope.h +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Scope.h @@ -142,7 +142,7 @@ namespace AZ ////////////////////////////////////////////////////////////////////////// // FrameEventBus::Handler - void OnFrameCompileEnd(RHI::FrameGraph& frameGraph); + void OnFrameCompileEnd(RHI::FrameGraph& frameGraph) override; ////////////////////////////////////////////////////////////////////////// // Returns if a barrier can be converted to an implicit subpass barrier. diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/ShaderCollection.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/ShaderCollection.cpp index 180f6a5d99..7b3b6b7a28 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/ShaderCollection.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/ShaderCollection.cpp @@ -22,7 +22,7 @@ namespace AZ : public SerializeContext::IEventHandler { //! Called right before we start reading from the instance pointed by classPtr. - virtual void OnReadBegin(void* classPtr) + void OnReadBegin(void* classPtr) override { ShaderCollection::Item* shaderVariantReference = reinterpret_cast(classPtr); shaderVariantReference->m_shaderVariantId = shaderVariantReference->m_shaderOptionGroup.GetShaderVariantId(); diff --git a/Gems/AudioSystem/Code/Source/Engine/AudioSystem.h b/Gems/AudioSystem/Code/Source/Engine/AudioSystem.h index 1d8f8fb286..615d202e25 100644 --- a/Gems/AudioSystem/Code/Source/Engine/AudioSystem.h +++ b/Gems/AudioSystem/Code/Source/Engine/AudioSystem.h @@ -120,7 +120,7 @@ namespace Audio void FreeAudioProxy(IAudioProxy* const pIAudioProxy) override; TAudioSourceId CreateAudioSource(const SAudioInputConfig& sourceConfig) override; - void DestroyAudioSource(TAudioSourceId sourceId); + void DestroyAudioSource(TAudioSourceId sourceId) override; // When AUDIO_RELEASE is defined, these two functions always return nullptr const char* GetAudioControlName(const EAudioControlType controlType, const TATLIDType atlID) const override; diff --git a/Gems/CrashReporting/Code/Include/CrashReporting/GameCrashHandler.h b/Gems/CrashReporting/Code/Include/CrashReporting/GameCrashHandler.h index 08d3ccf90b..e5aaaa2e93 100644 --- a/Gems/CrashReporting/Code/Include/CrashReporting/GameCrashHandler.h +++ b/Gems/CrashReporting/Code/Include/CrashReporting/GameCrashHandler.h @@ -22,13 +22,13 @@ namespace CrashHandler static void InitCrashHandler(const std::string& moduleTag, const std::string& devRoot, const std::string& crashUrl = {}, const std::string& crashToken = {}, const std::string& handlerFolder = {}, const CrashHandlerAnnotations& baseAnnotations = CrashHandlerAnnotations(), const CrashHandlerArguments& argumentVec = CrashHandlerArguments()); protected: - virtual const char* GetCrashHandlerExecutableName() const override; - virtual std::string DetermineAppPath() const override; + const char* GetCrashHandlerExecutableName() const override; + std::string DetermineAppPath() const override; - virtual std::string GetCrashSubmissionURL() const override; - virtual std::string GetCrashSubmissionToken() const override; + std::string GetCrashSubmissionURL() const override; + std::string GetCrashSubmissionToken() const override; - virtual std::string GetCrashHandlerPath(const std::string& lyAppRoot) const override; + std::string GetCrashHandlerPath(const std::string& lyAppRoot) const override; }; diff --git a/Gems/CrashReporting/Code/Include/CrashReporting/GameCrashUploader.h b/Gems/CrashReporting/Code/Include/CrashReporting/GameCrashUploader.h index 48d2bd25f7..c48440bed4 100644 --- a/Gems/CrashReporting/Code/Include/CrashReporting/GameCrashUploader.h +++ b/Gems/CrashReporting/Code/Include/CrashReporting/GameCrashUploader.h @@ -17,7 +17,7 @@ namespace O3de { public: GameCrashUploader(int& argcount, char** argv); - virtual bool CheckConfirmation(const crashpad::CrashReportDatabase::Report& report) override; + bool CheckConfirmation(const crashpad::CrashReportDatabase::Report& report) override; static std::string GetRootFolder(); }; diff --git a/Gems/DebugDraw/Code/Source/DebugDrawSystemComponent.h b/Gems/DebugDraw/Code/Source/DebugDrawSystemComponent.h index 24a6eae3aa..b534bd3bd4 100644 --- a/Gems/DebugDraw/Code/Source/DebugDrawSystemComponent.h +++ b/Gems/DebugDraw/Code/Source/DebugDrawSystemComponent.h @@ -117,7 +117,7 @@ namespace DebugDraw void OnBeginPrepareRender() override; // AZ::Render::Bootstrap::NotificationBus - void OnBootstrapSceneReady(AZ::RPI::Scene* scene); + void OnBootstrapSceneReady(AZ::RPI::Scene* scene) override; // EntityBus void OnEntityDeactivated(const AZ::EntityId& entityId) override; diff --git a/Gems/EMotionFX/Code/MCore/Source/AttributeBool.h b/Gems/EMotionFX/Code/MCore/Source/AttributeBool.h index bf5d13d8fe..1dac643667 100644 --- a/Gems/EMotionFX/Code/MCore/Source/AttributeBool.h +++ b/Gems/EMotionFX/Code/MCore/Source/AttributeBool.h @@ -44,7 +44,7 @@ namespace MCore // overloaded from the attribute base class Attribute* Clone() const override { return AttributeBool::Create(m_value); } const char* GetTypeString() const override { return "AttributeBool"; } - bool InitFrom(const Attribute* other); + bool InitFrom(const Attribute* other) override; bool InitFromString(const AZStd::string& valueString) override { return AzFramework::StringFunc::LooksLikeBool(valueString.c_str(), &m_value); diff --git a/Gems/EMotionFX/Code/MCore/Source/AttributeInt32.h b/Gems/EMotionFX/Code/MCore/Source/AttributeInt32.h index e195d584a5..ebde060209 100644 --- a/Gems/EMotionFX/Code/MCore/Source/AttributeInt32.h +++ b/Gems/EMotionFX/Code/MCore/Source/AttributeInt32.h @@ -45,7 +45,7 @@ namespace MCore // overloaded from the attribute base class Attribute* Clone() const override { return AttributeInt32::Create(m_value); } const char* GetTypeString() const override { return "AttributeInt32"; } - bool InitFrom(const Attribute* other); + bool InitFrom(const Attribute* other) override; bool InitFromString(const AZStd::string& valueString) override { return AzFramework::StringFunc::LooksLikeInt(valueString.c_str(), &m_value); diff --git a/Gems/ExpressionEvaluation/Code/Source/ExpressionEvaluationSystemComponent.cpp b/Gems/ExpressionEvaluation/Code/Source/ExpressionEvaluationSystemComponent.cpp index 1a72f30e7c..5c4b9c61d9 100644 --- a/Gems/ExpressionEvaluation/Code/Source/ExpressionEvaluationSystemComponent.cpp +++ b/Gems/ExpressionEvaluation/Code/Source/ExpressionEvaluationSystemComponent.cpp @@ -37,12 +37,12 @@ namespace ExpressionEvaluation } - ExpressionParserId GetParserId() const + ExpressionParserId GetParserId() const override { return InternalTypes::Interfaces::InternalParser; } - ParseResult ParseElement(const AZStd::string& inputText, size_t offset) const + ParseResult ParseElement(const AZStd::string& inputText, size_t offset) const override { ParseResult result; AZStd::smatch match; @@ -69,7 +69,7 @@ namespace ExpressionEvaluation return result; } - void EvaluateToken(const ElementInformation& parseResult, ExpressionResultStack& evaluationStack) const + void EvaluateToken(const ElementInformation& parseResult, ExpressionResultStack& evaluationStack) const override { AZ_UNUSED(parseResult); AZ_UNUSED(evaluationStack); diff --git a/Gems/LyShine/Code/Source/Sprite.h b/Gems/LyShine/Code/Source/Sprite.h index 8a645b78b1..0b2c790cf6 100644 --- a/Gems/LyShine/Code/Source/Sprite.h +++ b/Gems/LyShine/Code/Source/Sprite.h @@ -44,7 +44,7 @@ public: // member functions AZ::Vector2 GetSize() override; AZ::Vector2 GetCellSize(int cellIndex) override; const SpriteSheetCellContainer& GetSpriteSheetCells() const override; - virtual void SetSpriteSheetCells(const SpriteSheetCellContainer& cells); + void SetSpriteSheetCells(const SpriteSheetCellContainer& cells) override; void ClearSpriteSheetCells() override; void AddSpriteSheetCell(const SpriteSheetCell& spriteSheetCell) override; AZ::Vector2 GetCellUvSize(int cellIndex) const override; @@ -96,7 +96,7 @@ protected: // member functions bool CellIndexWithinRange(int cellIndex) const; private: // types - typedef AZStd::unordered_map, stl::equality_string_caseless > CSpriteHashMap; + using CSpriteHashMap = AZStd::unordered_map, stl::equality_string_caseless >; private: // member functions bool LoadFromXmlFile(); diff --git a/Gems/MultiplayerCompression/Code/Source/LZ4Compressor.h b/Gems/MultiplayerCompression/Code/Source/LZ4Compressor.h index 640cf03ee4..f7fec70813 100644 --- a/Gems/MultiplayerCompression/Code/Source/LZ4Compressor.h +++ b/Gems/MultiplayerCompression/Code/Source/LZ4Compressor.h @@ -31,13 +31,13 @@ namespace MultiplayerCompression LZ4Compressor() = default; const char* GetName() const { return CompressorName; } - AzNetworking::CompressorType GetType() const { return CompressorType; }; + AzNetworking::CompressorType GetType() const override { return CompressorType; }; - bool Init() { return true; } - size_t GetMaxChunkSize(size_t maxCompSize) const; - size_t GetMaxCompressedBufferSize(size_t uncompSize) const; + bool Init() override { return true; } + size_t GetMaxChunkSize(size_t maxCompSize) const override; + size_t GetMaxCompressedBufferSize(size_t uncompSize) const override; - AzNetworking::CompressorError Compress(const void* uncompData, size_t uncompSize, void* compData, size_t compDataSize, size_t& compSize); - AzNetworking::CompressorError Decompress(const void* compData, size_t compDataSize, void* uncompData, size_t uncompDataSize, size_t& consumedSize, size_t& uncompSize); + AzNetworking::CompressorError Compress(const void* uncompData, size_t uncompSize, void* compData, size_t compDataSize, size_t& compSize) override; + AzNetworking::CompressorError Decompress(const void* compData, size_t compDataSize, void* uncompData, size_t uncompDataSize, size_t& consumedSize, size_t& uncompSize) override; }; } diff --git a/Gems/Presence/Code/Source/PresenceSystemComponent.h b/Gems/Presence/Code/Source/PresenceSystemComponent.h index cc3ab48bae..bc4ec01906 100644 --- a/Gems/Presence/Code/Source/PresenceSystemComponent.h +++ b/Gems/Presence/Code/Source/PresenceSystemComponent.h @@ -43,7 +43,7 @@ namespace Presence //////////////////////////////////////////////////////////////////////// //! PresenceRequestBus interface implementation void SetPresence(const SetPresenceParams& params) override; - void QueryPresence(const QueryPresenceParams& params); + void QueryPresence(const QueryPresenceParams& params) override; public: //////////////////////////////////////////////////////////////////////// diff --git a/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset b/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset index a612135e94..2a248b216b 100644 --- a/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset +++ b/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset @@ -1,7 +1,8 @@  - - + + + \ No newline at end of file