diff --git a/AutomatedTesting/Gem/PythonTests/AWS/README.md b/AutomatedTesting/Gem/PythonTests/AWS/README.md index 1429fc487f..1bb36f178d 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/README.md +++ b/AutomatedTesting/Gem/PythonTests/AWS/README.md @@ -11,7 +11,7 @@ 3. Open a new Command Prompt window at the engine root and set the following environment variables: Set O3DE_AWS_PROJECT_NAME=AWSAUTO Set O3DE_AWS_DEPLOY_REGION=us-east-1 - Set ASSUME_ROLE_ARN="arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests" + Set ASSUME_ROLE_ARN=arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests Set COMMIT_ID=HEAD 4. In the same Command Prompt window, Deploy the CDK applications for AWS gems by running deploy_cdk_applications.cmd. diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py index a0a53f92b5..5f6103c46a 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py @@ -139,7 +139,6 @@ def update_kinesis_analytics_application_status(aws_metrics_utils: pytest.fixtur @pytest.mark.usefixtures('resource_mappings') @pytest.mark.parametrize('assume_role_arn', [constants.ASSUME_ROLE_ARN]) @pytest.mark.parametrize('feature_name', [AWS_METRICS_FEATURE_NAME]) -@pytest.mark.parametrize('level', ['AWS/Metrics']) @pytest.mark.parametrize('profile_name', ['AWSAutomationTest']) @pytest.mark.parametrize('project', ['AutomatedTesting']) @pytest.mark.parametrize('region_name', [constants.AWS_REGION]) @@ -150,6 +149,7 @@ class TestAWSMetricsWindows(object): """ Test class to verify the real-time and batch analytics for metrics. """ + @pytest.mark.parametrize('level', ['AWS/Metrics']) def test_realtime_and_batch_analytics(self, level: str, launcher: pytest.fixture, @@ -201,10 +201,7 @@ class TestAWSMetricsWindows(object): for thread in operational_threads: thread.join() - # Clear the analytics bucket objects so that the S3 bucket can be destroyed during tear down. - aws_metrics_utils.empty_bucket( - resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsBucketName')) - + @pytest.mark.parametrize('level', ['AWS/Metrics']) def test_unauthorized_user_request_rejected(self, level: str, launcher: pytest.fixture, @@ -227,3 +224,13 @@ class TestAWSMetricsWindows(object): halt_on_unexpected=True) assert result, 'Metrics events are sent successfully by unauthorized user' logger.info('Unauthorized user is rejected to send metrics.') + + def test_clean_up_s3_bucket(self, + aws_utils: pytest.fixture, + resource_mappings: pytest.fixture, + aws_metrics_utils: pytest.fixture): + """ + Clear the analytics bucket objects so that the S3 bucket can be destroyed during tear down. + """ + aws_metrics_utils.empty_bucket( + resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsBucketName')) diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_AddedToEntity.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_AddedToEntity.py index cd10caf57b..a2e950e1dc 100644 --- a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_AddedToEntity.py +++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_AddedToEntity.py @@ -3,8 +3,6 @@ Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT - -Hydra script that creates an entity and attaches Atom components to it for test verification. """ import os @@ -17,6 +15,7 @@ import azlmbr.asset as asset import azlmbr.entity as entity import azlmbr.legacy.general as general import azlmbr.editor as editor +import azlmbr.render as render sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "PythonTests")) @@ -125,6 +124,19 @@ def run(): def verify_set_property(entity_obj, path, value): entity_obj.get_set_test(0, path, value) + # Verify cubemap generation + def verify_cubemap_generation(component_name, entity_obj): + # Initially Check if the component has Reflection Probe component + if not hydra.has_components(entity_obj.id, ["Reflection Probe"]): + raise ValueError(f"Given entity {entity_obj.name} has no Reflection Probe component") + render.EditorReflectionProbeBus(azlmbr.bus.Event, "BakeReflectionProbe", entity_obj.id) + + def get_value(): + hydra.get_component_property_value(entity_obj.components[0], "Cubemap|Baked Cubemap Path") + + TestHelper.wait_for_condition(lambda: get_value() != "", 20.0) + general.log(f"{component_name}_test: Cubemap is generated: {get_value() != ''}") + # Wait for Editor idle loop before executing Python hydra scripts. TestHelper.init_idle() @@ -215,6 +227,12 @@ def run(): # Display Mapper Component ComponentTests("Display Mapper") + # Reflection Probe Component + reflection_probe = "Reflection Probe" + ComponentTests( + reflection_probe, + lambda entity_obj: verify_required_component_addition(entity_obj, ["Box Shape"], reflection_probe), + lambda entity_obj: verify_cubemap_generation(reflection_probe, entity_obj),) if __name__ == "__main__": run() diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py index ce496ce268..16e281e494 100644 --- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py +++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py @@ -161,6 +161,21 @@ class TestAtomEditorComponentsMain(object): "Display Mapper_test: Entity deleted: True", "Display Mapper_test: UNDO entity deletion works: True", "Display Mapper_test: REDO entity deletion works: True", + # Reflection Probe Component + "Reflection Probe Entity successfully created", + "Reflection Probe_test: Component added to the entity: True", + "Reflection Probe_test: Component removed after UNDO: True", + "Reflection Probe_test: Component added after REDO: True", + "Reflection Probe_test: Entered game mode: True", + "Reflection Probe_test: Exit game mode: True", + "Reflection Probe_test: Entity disabled initially: True", + "Reflection Probe_test: Entity enabled after adding required components: True", + "Reflection Probe_test: Cubemap is generated: True", + "Reflection Probe_test: Entity is hidden: True", + "Reflection Probe_test: Entity is shown: True", + "Reflection Probe_test: Entity deleted: True", + "Reflection Probe_test: UNDO entity deletion works: True", + "Reflection Probe_test: REDO entity deletion works: True", ] unexpected_lines = [ diff --git a/Code/Editor/2DViewport.h b/Code/Editor/2DViewport.h index 4ffda18514..007c1a47d3 100644 --- a/Code/Editor/2DViewport.h +++ b/Code/Editor/2DViewport.h @@ -35,32 +35,32 @@ public: Q2DViewport(QWidget* parent = nullptr); virtual ~Q2DViewport(); - virtual void SetType(EViewportType type); - virtual EViewportType GetType() const { return m_viewType; } - virtual float GetAspectRatio() const { return 1.0f; }; + void SetType(EViewportType type) override; + EViewportType GetType() const override { return m_viewType; } + float GetAspectRatio() const override { return 1.0f; }; - virtual void ResetContent(); - virtual void UpdateContent(int flags); + void ResetContent() override; + void UpdateContent(int flags) override; public slots: // Called every frame to update viewport. - virtual void Update(); + void Update() override; public: //! Map world space position to viewport position. - virtual QPoint WorldToView(const Vec3& wp) const; + QPoint WorldToView(const Vec3& wp) const override; - virtual QPoint WorldToViewParticleEditor(const Vec3& wp, int width, int height) const; //Eric@conffx + QPoint WorldToViewParticleEditor(const Vec3& wp, int width, int height) const override; //Eric@conffx //! Map viewport position to world space position. - virtual Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override; + Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override; //! Map viewport position to world space ray from camera. - virtual void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const; + void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const override; void OnTitleMenu(QMenu* menu) override; - virtual bool HitTest(const QPoint& point, HitContext& hitInfo) override; - virtual bool IsBoundsVisible(const AABB& box) const; + bool HitTest(const QPoint& point, HitContext& hitInfo) override; + bool IsBoundsVisible(const AABB& box) const override; // ovverided from CViewport. float GetScreenScaleFactor(const Vec3& worldPoint) const override; @@ -111,8 +111,8 @@ protected: virtual void SetZoom(float fZoomFactor, const QPoint& center); // overrides from CViewport. - virtual void MakeConstructionPlane(int axis); - virtual const Matrix34& GetConstructionMatrix(RefCoordSys coordSys); + void MakeConstructionPlane(int axis) override; + const Matrix34& GetConstructionMatrix(RefCoordSys coordSys) override; //! Calculate view transformation matrix. virtual void CalculateViewTM(); @@ -146,9 +146,9 @@ protected: void showEvent(QShowEvent* event) override; void paintEvent(QPaintEvent* event) override; int OnCreate(); - void OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point); - void OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point); - void OnMouseWheel(Qt::KeyboardModifiers modifiers, short zDelta, const QPoint& pt); + void OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) override; + void OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) override; + void OnMouseWheel(Qt::KeyboardModifiers modifiers, short zDelta, const QPoint& pt) override; void OnDestroy(); protected: diff --git a/Code/Editor/ActionManager.h b/Code/Editor/ActionManager.h index 2481b7e3ef..8879bdc1fb 100644 --- a/Code/Editor/ActionManager.h +++ b/Code/Editor/ActionManager.h @@ -353,7 +353,7 @@ public: m_actionHandlers[id] = std::bind(method, object, id); } - bool eventFilter(QObject* watched, QEvent* event); + bool eventFilter(QObject* watched, QEvent* event) override; // returns false if the action was already inserted, indicating that the action should not be processed again bool InsertActionExecuting(int id); diff --git a/Code/Editor/AnimationContext.h b/Code/Editor/AnimationContext.h index 98c951eda7..62ffa26634 100644 --- a/Code/Editor/AnimationContext.h +++ b/Code/Editor/AnimationContext.h @@ -197,7 +197,7 @@ private: virtual void OnSequenceRemoved(CTrackViewSequence* pSequence) override; - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event); + virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override; void AnimateActiveSequence(); diff --git a/Code/Editor/BaseLibrary.h b/Code/Editor/BaseLibrary.h index 6c807df56b..55079d3fde 100644 --- a/Code/Editor/BaseLibrary.h +++ b/Code/Editor/BaseLibrary.h @@ -40,57 +40,57 @@ public: //! Set library name. virtual void SetName(const QString& name); //! Get library name. - const QString& GetName() const; + const QString& GetName() const override; //! Set new filename for this library. virtual bool SetFilename(const QString& filename, [[maybe_unused]] bool checkForUnique = true) { m_filename = filename.toLower(); return true; }; - const QString& GetFilename() const { return m_filename; }; + const QString& GetFilename() const override { return m_filename; }; - virtual bool Save() = 0; - virtual bool Load(const QString& filename) = 0; - virtual void Serialize(XmlNodeRef& node, bool bLoading) = 0; + bool Save() override = 0; + bool Load(const QString& filename) override = 0; + void Serialize(XmlNodeRef& node, bool bLoading) override = 0; //! Mark library as modified. - void SetModified(bool bModified = true); + void SetModified(bool bModified = true) override; //! Check if library was modified. - bool IsModified() const { return m_bModified; }; + bool IsModified() const override { return m_bModified; }; ////////////////////////////////////////////////////////////////////////// // Working with items. ////////////////////////////////////////////////////////////////////////// //! Add a new prototype to library. - void AddItem(IDataBaseItem* item, bool bRegister = true); + void AddItem(IDataBaseItem* item, bool bRegister = true) override; //! Get number of known prototypes. - int GetItemCount() const { return static_cast(m_items.size()); } + int GetItemCount() const override { return static_cast(m_items.size()); } //! Get prototype by index. - IDataBaseItem* GetItem(int index); + IDataBaseItem* GetItem(int index) override; //! Delete item by pointer of item. - void RemoveItem(IDataBaseItem* item); + void RemoveItem(IDataBaseItem* item) override; //! Delete all items from library. - void RemoveAllItems(); + void RemoveAllItems() override; //! Find library item by name. //! Using linear search. - IDataBaseItem* FindItem(const QString& name); + IDataBaseItem* FindItem(const QString& name) override; //! Check if this library is local level library. - bool IsLevelLibrary() const { return m_bLevelLib; }; + bool IsLevelLibrary() const override { return m_bLevelLib; }; //! Set library to be level library. - void SetLevelLibrary(bool bEnable) { m_bLevelLib = bEnable; }; + void SetLevelLibrary(bool bEnable) override { m_bLevelLib = bEnable; }; ////////////////////////////////////////////////////////////////////////// //! Return manager for this library. - IBaseLibraryManager* GetManager(); + IBaseLibraryManager* GetManager() override; // Saves the library with the main tag defined by the parameter name bool SaveLibrary(const char* name, bool saveEmptyLibrary = false); //CONFETTI BEGIN // Used to change the library item order - virtual void ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation) override; + void ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation) override; //CONFETTI END signals: diff --git a/Code/Editor/BaseLibraryManager.h b/Code/Editor/BaseLibraryManager.h index 6f0b905760..118c7ef1f0 100644 --- a/Code/Editor/BaseLibraryManager.h +++ b/Code/Editor/BaseLibraryManager.h @@ -35,112 +35,112 @@ public: ~CBaseLibraryManager(); //! Clear all libraries. - virtual void ClearAll() override; + void ClearAll() override; ////////////////////////////////////////////////////////////////////////// // IDocListener implementation. ////////////////////////////////////////////////////////////////////////// - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override; + void OnEditorNotifyEvent(EEditorNotifyEvent event) override; ////////////////////////////////////////////////////////////////////////// // Library items. ////////////////////////////////////////////////////////////////////////// //! Make a new item in specified library. - virtual IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) override; + IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) override; //! Delete item from library and manager. - virtual void DeleteItem(IDataBaseItem* pItem) override; + void DeleteItem(IDataBaseItem* pItem) override; //! Find Item by its GUID. - virtual IDataBaseItem* FindItem(REFGUID guid) const; - virtual IDataBaseItem* FindItemByName(const QString& fullItemName); - virtual IDataBaseItem* LoadItemByName(const QString& fullItemName); + IDataBaseItem* FindItem(REFGUID guid) const override; + IDataBaseItem* FindItemByName(const QString& fullItemName) override; + IDataBaseItem* LoadItemByName(const QString& fullItemName) override; virtual IDataBaseItem* FindItemByName(const char* fullItemName); virtual IDataBaseItem* LoadItemByName(const char* fullItemName); - virtual IDataBaseItemEnumerator* GetItemEnumerator() override; + IDataBaseItemEnumerator* GetItemEnumerator() override; ////////////////////////////////////////////////////////////////////////// // Set item currently selected. - virtual void SetSelectedItem(IDataBaseItem* pItem) override; + void SetSelectedItem(IDataBaseItem* pItem) override; // Get currently selected item. - virtual IDataBaseItem* GetSelectedItem() const override; - virtual IDataBaseItem* GetSelectedParentItem() const override; + IDataBaseItem* GetSelectedItem() const override; + IDataBaseItem* GetSelectedParentItem() const override; ////////////////////////////////////////////////////////////////////////// // Libraries. ////////////////////////////////////////////////////////////////////////// //! Add Item library. - virtual IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override; - virtual void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override; + IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override; + void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override; //! Get number of libraries. - virtual int GetLibraryCount() const override { return static_cast(m_libs.size()); }; + int GetLibraryCount() const override { return static_cast(m_libs.size()); }; //! Get number of modified libraries. - virtual int GetModifiedLibraryCount() const override; + int GetModifiedLibraryCount() const override; //! Get Item library by index. - virtual IDataBaseLibrary* GetLibrary(int index) const override; + IDataBaseLibrary* GetLibrary(int index) const override; //! Get Level Item library. - virtual IDataBaseLibrary* GetLevelLibrary() const override; + IDataBaseLibrary* GetLevelLibrary() const override; //! Find Items Library by name. - virtual IDataBaseLibrary* FindLibrary(const QString& library) override; + IDataBaseLibrary* FindLibrary(const QString& library) override; //! Find Items Library's index by name. int FindLibraryIndex(const QString& library) override; //! Load Items library. - virtual IDataBaseLibrary* LoadLibrary(const QString& filename, bool bReload = false) override; + IDataBaseLibrary* LoadLibrary(const QString& filename, bool bReload = false) override; //! Save all modified libraries. - virtual void SaveAllLibs() override; + void SaveAllLibs() override; //! Serialize property manager. - virtual void Serialize(XmlNodeRef& node, bool bLoading) override; + void Serialize(XmlNodeRef& node, bool bLoading) override; //! Export items to game. - virtual void Export([[maybe_unused]] XmlNodeRef& node) override {}; + void Export([[maybe_unused]] XmlNodeRef& node) override {}; //! Returns unique name base on input name. - virtual QString MakeUniqueItemName(const QString& name, const QString& libName = "") override; - virtual QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) override; + QString MakeUniqueItemName(const QString& name, const QString& libName = "") override; + QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) override; //! Root node where this library will be saved. - virtual QString GetRootNodeName() override = 0; + QString GetRootNodeName() override = 0; //! Path to libraries in this manager. - virtual QString GetLibsPath() override = 0; + QString GetLibsPath() override = 0; ////////////////////////////////////////////////////////////////////////// //! Validate library items for errors. - virtual void Validate() override; + void Validate() override; ////////////////////////////////////////////////////////////////////////// - virtual void GatherUsedResources(CUsedResources& resources) override; + void GatherUsedResources(CUsedResources& resources) override; - virtual void AddListener(IDataBaseManagerListener* pListener) override; - virtual void RemoveListener(IDataBaseManagerListener* pListener) override; + void AddListener(IDataBaseManagerListener* pListener) override; + void RemoveListener(IDataBaseManagerListener* pListener) override; ////////////////////////////////////////////////////////////////////////// - virtual void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) override; - virtual void RegisterItem(CBaseLibraryItem* pItem) override; - virtual void UnregisterItem(CBaseLibraryItem* pItem) override; + void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) override; + void RegisterItem(CBaseLibraryItem* pItem) override; + void UnregisterItem(CBaseLibraryItem* pItem) override; // Only Used internally. - virtual void OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName) override; + void OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName) override; // Called by items to indicated that they have been modified. // Sends item changed event to listeners. - virtual void OnItemChanged(IDataBaseItem* pItem) override; - virtual void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) override; + void OnItemChanged(IDataBaseItem* pItem) override; + void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) override; QString MakeFilename(const QString& library); - virtual bool IsUniqueFilename(const QString& library) override; + bool IsUniqueFilename(const QString& library) override; //CONFETTI BEGIN // Used to change the library item order - virtual void ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation) override; + void ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation) override; - virtual bool SetLibraryName(CBaseLibrary* lib, const QString& name) override; + bool SetLibraryName(CBaseLibrary* lib, const QString& name) override; protected: void SplitFullItemName(const QString& fullItemName, QString& libraryName, QString& itemName); @@ -199,8 +199,8 @@ public: m_pMap = pMap; m_iterator = m_pMap->begin(); } - virtual void Release() { delete this; }; - virtual IDataBaseItem* GetFirst() + void Release() override { delete this; }; + IDataBaseItem* GetFirst() override { m_iterator = m_pMap->begin(); if (m_iterator == m_pMap->end()) @@ -209,7 +209,7 @@ public: } return m_iterator->second; } - virtual IDataBaseItem* GetNext() + IDataBaseItem* GetNext() override { if (m_iterator != m_pMap->end()) { diff --git a/Code/Editor/Controls/ColorGradientCtrl.h b/Code/Editor/Controls/ColorGradientCtrl.h index a3f95fcd8c..bb1a83b0c1 100644 --- a/Code/Editor/Controls/ColorGradientCtrl.h +++ b/Code/Editor/Controls/ColorGradientCtrl.h @@ -81,7 +81,7 @@ protected: HIT_SPLINE, }; - void paintEvent(QPaintEvent* e); + void paintEvent(QPaintEvent* e) override; void resizeEvent(QResizeEvent* event) override; void mousePressEvent(QMouseEvent* event) override; void mouseReleaseEvent(QMouseEvent* event) override; diff --git a/Code/Editor/Controls/FolderTreeCtrl.h b/Code/Editor/Controls/FolderTreeCtrl.h index 48eff10a92..f74cca6143 100644 --- a/Code/Editor/Controls/FolderTreeCtrl.h +++ b/Code/Editor/Controls/FolderTreeCtrl.h @@ -83,7 +83,7 @@ protected Q_SLOTS: void OnIndexDoubleClicked(const QModelIndex& index); protected: - virtual void OnFileMonitorChange(const SFileChangeInfo& rChange); + void OnFileMonitorChange(const SFileChangeInfo& rChange) override; void contextMenuEvent(QContextMenuEvent* e) override; void InitTree(); diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h index 9c49f1ae1a..4bcd6dcaa3 100644 --- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h +++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h @@ -123,7 +123,7 @@ public: void SetVariable(IVariable* pVariable) override; void SyncReflectedVarToIVar(IVariable* pVariable) override; void SyncIVarToReflectedVar(IVariable* pVariable) override; - virtual void OnVariableChange(IVariable* var); + void OnVariableChange(IVariable* var) override; CReflectedVar* GetReflectedVar() override { return m_reflectedVar.data(); } protected: diff --git a/Code/Editor/Controls/SplineCtrlEx.h b/Code/Editor/Controls/SplineCtrlEx.h index 711cbcf8d4..9bf412f056 100644 --- a/Code/Editor/Controls/SplineCtrlEx.h +++ b/Code/Editor/Controls/SplineCtrlEx.h @@ -159,15 +159,15 @@ public: ////////////////////////////////////////////////////////////////////////// // IKeyTimeSet Implementation - virtual int GetKeyTimeCount() const; - virtual float GetKeyTime(int index) const; - virtual void MoveKeyTimes(int numChanges, int* indices, float scale, float offset, bool copyKeys); - virtual bool GetKeyTimeSelected(int index) const; - virtual void SetKeyTimeSelected(int index, bool selected); - virtual int GetKeyCount(int index) const; - virtual int GetKeyCountBound() const; - virtual void BeginEdittingKeyTimes(); - virtual void EndEdittingKeyTimes(); + int GetKeyTimeCount() const override; + float GetKeyTime(int index) const override; + void MoveKeyTimes(int numChanges, int* indices, float scale, float offset, bool copyKeys) override; + bool GetKeyTimeSelected(int index) const override; + void SetKeyTimeSelected(int index, bool selected) override; + int GetKeyCount(int index) const override; + int GetKeyCountBound() const override; + void BeginEdittingKeyTimes() override; + void EndEdittingKeyTimes() override; void SetEditLock(bool bLock) { m_bEditLock = bLock; } @@ -361,8 +361,8 @@ public: SplineWidget(QWidget* parent); virtual ~SplineWidget(); - void update() { QWidget::update(); } - void update(const QRect& rect) { QWidget::update(rect); } + void update() override { QWidget::update(); } + void update(const QRect& rect) override { QWidget::update(rect); } QPoint mapFromGlobal(const QPoint& point) const override { return QWidget::mapFromGlobal(point); } diff --git a/Code/Editor/Controls/TimelineCtrl.h b/Code/Editor/Controls/TimelineCtrl.h index f87bdf3410..7e1fc6fcb2 100644 --- a/Code/Editor/Controls/TimelineCtrl.h +++ b/Code/Editor/Controls/TimelineCtrl.h @@ -56,7 +56,7 @@ public: void setGeometry(const QRect& r) override { QWidget::setGeometry(r); } void SetTimeRange(const Range& r) { m_timeRange = r; } - void SetTimeMarker(float fTime); + void SetTimeMarker(float fTime) override; float GetTimeMarker() const { return m_fTimeMarker; } void SetZoom(float fZoom); @@ -113,7 +113,7 @@ protected: void OnLButtonUp(const QPoint& point, Qt::KeyboardModifiers modifiers); void OnRButtonDown(const QPoint& point, Qt::KeyboardModifiers modifiers); void OnRButtonUp(const QPoint& point, Qt::KeyboardModifiers modifiers); - void keyPressEvent(QKeyEvent* event); + void keyPressEvent(QKeyEvent* event) override; // Drawing functions float ClientToTime(int x); diff --git a/Code/Editor/CryEdit.h b/Code/Editor/CryEdit.h index 4ab37ac1e5..730af7c034 100644 --- a/Code/Editor/CryEdit.h +++ b/Code/Editor/CryEdit.h @@ -462,6 +462,7 @@ class CCryDocManager CCrySingleDocTemplate* m_pDefTemplate = nullptr; public: CCryDocManager(); + virtual ~CCryDocManager() = default; CCrySingleDocTemplate* SetDefaultTemplate(CCrySingleDocTemplate* pNew); // Copied from MFC to get rid of the silly ugly unoverridable doc-type pick dialog virtual void OnFileNew(); diff --git a/Code/Editor/Dialogs/PythonScriptsDialog.cpp b/Code/Editor/Dialogs/PythonScriptsDialog.cpp index 7c6b445387..e95fb90c0a 100644 --- a/Code/Editor/Dialogs/PythonScriptsDialog.cpp +++ b/Code/Editor/Dialogs/PythonScriptsDialog.cpp @@ -79,6 +79,8 @@ CPythonScriptsDialog::CPythonScriptsDialog(QWidget* parent) GetGemSourcePathsVisitor(AZ::SettingsRegistryInterface& settingsRegistry) : m_settingsRegistry(settingsRegistry) {} + + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override { diff --git a/Code/Editor/EditorToolsApplication.h b/Code/Editor/EditorToolsApplication.h index 93916cfc8c..422772cbc4 100644 --- a/Code/Editor/EditorToolsApplication.h +++ b/Code/Editor/EditorToolsApplication.h @@ -28,7 +28,7 @@ namespace EditorInternal void RegisterCoreComponents() override; - AZ::ComponentTypeList GetRequiredSystemComponents() const; + AZ::ComponentTypeList GetRequiredSystemComponents() const override; void StartCommon(AZ::Entity* systemEntity) override; diff --git a/Code/Editor/Export/ExportManager.h b/Code/Editor/Export/ExportManager.h index be81591e56..14318be957 100644 --- a/Code/Editor/Export/ExportManager.h +++ b/Code/Editor/Export/ExportManager.h @@ -36,8 +36,8 @@ namespace Export public: CMesh(); - virtual int GetFaceCount() const { return static_cast(m_faces.size()); } - virtual const Face* GetFaceBuffer() const { return m_faces.size() ? &m_faces[0] : 0; } + int GetFaceCount() const override { return static_cast(m_faces.size()); } + const Face* GetFaceBuffer() const override { return !m_faces.empty() ? &m_faces[0] : nullptr; } private: std::vector m_faces; @@ -54,13 +54,13 @@ namespace Export CObject(const char* pName); int GetVertexCount() const override { return static_cast(m_vertices.size()); } - const Vector3D* GetVertexBuffer() const override { return m_vertices.size() ? &m_vertices[0] : nullptr; } + const Vector3D* GetVertexBuffer() const override { return !m_vertices.empty() ? &m_vertices[0] : nullptr; } int GetNormalCount() const override { return static_cast(m_normals.size()); } - const Vector3D* GetNormalBuffer() const override { return m_normals.size() ? &m_normals[0] : nullptr; } + const Vector3D* GetNormalBuffer() const override { return !m_normals.empty() ? &m_normals[0] : nullptr; } int GetTexCoordCount() const override { return static_cast(m_texCoords.size()); } - const UV* GetTexCoordBuffer() const override { return m_texCoords.size() ? &m_texCoords[0] : nullptr; } + const UV* GetTexCoordBuffer() const override { return !m_texCoords.empty() ? &m_texCoords[0] : nullptr; } int GetMeshCount() const override { return static_cast(m_meshes.size()); } Mesh* GetMesh(int index) const override { return m_meshes[index]; } @@ -68,9 +68,9 @@ namespace Export size_t MeshHash() const override{return m_MeshHash; } void SetMaterialName(const char* pName); - virtual int GetEntityAnimationDataCount() const {return static_cast(m_entityAnimData.size()); } - virtual const EntityAnimData* GetEntityAnimationData(int index) const {return &m_entityAnimData[index]; } - virtual void SetEntityAnimationData(EntityAnimData entityData){ m_entityAnimData.push_back(entityData); }; + int GetEntityAnimationDataCount() const override {return static_cast(m_entityAnimData.size()); } + const EntityAnimData* GetEntityAnimationData(int index) const override {return &m_entityAnimData[index]; } + void SetEntityAnimationData(EntityAnimData entityData) override{ m_entityAnimData.push_back(entityData); }; void SetLastPtr(CBaseObject* pObject){m_pLastObject = pObject; }; CBaseObject* GetLastObjectPtr(){return m_pLastObject; }; @@ -92,9 +92,11 @@ namespace Export : public IData { public: - virtual int GetObjectCount() const { return static_cast(m_objects.size()); } - virtual Object* GetObject(int index) const { return m_objects[index]; } - virtual Object* AddObject(const char* objectName); + virtual ~CData() = default; + + int GetObjectCount() const override { return static_cast(m_objects.size()); } + Object* GetObject(int index) const override { return m_objects[index]; } + Object* AddObject(const char* objectName) override; void Clear(); private: @@ -117,7 +119,7 @@ public: //! Register exporter //! return true if succeed, otherwise false - virtual bool RegisterExporter(IExporter* pExporter); + bool RegisterExporter(IExporter* pExporter) override; //! Export specified geometry //! return true if succeed, otherwise false @@ -139,15 +141,15 @@ public: //! Exports the stat obj to the obj file specified //! returns true if succeeded, otherwise false - virtual bool ExportSingleStatObj(IStatObj* pStatObj, const char* filename); + bool ExportSingleStatObj(IStatObj* pStatObj, const char* filename) override; void SetBakedKeysSequenceExport(bool bBaked){m_bBakedKeysSequenceExport = bBaked; }; void SaveNodeKeysTimeToXML(); private: - void AddMesh(Export::CObject* pObj, const IIndexedMesh* pIndMesh, Matrix34A* pTm = 0); - bool AddStatObj(Export::CObject* pObj, IStatObj* pStatObj, Matrix34A* pTm = 0); + void AddMesh(Export::CObject* pObj, const IIndexedMesh* pIndMesh, Matrix34A* pTm = nullptr); + bool AddStatObj(Export::CObject* pObj, IStatObj* pStatObj, Matrix34A* pTm = nullptr); bool AddMeshes(Export::CObject* pObj); bool AddObject(CBaseObject* pBaseObj); void SolveHierarchy(); diff --git a/Code/Editor/IEditorImpl.h b/Code/Editor/IEditorImpl.h index 762dd1db11..26701edec2 100644 --- a/Code/Editor/IEditorImpl.h +++ b/Code/Editor/IEditorImpl.h @@ -79,70 +79,70 @@ public: void SetGameEngine(CGameEngine* ge); - void DeleteThis() { delete this; }; - IEditorClassFactory* GetClassFactory(); - CEditorCommandManager* GetCommandManager() { return m_pCommandManager; }; - ICommandManager* GetICommandManager() { return m_pCommandManager; } - void ExecuteCommand(const char* sCommand, ...); - void ExecuteCommand(const QString& command); - void SetDocument(CCryEditDoc* pDoc); - CCryEditDoc* GetDocument() const; + void DeleteThis() override { delete this; }; + IEditorClassFactory* GetClassFactory() override; + CEditorCommandManager* GetCommandManager() override { return m_pCommandManager; }; + ICommandManager* GetICommandManager() override { return m_pCommandManager; } + void ExecuteCommand(const char* sCommand, ...) override; + void ExecuteCommand(const QString& command) override; + void SetDocument(CCryEditDoc* pDoc) override; + CCryEditDoc* GetDocument() const override; bool IsLevelLoaded() const override; - void SetModifiedFlag(bool modified = true); - void SetModifiedModule(EModifiedModule eModifiedModule, bool boSet = true); - bool IsLevelExported() const; - bool SetLevelExported(bool boExported = true); + void SetModifiedFlag(bool modified = true) override; + void SetModifiedModule(EModifiedModule eModifiedModule, bool boSet = true) override; + bool IsLevelExported() const override; + bool SetLevelExported(bool boExported = true) override; void InitFinished(); - bool IsModified(); - bool IsInitialized() const{ return m_bInitialized; } - bool SaveDocument(); - ISystem* GetSystem(); - void WriteToConsole(const char* string) { CLogFile::WriteLine(string); }; - void WriteToConsole(const QString& string) { CLogFile::WriteLine(string); }; + bool IsModified() override; + bool IsInitialized() const override{ return m_bInitialized; } + bool SaveDocument() override; + ISystem* GetSystem() override; + void WriteToConsole(const char* string) override { CLogFile::WriteLine(string); }; + void WriteToConsole(const QString& string) override { CLogFile::WriteLine(string); }; // Change the message in the status bar - void SetStatusText(const QString& pszString); - virtual IMainStatusBar* GetMainStatusBar() override; - bool ShowConsole([[maybe_unused]] bool show) + void SetStatusText(const QString& pszString) override; + IMainStatusBar* GetMainStatusBar() override; + bool ShowConsole([[maybe_unused]] bool show) override { //if (AfxGetMainWnd())return ((CMainFrame *) (AfxGetMainWnd()))->ShowConsole(show); return false; } - void SetConsoleVar(const char* var, float value); - float GetConsoleVar(const char* var); + void SetConsoleVar(const char* var, float value) override; + float GetConsoleVar(const char* var) override; //! Query main window of the editor QMainWindow* GetEditorMainWindow() const override { return MainWindow::instance(); }; - QString GetPrimaryCDFolder(); + QString GetPrimaryCDFolder() override; QString GetLevelName() override; - QString GetLevelFolder(); - QString GetLevelDataFolder(); - QString GetSearchPath(EEditorPathName path); - QString GetResolvedUserFolder(); - bool ExecuteConsoleApp(const QString& CommandLine, QString& OutputText, bool bNoTimeOut = false, bool bShowWindow = false); - virtual bool IsInGameMode() override; - virtual void SetInGameMode(bool inGame) override; - virtual bool IsInSimulationMode() override; - virtual bool IsInTestMode() override; - virtual bool IsInPreviewMode() override; - virtual bool IsInConsolewMode() override; - virtual bool IsInLevelLoadTestMode() override; - virtual bool IsInMatEditMode() override { return m_bMatEditMode; } + QString GetLevelFolder() override; + QString GetLevelDataFolder() override; + QString GetSearchPath(EEditorPathName path) override; + QString GetResolvedUserFolder() override; + bool ExecuteConsoleApp(const QString& CommandLine, QString& OutputText, bool bNoTimeOut = false, bool bShowWindow = false) override; + bool IsInGameMode() override; + void SetInGameMode(bool inGame) override; + bool IsInSimulationMode() override; + bool IsInTestMode() override; + bool IsInPreviewMode() override; + bool IsInConsolewMode() override; + bool IsInLevelLoadTestMode() override; + bool IsInMatEditMode() override { return m_bMatEditMode; } //! Enables/Disable updates of editor. - void EnableUpdate(bool enable) { m_bUpdates = enable; }; + void EnableUpdate(bool enable) override { m_bUpdates = enable; }; //! Enable/Disable accelerator table, (Enabled by default). - void EnableAcceleratos(bool bEnable); - CGameEngine* GetGameEngine() { return m_pGameEngine; }; - CDisplaySettings* GetDisplaySettings() { return m_pDisplaySettings; }; - const SGizmoParameters& GetGlobalGizmoParameters(); - CBaseObject* NewObject(const char* typeName, const char* fileName = "", const char* name = "", float x = 0.0f, float y = 0.0f, float z = 0.0f, bool modifyDoc = true); - void DeleteObject(CBaseObject* obj); - CBaseObject* CloneObject(CBaseObject* obj); - IObjectManager* GetObjectManager(); + void EnableAcceleratos(bool bEnable) override; + CGameEngine* GetGameEngine() override { return m_pGameEngine; }; + CDisplaySettings* GetDisplaySettings() override { return m_pDisplaySettings; }; + const SGizmoParameters& GetGlobalGizmoParameters() override; + CBaseObject* NewObject(const char* typeName, const char* fileName = "", const char* name = "", float x = 0.0f, float y = 0.0f, float z = 0.0f, bool modifyDoc = true) override; + void DeleteObject(CBaseObject* obj) override; + CBaseObject* CloneObject(CBaseObject* obj) override; + IObjectManager* GetObjectManager() override; // This will return a null pointer if CrySystem is not loaded before // Global Sandbox Settings are loaded from the registry before CrySystem // At that stage GetSettingsManager will return null and xml node in @@ -150,27 +150,27 @@ public: // After m_IEditor is created and CrySystem loaded, it is possible // to feed memory node with all necessary data needed for export // (gSettings.Load() and CXTPDockingPaneManager/CXTPDockingPaneLayout Sandbox layout management) - CSettingsManager* GetSettingsManager(); - CSelectionGroup* GetSelection(); - int ClearSelection(); - CBaseObject* GetSelectedObject(); - void SelectObject(CBaseObject* obj); - void LockSelection(bool bLock); - bool IsSelectionLocked(); + CSettingsManager* GetSettingsManager() override; + CSelectionGroup* GetSelection() override; + int ClearSelection() override; + CBaseObject* GetSelectedObject() override; + void SelectObject(CBaseObject* obj) override; + void LockSelection(bool bLock) override; + bool IsSelectionLocked() override; - IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType); - CMusicManager* GetMusicManager() { return m_pMusicManager; }; + IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) override; + CMusicManager* GetMusicManager() override { return m_pMusicManager; }; IEditorFileMonitor* GetFileMonitor() override; void RegisterEventLoopHook(IEventLoopHook* pHook) override; void UnregisterEventLoopHook(IEventLoopHook* pHook) override; - IIconManager* GetIconManager(); - float GetTerrainElevation(float x, float y); - Editor::EditorQtApplication* GetEditorQtApplication() { return m_QtApplication; } + IIconManager* GetIconManager() override; + float GetTerrainElevation(float x, float y) override; + Editor::EditorQtApplication* GetEditorQtApplication() override { return m_QtApplication; } const QColor& GetColorByName(const QString& name) override; ////////////////////////////////////////////////////////////////////////// - IMovieSystem* GetMovieSystem() + IMovieSystem* GetMovieSystem() override { if (m_pSystem) { @@ -179,37 +179,37 @@ public: return nullptr; }; - CPluginManager* GetPluginManager() { return m_pPluginManager; } - CViewManager* GetViewManager(); - CViewport* GetActiveView(); - void SetActiveView(CViewport* viewport); + CPluginManager* GetPluginManager() override { return m_pPluginManager; } + CViewManager* GetViewManager() override; + CViewport* GetActiveView() override; + void SetActiveView(CViewport* viewport) override; - CLevelIndependentFileMan* GetLevelIndependentFileMan() { return m_pLevelIndependentFileMan; } + CLevelIndependentFileMan* GetLevelIndependentFileMan() override { return m_pLevelIndependentFileMan; } - void UpdateViews(int flags, const AABB* updateRegion); - void ResetViews(); - void ReloadTrackView(); - Vec3 GetMarkerPosition() { return m_marker; }; - void SetMarkerPosition(const Vec3& pos) { m_marker = pos; }; - void SetSelectedRegion(const AABB& box); - void GetSelectedRegion(AABB& box); + void UpdateViews(int flags, const AABB* updateRegion) override; + void ResetViews() override; + void ReloadTrackView() override; + Vec3 GetMarkerPosition() override { return m_marker; }; + void SetMarkerPosition(const Vec3& pos) override { m_marker = pos; }; + void SetSelectedRegion(const AABB& box) override; + void GetSelectedRegion(AABB& box) override; bool AddToolbarItem(uint8 iId, IUIEvent* pIHandler); - void SetDataModified(); - void SetOperationMode(EOperationMode mode); - EOperationMode GetOperationMode(); + void SetDataModified() override; + void SetOperationMode(EOperationMode mode) override; + EOperationMode GetOperationMode() override; - ITransformManipulator* ShowTransformManipulator(bool bShow); - ITransformManipulator* GetTransformManipulator(); - void SetAxisConstraints(AxisConstrains axis); - AxisConstrains GetAxisConstrains(); - void SetAxisVectorLock(bool bAxisVectorLock) { m_bAxisVectorLock = bAxisVectorLock; } - bool IsAxisVectorLocked() { return m_bAxisVectorLock; } - void SetTerrainAxisIgnoreObjects(bool bIgnore); - bool IsTerrainAxisIgnoreObjects(); - void SetReferenceCoordSys(RefCoordSys refCoords); - RefCoordSys GetReferenceCoordSys(); - XmlNodeRef FindTemplate(const QString& templateName); - void AddTemplate(const QString& templateName, XmlNodeRef& tmpl); + ITransformManipulator* ShowTransformManipulator(bool bShow) override; + ITransformManipulator* GetTransformManipulator() override; + void SetAxisConstraints(AxisConstrains axis) override; + AxisConstrains GetAxisConstrains() override; + void SetAxisVectorLock(bool bAxisVectorLock) override { m_bAxisVectorLock = bAxisVectorLock; } + bool IsAxisVectorLocked() override { return m_bAxisVectorLock; } + void SetTerrainAxisIgnoreObjects(bool bIgnore) override; + bool IsTerrainAxisIgnoreObjects() override; + void SetReferenceCoordSys(RefCoordSys refCoords) override; + RefCoordSys GetReferenceCoordSys() override; + XmlNodeRef FindTemplate(const QString& templateName) override; + void AddTemplate(const QString& templateName, XmlNodeRef& tmpl) override; const QtViewPane* OpenView(QString sViewClassName, bool reuseOpened = true) override; @@ -220,87 +220,87 @@ public: */ QWidget* FindView(QString viewClassName) override; - bool CloseView(const char* sViewClassName); - bool SetViewFocus(const char* sViewClassName); + bool CloseView(const char* sViewClassName) override; + bool SetViewFocus(const char* sViewClassName) override; - virtual QWidget* OpenWinWidget(WinWidgetId openId) override; - virtual WinWidget::WinWidgetManager* GetWinWidgetManager() const override; + QWidget* OpenWinWidget(WinWidgetId openId) override; + WinWidget::WinWidgetManager* GetWinWidgetManager() const override; // close ALL panels related to classId, used when unloading plugins. - void CloseView(const GUID& classId); + void CloseView(const GUID& classId) override; bool SelectColor(QColor &color, QWidget *parent = 0) override; void Update(); - SFileVersion GetFileVersion() { return m_fileVersion; }; - SFileVersion GetProductVersion() { return m_productVersion; }; + SFileVersion GetFileVersion() override { return m_fileVersion; }; + SFileVersion GetProductVersion() override { return m_productVersion; }; //! Get shader enumerator. - CUndoManager* GetUndoManager() { return m_pUndoManager; }; - void BeginUndo(); - void RestoreUndo(bool undo); - void AcceptUndo(const QString& name); - void CancelUndo(); - void SuperBeginUndo(); - void SuperAcceptUndo(const QString& name); - void SuperCancelUndo(); - void SuspendUndo(); - void ResumeUndo(); - void Undo(); - void Redo(); - bool IsUndoRecording(); - bool IsUndoSuspended(); - void RecordUndo(IUndoObject* obj); - bool FlushUndo(bool isShowMessage = false); - bool ClearLastUndoSteps(int steps); - bool ClearRedoStack(); + CUndoManager* GetUndoManager() override { return m_pUndoManager; }; + void BeginUndo() override; + void RestoreUndo(bool undo) override; + void AcceptUndo(const QString& name) override; + void CancelUndo() override; + void SuperBeginUndo() override; + void SuperAcceptUndo(const QString& name) override; + void SuperCancelUndo() override; + void SuspendUndo() override; + void ResumeUndo() override; + void Undo() override; + void Redo() override; + bool IsUndoRecording() override; + bool IsUndoSuspended() override; + void RecordUndo(IUndoObject* obj) override; + bool FlushUndo(bool isShowMessage = false) override; + bool ClearLastUndoSteps(int steps) override; + bool ClearRedoStack() override; //! Retrieve current animation context. - CAnimationContext* GetAnimation(); + CAnimationContext* GetAnimation() override; CTrackViewSequenceManager* GetSequenceManager() override; ITrackViewSequenceManager* GetSequenceManagerInterface() override; - CToolBoxManager* GetToolBoxManager() { return m_pToolBoxManager; }; - IErrorReport* GetErrorReport() { return m_pErrorReport; } - IErrorReport* GetLastLoadedLevelErrorReport() { return m_pLasLoadedLevelErrorReport; } + CToolBoxManager* GetToolBoxManager() override { return m_pToolBoxManager; }; + IErrorReport* GetErrorReport() override { return m_pErrorReport; } + IErrorReport* GetLastLoadedLevelErrorReport() override { return m_pLasLoadedLevelErrorReport; } void StartLevelErrorReportRecording() override; - void CommitLevelErrorReport() {SAFE_DELETE(m_pLasLoadedLevelErrorReport); m_pLasLoadedLevelErrorReport = new CErrorReport(*m_pErrorReport); } - virtual IFileUtil* GetFileUtil() override { return m_pFileUtil; } - void Notify(EEditorNotifyEvent event); - void NotifyExcept(EEditorNotifyEvent event, IEditorNotifyListener* listener); - void RegisterNotifyListener(IEditorNotifyListener* listener); - void UnregisterNotifyListener(IEditorNotifyListener* listener); + void CommitLevelErrorReport() override {SAFE_DELETE(m_pLasLoadedLevelErrorReport); m_pLasLoadedLevelErrorReport = new CErrorReport(*m_pErrorReport); } + IFileUtil* GetFileUtil() override { return m_pFileUtil; } + void Notify(EEditorNotifyEvent event) override; + void NotifyExcept(EEditorNotifyEvent event, IEditorNotifyListener* listener) override; + void RegisterNotifyListener(IEditorNotifyListener* listener) override; + void UnregisterNotifyListener(IEditorNotifyListener* listener) override; //! Register document notifications listener. - void RegisterDocListener(IDocListener* listener); + void RegisterDocListener(IDocListener* listener) override; //! Unregister document notifications listener. - void UnregisterDocListener(IDocListener* listener); + void UnregisterDocListener(IDocListener* listener) override; //! Retrieve interface to the source control. - ISourceControl* GetSourceControl(); + ISourceControl* GetSourceControl() override; //! Retrieve true if source control is provided and enabled in settings bool IsSourceControlAvailable() override; //! Only returns true if source control is both available AND currently connected and functioning bool IsSourceControlConnected() override; //! Setup Material Editor mode void SetMatEditMode(bool bIsMatEditMode); - CUIEnumsDatabase* GetUIEnumsDatabase() { return m_pUIEnumsDatabase; }; - void AddUIEnums(); - void ReduceMemory(); + CUIEnumsDatabase* GetUIEnumsDatabase() override { return m_pUIEnumsDatabase; }; + void AddUIEnums() override; + void ReduceMemory() override; // Get Export manager - IExportManager* GetExportManager(); + IExportManager* GetExportManager() override; // Set current configuration spec of the editor. - void SetEditorConfigSpec(ESystemConfigSpec spec, ESystemConfigPlatform platform); - ESystemConfigSpec GetEditorConfigSpec() const; - ESystemConfigPlatform GetEditorConfigPlatform() const; - void ReloadTemplates(); + void SetEditorConfigSpec(ESystemConfigSpec spec, ESystemConfigPlatform platform) override; + ESystemConfigSpec GetEditorConfigSpec() const override; + ESystemConfigPlatform GetEditorConfigPlatform() const override; + void ReloadTemplates() override; void AddErrorMessage(const QString& text, const QString& caption); - virtual void ShowStatusText(bool bEnable); + void ShowStatusText(bool bEnable) override; void OnObjectContextMenuOpened(QMenu* pMenu, const CBaseObject* pObject); - virtual void RegisterObjectContextMenuExtension(TContextMenuExtensionFunc func) override; + void RegisterObjectContextMenuExtension(TContextMenuExtensionFunc func) override; - virtual SSystemGlobalEnvironment* GetEnv() override; - virtual IBaseLibraryManager* GetMaterialManagerLibrary() override; // Vladimir@Conffx - virtual IEditorMaterialManager* GetIEditorMaterialManager() override; // Vladimir@Conffx - virtual IImageUtil* GetImageUtil() override; // Vladimir@conffx - virtual SEditorSettings* GetEditorSettings() override; - virtual IEditorPanelUtils* GetEditorPanelUtils() override; - virtual ILogFile* GetLogFile() override { return m_pLogFile; } + SSystemGlobalEnvironment* GetEnv() override; + IBaseLibraryManager* GetMaterialManagerLibrary() override; // Vladimir@Conffx + IEditorMaterialManager* GetIEditorMaterialManager() override; // Vladimir@Conffx + IImageUtil* GetImageUtil() override; // Vladimir@conffx + SEditorSettings* GetEditorSettings() override; + IEditorPanelUtils* GetEditorPanelUtils() override; + ILogFile* GetLogFile() override { return m_pLogFile; } void UnloadPlugins() override; void LoadPlugins() override; diff --git a/Code/Editor/LevelTreeModel.h b/Code/Editor/LevelTreeModel.h index 4f0e36a311..7cc5cf5496 100644 --- a/Code/Editor/LevelTreeModel.h +++ b/Code/Editor/LevelTreeModel.h @@ -23,7 +23,7 @@ class LevelTreeModelFilter Q_OBJECT public: explicit LevelTreeModelFilter(QObject* parent = nullptr); - bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const; + bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override; void setFilterText(const QString&); QVariant data(const QModelIndex& index, int role) const override; private: diff --git a/Code/Editor/Lib/Tests/IEditorMock.h b/Code/Editor/Lib/Tests/IEditorMock.h index cb01757b9c..390ffebe79 100644 --- a/Code/Editor/Lib/Tests/IEditorMock.h +++ b/Code/Editor/Lib/Tests/IEditorMock.h @@ -25,6 +25,8 @@ public: } public: + virtual ~CEditorMock() = default; + MOCK_METHOD0(DeleteThis, void()); MOCK_METHOD0(GetSystem, ISystem*()); MOCK_METHOD0(GetClassFactory, IEditorClassFactory* ()); diff --git a/Code/Editor/Objects/AxisGizmo.h b/Code/Editor/Objects/AxisGizmo.h index dfd35388b6..bab667a629 100644 --- a/Code/Editor/Objects/AxisGizmo.h +++ b/Code/Editor/Objects/AxisGizmo.h @@ -35,21 +35,21 @@ public: ////////////////////////////////////////////////////////////////////////// // Ovverides from CGizmo ////////////////////////////////////////////////////////////////////////// - virtual void GetWorldBounds(AABB& bbox); - virtual void Display(DisplayContext& dc); - virtual bool HitTest(HitContext& hc); - virtual const Matrix34& GetMatrix() const; + void GetWorldBounds(AABB& bbox) override; + void Display(DisplayContext& dc) override; + bool HitTest(HitContext& hc) override; + const Matrix34& GetMatrix() const override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // ITransformManipulator implementation. ////////////////////////////////////////////////////////////////////////// - virtual Matrix34 GetTransformation(RefCoordSys coordSys, IDisplayViewport* view = nullptr) const; - virtual void SetTransformation(RefCoordSys coordSys, const Matrix34& tm); - virtual bool HitTestManipulator(HitContext& hc); - virtual bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int nFlags); - virtual void SetAlwaysUseLocal(bool on) + Matrix34 GetTransformation(RefCoordSys coordSys, IDisplayViewport* view = nullptr) const override; + void SetTransformation(RefCoordSys coordSys, const Matrix34& tm) override; + bool HitTestManipulator(HitContext& hc) override; + bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int nFlags) override; + void SetAlwaysUseLocal(bool on) override { m_bAlwaysUseLocal = on; } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/Objects/BaseObject.h b/Code/Editor/Objects/BaseObject.h index ea58b4e78d..3865696ecb 100644 --- a/Code/Editor/Objects/BaseObject.h +++ b/Code/Editor/Objects/BaseObject.h @@ -712,7 +712,7 @@ protected: // May be overridden in derived classes to handle helpers scaling. ////////////////////////////////////////////////////////////////////////// virtual void SetHelperScale([[maybe_unused]] float scale) {}; - virtual float GetHelperScale() { return 1; }; + virtual float GetHelperScale() { return 1.0f; }; void SetNameInternal(const QString& name) { m_name = name; } @@ -743,9 +743,6 @@ private: //! Only called once after creation by ObjectManager. void SetClassDesc(CObjectClassDesc* classDesc); - // From CObject, (not implemented) - virtual void Serialize([[maybe_unused]] CArchive& ar) {}; - EScaleWarningLevel GetScaleWarningLevel() const; ERotationWarningLevel GetRotationWarningLevel() const; diff --git a/Code/Editor/Objects/EntityObject.h b/Code/Editor/Objects/EntityObject.h index d5600d15b7..dcc6ff7b22 100644 --- a/Code/Editor/Objects/EntityObject.h +++ b/Code/Editor/Objects/EntityObject.h @@ -82,14 +82,14 @@ public: // Overrides from CBaseObject. ////////////////////////////////////////////////////////////////////////// //! Return type name of Entity. - QString GetTypeDescription() const { return GetEntityClass(); }; + QString GetTypeDescription() const override { return GetEntityClass(); }; ////////////////////////////////////////////////////////////////////////// - bool IsSameClass(CBaseObject* obj); + bool IsSameClass(CBaseObject* obj) override; - virtual bool Init(IEditor* ie, CBaseObject* prev, const QString& file); - virtual void InitVariables(); - virtual void Done(); + bool Init(IEditor* ie, CBaseObject* prev, const QString& file) override; + void InitVariables() override; + void Done() override; void DrawExtraLightInfo (DisplayContext& disp); @@ -102,29 +102,30 @@ public: void SetEntityPropertyFloat(const char* name, float value); void SetEntityPropertyString(const char* name, const QString& value); - virtual int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags); - virtual void OnContextMenu(QMenu* menu); + int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags) override; + void OnContextMenu(QMenu* menu) override; - void SetName(const QString& name); - void SetSelected(bool bSelect); + void SetName(const QString& name) override; + void SetSelected(bool bSelect) override; - virtual void GetLocalBounds(AABB& box); + void GetLocalBounds(AABB& box) override; - virtual bool HitTest(HitContext& hc); - virtual bool HitHelperTest(HitContext& hc); - virtual bool HitTestRect(HitContext& hc); - void UpdateVisibility(bool bVisible); - bool ConvertFromObject(CBaseObject* object); + bool HitTest(HitContext& hc) override; + bool HitHelperTest(HitContext& hc) override; + bool HitTestRect(HitContext& hc) override; + void UpdateVisibility(bool bVisible) override; + bool ConvertFromObject(CBaseObject* object) override; - virtual void Serialize(CObjectArchive& ar); - virtual void PostLoad(CObjectArchive& ar); + using CBaseObject::Serialize; + void Serialize(CObjectArchive& ar) override; + void PostLoad(CObjectArchive& ar) override; - XmlNodeRef Export(const QString& levelPath, XmlNodeRef& xmlNode); + XmlNodeRef Export(const QString& levelPath, XmlNodeRef& xmlNode) override; ////////////////////////////////////////////////////////////////////////// - void OnEvent(ObjectEvent event); + void OnEvent(ObjectEvent event) override; - virtual void SetTransformDelegate(ITransformDelegate* pTransformDelegate) override; + void SetTransformDelegate(ITransformDelegate* pTransformDelegate) override; // Set attach flags and target enum EAttachmentType @@ -139,15 +140,15 @@ public: EAttachmentType GetAttachType() const { return m_attachmentType; } QString GetAttachTarget() const { return m_attachmentTarget; } - virtual void SetHelperScale(float scale); - virtual float GetHelperScale(); + void SetHelperScale(float scale) override; + float GetHelperScale() override; - virtual void GatherUsedResources(CUsedResources& resources); - virtual bool IsSimilarObject(CBaseObject* pObject); + void GatherUsedResources(CUsedResources& resources) override; + bool IsSimilarObject(CBaseObject* pObject) override; - virtual bool HasMeasurementAxis() const { return false; } + bool HasMeasurementAxis() const override { return false; } - virtual bool IsIsolated() const { return false; } + bool IsIsolated() const override { return false; } ////////////////////////////////////////////////////////////////////////// // END CBaseObject @@ -232,7 +233,7 @@ protected: ////////////////////////////////////////////////////////////////////////// //! Must be called after cloning the object on clone of object. //! This will make sure object references are cloned correctly. - virtual void PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx); + void PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx) override; //! Draw default object items. void DrawProjectorPyramid(DisplayContext& dc, float dist); @@ -264,7 +265,7 @@ public: } protected: - void DeleteThis() { delete this; }; + void DeleteThis() override { delete this; }; ////////////////////////////////////////////////////////////////////////// // Radius callbacks. diff --git a/Code/Editor/Objects/GizmoManager.h b/Code/Editor/Objects/GizmoManager.h index c3a71ad81b..efc3e99205 100644 --- a/Code/Editor/Objects/GizmoManager.h +++ b/Code/Editor/Objects/GizmoManager.h @@ -23,14 +23,14 @@ class CGizmoManager : public IGizmoManager { public: - void AddGizmo(CGizmo* gizmo); - void RemoveGizmo(CGizmo* gizmo); + void AddGizmo(CGizmo* gizmo) override; + void RemoveGizmo(CGizmo* gizmo) override; int GetGizmoCount() const override; CGizmo* GetGizmoByIndex(int nIndex) const override; - void Display(DisplayContext& dc); - bool HitTest(HitContext& hc); + void Display(DisplayContext& dc) override; + bool HitTest(HitContext& hc) override; void DeleteAllTransformManipulators(); diff --git a/Code/Editor/Objects/LineGizmo.h b/Code/Editor/Objects/LineGizmo.h index af3b38b199..e50f044f3c 100644 --- a/Code/Editor/Objects/LineGizmo.h +++ b/Code/Editor/Objects/LineGizmo.h @@ -30,10 +30,10 @@ public: ////////////////////////////////////////////////////////////////////////// // Ovverides from CGizmo ////////////////////////////////////////////////////////////////////////// - virtual void SetName(const char* sName); - virtual void GetWorldBounds(AABB& bbox); - virtual void Display(DisplayContext& dc); - virtual bool HitTest(HitContext& hc); + void SetName(const char* sName) override; + void GetWorldBounds(AABB& bbox) override; + void Display(DisplayContext& dc) override; + bool HitTest(HitContext& hc) override; ////////////////////////////////////////////////////////////////////////// void SetObjects(CBaseObject* pObject1, CBaseObject* pObject2, const QString& boneName = ""); diff --git a/Code/Editor/Objects/ObjectManager.cpp b/Code/Editor/Objects/ObjectManager.cpp index e053d10fd1..06aa8866b3 100644 --- a/Code/Editor/Objects/ObjectManager.cpp +++ b/Code/Editor/Objects/ObjectManager.cpp @@ -52,6 +52,7 @@ public: GUID guid; public: + virtual ~CXMLObjectClassDesc() = default; REFGUID ClassID() override { return guid; diff --git a/Code/Editor/Objects/ObjectManager.h b/Code/Editor/Objects/ObjectManager.h index de0a4ce849..4ffa5e9a07 100644 --- a/Code/Editor/Objects/ObjectManager.h +++ b/Code/Editor/Objects/ObjectManager.h @@ -103,142 +103,142 @@ public: void RegisterObjectClasses(); - CBaseObject* NewObject(CObjectClassDesc* cls, CBaseObject* prev = 0, const QString& file = "", const char* newObjectName = nullptr); - CBaseObject* NewObject(const QString& typeName, CBaseObject* prev = 0, const QString& file = "", const char* newEntityName = nullptr); + CBaseObject* NewObject(CObjectClassDesc* cls, CBaseObject* prev = 0, const QString& file = "", const char* newObjectName = nullptr) override; + CBaseObject* NewObject(const QString& typeName, CBaseObject* prev = 0, const QString& file = "", const char* newEntityName = nullptr) override; - void DeleteObject(CBaseObject* obj); - void DeleteSelection(CSelectionGroup* pSelection); - void DeleteAllObjects(); - CBaseObject* CloneObject(CBaseObject* obj); + void DeleteObject(CBaseObject* obj) override; + void DeleteSelection(CSelectionGroup* pSelection) override; + void DeleteAllObjects() override; + CBaseObject* CloneObject(CBaseObject* obj) override; - void BeginEditParams(CBaseObject* obj, int flags); - void EndEditParams(int flags = 0); + void BeginEditParams(CBaseObject* obj, int flags) override; + void EndEditParams(int flags = 0) override; // Hides all transform manipulators. void HideTransformManipulators(); //! Get number of objects manager by ObjectManager (not contain sub objects of groups). - int GetObjectCount() const; + int GetObjectCount() const override; //! Get array of objects, managed by manager (not contain sub objects of groups). //! @param layer if 0 get objects for all layers, or layer to get objects from. - void GetObjects(CBaseObjectsArray& objects) const; + void GetObjects(CBaseObjectsArray& objects) const override; //! Get array of objects that pass the filter. //! @param filter The filter functor, return true if you want to get the certain obj, return false if want to skip it. - void GetObjects(CBaseObjectsArray& objects, BaseObjectFilterFunctor const& filter) const; + void GetObjects(CBaseObjectsArray& objects, BaseObjectFilterFunctor const& filter) const override; //! Update objects. void Update(); //! Display objects on display context. - void Display(DisplayContext& dc); + void Display(DisplayContext& dc) override; //! Called when selecting without selection helpers - this is needed since //! the visible object cache is normally not updated when not displaying helpers. - void ForceUpdateVisibleObjectCache(DisplayContext& dc); + void ForceUpdateVisibleObjectCache(DisplayContext& dc) override; //! Check intersection with objects. //! Find intersection with nearest to ray origin object hit by ray. //! If distance tollerance is specified certain relaxation applied on collision test. //! @return true if hit any object, and fills hitInfo structure. - bool HitTest(HitContext& hitInfo); + bool HitTest(HitContext& hitInfo) override; //! Check intersection with an object. //! @return true if hit, and fills hitInfo structure. - bool HitTestObject(CBaseObject* obj, HitContext& hc); + bool HitTestObject(CBaseObject* obj, HitContext& hc) override; //! Send event to all objects. //! Will cause OnEvent handler to be called on all objects. - void SendEvent(ObjectEvent event); + void SendEvent(ObjectEvent event) override; //! Send event to all objects within given bounding box. //! Will cause OnEvent handler to be called on objects within bounding box. - void SendEvent(ObjectEvent event, const AABB& bounds); + void SendEvent(ObjectEvent event, const AABB& bounds) override; ////////////////////////////////////////////////////////////////////////// //! Find object by ID. - CBaseObject* FindObject(REFGUID guid) const; + CBaseObject* FindObject(REFGUID guid) const override; ////////////////////////////////////////////////////////////////////////// //! Find object by name. - CBaseObject* FindObject(const QString& sName) const; + CBaseObject* FindObject(const QString& sName) const override; ////////////////////////////////////////////////////////////////////////// //! Find objects of given type. void FindObjectsOfType(const QMetaObject* pClass, std::vector& result) override; void FindObjectsOfType(ObjectType type, std::vector& result) override; ////////////////////////////////////////////////////////////////////////// //! Find objects which intersect with a given AABB. - virtual void FindObjectsInAABB(const AABB& aabb, std::vector& result) const; + void FindObjectsInAABB(const AABB& aabb, std::vector& result) const override; ////////////////////////////////////////////////////////////////////////// // Operations on objects. ////////////////////////////////////////////////////////////////////////// //! Makes object visible or invisible. - void HideObject(CBaseObject* obj, bool hide); + void HideObject(CBaseObject* obj, bool hide) override; //! Shows the last hidden object based on hidden ID - void ShowLastHiddenObject(); + void ShowLastHiddenObject() override; //! Freeze object, making it unselectable. - void FreezeObject(CBaseObject* obj, bool freeze); + void FreezeObject(CBaseObject* obj, bool freeze) override; //! Unhide all hidden objects. - void UnhideAll(); + void UnhideAll() override; //! Unfreeze all frozen objects. - void UnfreezeAll(); + void UnfreezeAll() override; ////////////////////////////////////////////////////////////////////////// // Object Selection. ////////////////////////////////////////////////////////////////////////// - bool SelectObject(CBaseObject* obj, bool bUseMask = true); - void UnselectObject(CBaseObject* obj); + bool SelectObject(CBaseObject* obj, bool bUseMask = true) override; + void UnselectObject(CBaseObject* obj) override; //! Select objects within specified distance from given position. //! Return number of selected objects. - int SelectObjects(const AABB& box, bool bUnselect = false); + int SelectObjects(const AABB& box, bool bUnselect = false) override; - virtual void SelectEntities(std::set& s); + void SelectEntities(std::set& s) override; - int MoveObjects(const AABB& box, const Vec3& offset, ImageRotationDegrees rotation, bool bIsCopy = false); + int MoveObjects(const AABB& box, const Vec3& offset, ImageRotationDegrees rotation, bool bIsCopy = false) override; //! Selects/Unselects all objects within 2d rectangle in given viewport. - void SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect); - void FindObjectsInRect(CViewport* view, const QRect& rect, std::vector& guids); + void SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect) override; + void FindObjectsInRect(CViewport* view, const QRect& rect, std::vector& guids) override; //! Clear default selection set. //! @Return number of objects removed from selection. - int ClearSelection(); + int ClearSelection() override; //! Deselect all current selected objects and selects object that were unselected. //! @Return number of selected objects. - int InvertSelection(); + int InvertSelection() override; //! Get current selection. - CSelectionGroup* GetSelection() const { return m_currSelection; }; + CSelectionGroup* GetSelection() const override { return m_currSelection; }; //! Get named selection. - CSelectionGroup* GetSelection(const QString& name) const; + CSelectionGroup* GetSelection(const QString& name) const override; // Get selection group names - void GetNameSelectionStrings(QStringList& names); + void GetNameSelectionStrings(QStringList& names) override; //! Change name of current selection group. //! And store it in list. - void NameSelection(const QString& name); + void NameSelection(const QString& name) override; //! Set one of name selections as current selection. - void SetSelection(const QString& name); - void RemoveSelection(const QString& name); + void SetSelection(const QString& name) override; + void RemoveSelection(const QString& name) override; bool IsObjectDeletionAllowed(CBaseObject* pObject); //! Delete all objects in selection group. - void DeleteSelection(); + void DeleteSelection() override; - uint32 ForceID() const{return m_ForceID; } - void ForceID(uint32 FID){m_ForceID = FID; } + uint32 ForceID() const override{return m_ForceID; } + void ForceID(uint32 FID) override{m_ForceID = FID; } //! Generates uniq name base on type name of object. - QString GenerateUniqueObjectName(const QString& typeName); + QString GenerateUniqueObjectName(const QString& typeName) override; //! Register object name in object manager, needed for generating uniq names. - void RegisterObjectName(const QString& name); + void RegisterObjectName(const QString& name) override; //! Decrease name number and remove if it was last in object manager, needed for generating uniq names. void UpdateRegisterObjectName(const QString& name); //! Enable/Disable generating of unique object names (Enabled by default). //! Return previous value. - bool EnableUniqObjectNames(bool bEnable); + bool EnableUniqObjectNames(bool bEnable) override; //! Register XML template of runtime class. void RegisterClassTemplate(const XmlNodeRef& templ); @@ -249,25 +249,25 @@ public: void RegisterCVars(); //! Find object class by name. - CObjectClassDesc* FindClass(const QString& className); - void GetClassCategories(QStringList& categories); + CObjectClassDesc* FindClass(const QString& className) override; + void GetClassCategories(QStringList& categories) override; void GetClassCategoryToolClassNamePairs(std::vector< std::pair >& categoryToolClassNamePairs) override; - void GetClassTypes(const QString& category, QStringList& types); + void GetClassTypes(const QString& category, QStringList& types) override; //! Export objects to xml. //! When onlyShared is true ony objects with shared flags exported, overwise only not shared object exported. - void Export(const QString& levelPath, XmlNodeRef& rootNode, bool onlyShared); - void ExportEntities(XmlNodeRef& rootNode); + void Export(const QString& levelPath, XmlNodeRef& rootNode, bool onlyShared) override; + void ExportEntities(XmlNodeRef& rootNode) override; //! Serialize Objects in manager to specified XML Node. //! @param flags Can be one of SerializeFlags. - void Serialize(XmlNodeRef& rootNode, bool bLoading, int flags = SERIALIZE_ALL); + void Serialize(XmlNodeRef& rootNode, bool bLoading, int flags = SERIALIZE_ALL) override; - void SerializeNameSelection(XmlNodeRef& rootNode, bool bLoading); + void SerializeNameSelection(XmlNodeRef& rootNode, bool bLoading) override; //! Load objects from object archive. //! @param bSelect if set newly loaded object will be selected. - void LoadObjects(CObjectArchive& ar, bool bSelect); + void LoadObjects(CObjectArchive& ar, bool bSelect) override; //! Delete from Object manager all objects without SHARED flag. void DeleteNotSharedObjects(); @@ -276,57 +276,57 @@ public: bool AddObject(CBaseObject* obj); void RemoveObject(CBaseObject* obj); - void ChangeObjectId(REFGUID oldId, REFGUID newId); - bool IsDuplicateObjectName(const QString& newName) const + void ChangeObjectId(REFGUID oldId, REFGUID newId) override; + bool IsDuplicateObjectName(const QString& newName) const override { return FindObject(newName) ? true : false; } - void ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const; - void ChangeObjectName(CBaseObject* obj, const QString& newName); + void ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const override; + void ChangeObjectName(CBaseObject* obj, const QString& newName) override; //! Convert object of one type to object of another type. //! Original object is deleted. - bool ConvertToType(CBaseObject* pObject, const QString& typeName); + bool ConvertToType(CBaseObject* pObject, const QString& typeName) override; //! Set new selection callback. //! @return previous selection callback. - IObjectSelectCallback* SetSelectCallback(IObjectSelectCallback* callback); + IObjectSelectCallback* SetSelectCallback(IObjectSelectCallback* callback) override; // Enables/Disables creating of game objects. - void SetCreateGameObject(bool enable) { m_createGameObjects = enable; }; + void SetCreateGameObject(bool enable) override { m_createGameObjects = enable; }; //! Return true if objects loaded from xml should immidiatly create game objects associated with them. - bool IsCreateGameObjects() const { return m_createGameObjects; }; + bool IsCreateGameObjects() const override { return m_createGameObjects; }; ////////////////////////////////////////////////////////////////////////// //! Get access to gizmo manager. - IGizmoManager* GetGizmoManager(); + IGizmoManager* GetGizmoManager() override; ////////////////////////////////////////////////////////////////////////// //! Invalidate visibily settings of objects. - void InvalidateVisibleList(); + void InvalidateVisibleList() override; ////////////////////////////////////////////////////////////////////////// // ObjectManager notification Callbacks. ////////////////////////////////////////////////////////////////////////// - void AddObjectEventListener(EventListener* listener); - void RemoveObjectEventListener(EventListener* listener); + void AddObjectEventListener(EventListener* listener) override; + void RemoveObjectEventListener(EventListener* listener) override; ////////////////////////////////////////////////////////////////////////// // Used to indicate starting and ending of objects loading. ////////////////////////////////////////////////////////////////////////// - void StartObjectsLoading(int numObjects); - void EndObjectsLoading(); + void StartObjectsLoading(int numObjects) override; + void EndObjectsLoading() override; ////////////////////////////////////////////////////////////////////////// // Gathers all resources used by all objects. - void GatherUsedResources(CUsedResources& resources); + void GatherUsedResources(CUsedResources& resources) override; - virtual bool IsLightClass(CBaseObject* pObject); + bool IsLightClass(CBaseObject* pObject) override; - virtual void FindAndRenameProperty2(const char* property2Name, const QString& oldValue, const QString& newValue); - virtual void FindAndRenameProperty2If(const char* property2Name, const QString& oldValue, const QString& newValue, const char* otherProperty2Name, const QString& otherValue); + virtual void FindAndRenameProperty2(const char* property2Name, const QString& oldValue, const QString& newValue) override; + virtual void FindAndRenameProperty2If(const char* property2Name, const QString& oldValue, const QString& newValue, const char* otherProperty2Name, const QString& otherValue) override; - bool IsReloading() const { return m_bInReloading; } + bool IsReloading() const override { return m_bInReloading; } void SetSkipUpdate(bool bSkipUpdate) override { m_bSkipObjectUpdate = bSkipUpdate; } void SetExportingLevel(bool bExporting) override { m_bLevelExporting = bExporting; } @@ -341,7 +341,7 @@ private: @param objectNode Xml node to serialize object info from. @param pUndoObject Pointer to deleted object for undo. */ - CBaseObject* NewObject(CObjectArchive& archive, CBaseObject* pUndoObject, bool bMakeNewId); + CBaseObject* NewObject(CObjectArchive& archive, CBaseObject* pUndoObject, bool bMakeNewId) override; //! Update visibility of all objects. void UpdateVisibilityList(); diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h b/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h index 23151eb05c..bb19f4d77e 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h @@ -86,7 +86,7 @@ public: // Always returns false as Component entity highlighting (accenting) is taken care of elsewhere bool IsHighlighted() { return false; } // Component entity highlighting (accenting) is taken care of elsewhere - void DrawHighlight(DisplayContext& /*dc*/) {}; + void DrawHighlight(DisplayContext& /*dc*/) override {}; // Don't auto-clone children. Cloning happens in groups with reference fixups, // and individually selected objercts should be cloned as individuals. @@ -164,7 +164,7 @@ protected: float GetRadius(); - void DeleteThis() { delete this; }; + void DeleteThis() override { delete this; }; bool IsNonLayerAncestorSelected() const; bool IsLayer() const; diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h index f2764681b2..617c5cb2c8 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h @@ -182,7 +182,7 @@ private: ////////////////////////////////////////////////////////////////////////// // AzToolsFramework::EditorContextMenu::Bus::Handler overrides void PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags) override; - int GetMenuPosition() const; + int GetMenuPosition() const override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/ComponentPalette/FavoriteComponentList.h b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/ComponentPalette/FavoriteComponentList.h index 5f704237ab..2bd2d83e04 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/ComponentPalette/FavoriteComponentList.h +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/ComponentPalette/FavoriteComponentList.h @@ -102,7 +102,7 @@ protected: void AddFavorites(const AZStd::vector& classDataContainer) override; ////////////////////////////////////////////////////////////////////////// - void rowsInserted(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end) override; // Context menu handlers void ShowContextMenu(const QPoint&); diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.hxx b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.hxx index 346a5e938a..8acb2f1a72 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.hxx +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.hxx @@ -255,7 +255,7 @@ protected: bool DropMimeDataAssets(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); bool CanDropMimeDataAssets(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; - QMap itemData(const QModelIndex &index) const; + QMap itemData(const QModelIndex &index) const override; QVariant dataForAll(const QModelIndex& index, int role) const; QVariant dataForName(const QModelIndex& index, int role) const; QVariant dataForVisibility(const QModelIndex& index, int role) const; diff --git a/Code/Editor/PreferencesStdPages.h b/Code/Editor/PreferencesStdPages.h index f4a6e0b783..8a182bde55 100644 --- a/Code/Editor/PreferencesStdPages.h +++ b/Code/Editor/PreferencesStdPages.h @@ -28,16 +28,16 @@ public: ////////////////////////////////////////////////////////////////////////// // IUnkown implementation. - virtual HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj); - virtual ULONG STDMETHODCALLTYPE AddRef(); - virtual ULONG STDMETHODCALLTYPE Release(); + HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj) override; + ULONG STDMETHODCALLTYPE AddRef() override; + ULONG STDMETHODCALLTYPE Release() override; ////////////////////////////////////////////////////////////////////////// - virtual REFGUID ClassID(); + REFGUID ClassID() override; ////////////////////////////////////////////////////////////////////////// - virtual int GetPagesCount(); - virtual IPreferencesPage* CreateEditorPreferencesPage(int index) override; + int GetPagesCount() override; + IPreferencesPage* CreateEditorPreferencesPage(int index) override; }; #endif // CRYINCLUDE_EDITOR_PREFERENCESSTDPAGES_H diff --git a/Code/Editor/QtViewPane.h b/Code/Editor/QtViewPane.h index 09fc215833..194dd8919a 100644 --- a/Code/Editor/QtViewPane.h +++ b/Code/Editor/QtViewPane.h @@ -123,18 +123,18 @@ public: { } - virtual ESystemClassID SystemClassID() { return m_classId; }; + ESystemClassID SystemClassID() override { return m_classId; }; static const GUID& GetClassID() { return TWidget::GetClassID(); } - virtual const GUID& ClassID() + const GUID& ClassID() override { return GetClassID(); } - virtual QString ClassName() { return m_name; }; - virtual QString Category() { return m_category; }; + QString ClassName() override { return m_name; }; + QString Category() override { return m_category; }; QObject* CreateQObject() const override { return new TWidget(); }; QString GetPaneTitle() override { return m_name; }; diff --git a/Code/Editor/SelectSequenceDialog.h b/Code/Editor/SelectSequenceDialog.h index 5531949c1a..960da7ebe3 100644 --- a/Code/Editor/SelectSequenceDialog.h +++ b/Code/Editor/SelectSequenceDialog.h @@ -30,7 +30,7 @@ protected: void OnInitDialog() override; // Derived Dialogs should override this - virtual void GetItems(std::vector& outItems); + void GetItems(std::vector& outItems) override; }; #endif // CRYINCLUDE_EDITOR_SELECTSEQUENCEDIALOG_H diff --git a/Code/Editor/ToolbarCustomizationDialog.h b/Code/Editor/ToolbarCustomizationDialog.h index 7063c2b792..0e64bfbb5b 100644 --- a/Code/Editor/ToolbarCustomizationDialog.h +++ b/Code/Editor/ToolbarCustomizationDialog.h @@ -39,7 +39,7 @@ public: protected: void dragMoveEvent(QDragMoveEvent* ev) override; void dragEnterEvent(QDragEnterEvent* ev) override; - void dropEvent(QDropEvent* ev); + void dropEvent(QDropEvent* ev) override; private: void OnTabChanged(int index); diff --git a/Code/Editor/TopRendererWnd.h b/Code/Editor/TopRendererWnd.h index 3a5c1026bc..c5bc7a31f2 100644 --- a/Code/Editor/TopRendererWnd.h +++ b/Code/Editor/TopRendererWnd.h @@ -35,11 +35,11 @@ public: /** Get type of this viewport. */ - virtual EViewportType GetType() const { return ET_ViewportMap; } - virtual void SetType(EViewportType type); + EViewportType GetType() const override { return ET_ViewportMap; } + void SetType(EViewportType type) override; - virtual void ResetContent(); - virtual void UpdateContent(int flags); + void ResetContent() override; + void UpdateContent(int flags) override; //! Map viewport position to world space position. virtual Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override; @@ -52,7 +52,7 @@ public: protected: // Draw everything. - virtual void Draw(DisplayContext& dc); + void Draw(DisplayContext& dc) override; private: bool m_bContentsUpdated; diff --git a/Code/Editor/TrackView/SequenceBatchRenderDialog.h b/Code/Editor/TrackView/SequenceBatchRenderDialog.h index 5d8934f783..9be10c22af 100644 --- a/Code/Editor/TrackView/SequenceBatchRenderDialog.h +++ b/Code/Editor/TrackView/SequenceBatchRenderDialog.h @@ -187,7 +187,7 @@ protected: int m_customFPS; void InitializeContext(); - virtual void OnMovieEvent(IMovieListener::EMovieEvent event, IAnimSequence* pSequence); + void OnMovieEvent(IMovieListener::EMovieEvent event, IAnimSequence* pSequence) override; void CaptureItemStart(); diff --git a/Code/Editor/TrackView/TrackViewCurveEditor.h b/Code/Editor/TrackView/TrackViewCurveEditor.h index b2e019899b..1af55a9e0c 100644 --- a/Code/Editor/TrackView/TrackViewCurveEditor.h +++ b/Code/Editor/TrackView/TrackViewCurveEditor.h @@ -50,8 +50,8 @@ public: void SetPlayCallback(const std::function& callback); // IAnimationContextListener - virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence); - virtual void OnTimeChanged(float newTime); + void OnSequenceChanged(CTrackViewSequence* pNewSequence) override; + void OnTimeChanged(float newTime) override; protected: void showEvent(QShowEvent* event) override; @@ -65,7 +65,7 @@ private: void OnSplineTimeMarkerChange(); // IEditorNotifyListener - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override; + void OnEditorNotifyEvent(EEditorNotifyEvent event) override; //ITrackViewSequenceListener void OnKeysChanged(CTrackViewSequence* pSequence) override; @@ -109,8 +109,8 @@ public: float GetFPS() const { return m_widget->GetFPS(); } void SetTickDisplayMode(ETVTickMode mode) { m_widget->SetTickDisplayMode(mode); } - virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence) { m_widget->OnSequenceChanged(pNewSequence); } - virtual void OnTimeChanged(float newTime) { m_widget->OnTimeChanged(newTime); } + void OnSequenceChanged(CTrackViewSequence* pNewSequence) override { m_widget->OnSequenceChanged(pNewSequence); } + void OnTimeChanged(float newTime) override { m_widget->OnTimeChanged(newTime); } // ITrackViewSequenceListener delegation to m_widget void OnKeysChanged(CTrackViewSequence* pSequence) override { m_widget->OnKeysChanged(pSequence); } diff --git a/Code/Editor/TrackView/TrackViewDialog.h b/Code/Editor/TrackView/TrackViewDialog.h index f6c1126713..c66f31e1f7 100644 --- a/Code/Editor/TrackView/TrackViewDialog.h +++ b/Code/Editor/TrackView/TrackViewDialog.h @@ -69,10 +69,10 @@ public: void UpdateSequenceLockStatus(); // IAnimationContextListener - virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence) override; + void OnSequenceChanged(CTrackViewSequence* pNewSequence) override; // ITrackViewSequenceListener - virtual void OnSequenceSettingsChanged(CTrackViewSequence* pSequence) override; + void OnSequenceSettingsChanged(CTrackViewSequence* pSequence) override; void UpdateDopeSheetTime(CTrackViewSequence* pSequence); @@ -197,8 +197,8 @@ private: bool processRawInput(MSG* pMsg); #endif - virtual void OnNodeSelectionChanged(CTrackViewSequence* pSequence) override; - virtual void OnNodeRenamed(CTrackViewNode* pNode, const char* pOldName) override; + void OnNodeSelectionChanged(CTrackViewSequence* pSequence) override; + void OnNodeRenamed(CTrackViewNode* pNode, const char* pOldName) override; void OnSequenceAdded(CTrackViewSequence* pSequence) override; void OnSequenceRemoved(CTrackViewSequence* pSequence) override; @@ -209,8 +209,8 @@ private: void AddDialogListeners(); void RemoveDialogListeners(); - virtual void BeginUndoTransaction(); - virtual void EndUndoTransaction(); + void BeginUndoTransaction() override; + void EndUndoTransaction() override; void SaveCurrentSequenceToFBX(); void SaveSequenceTimingToXML(); diff --git a/Code/Editor/TrackView/TrackViewNode.h b/Code/Editor/TrackView/TrackViewNode.h index 59df06750b..80ca7b9d49 100644 --- a/Code/Editor/TrackView/TrackViewNode.h +++ b/Code/Editor/TrackView/TrackViewNode.h @@ -117,13 +117,14 @@ class CTrackViewKeyBundle public: CTrackViewKeyBundle() : m_bAllOfSameType(true) {} + virtual ~CTrackViewKeyBundle() = default; - virtual bool AreAllKeysOfSameType() const override { return m_bAllOfSameType; } + bool AreAllKeysOfSameType() const override { return m_bAllOfSameType; } - virtual unsigned int GetKeyCount() const override { return static_cast(m_keys.size()); } - virtual CTrackViewKeyHandle GetKey(unsigned int index) override { return m_keys[index]; } + unsigned int GetKeyCount() const override { return static_cast(m_keys.size()); } + CTrackViewKeyHandle GetKey(unsigned int index) override { return m_keys[index]; } - virtual void SelectKeys(const bool bSelected) override; + void SelectKeys(const bool bSelected) override; CTrackViewKeyHandle GetSingleSelectedKey(); diff --git a/Code/Editor/TrackView/TrackViewSequence.h b/Code/Editor/TrackView/TrackViewSequence.h index 69858adf8f..a392ad00f9 100644 --- a/Code/Editor/TrackView/TrackViewSequence.h +++ b/Code/Editor/TrackView/TrackViewSequence.h @@ -100,16 +100,16 @@ public: void Load() override; // ITrackViewNode - virtual ETrackViewNodeType GetNodeType() const override { return eTVNT_Sequence; } + ETrackViewNodeType GetNodeType() const override { return eTVNT_Sequence; } - virtual AZStd::string GetName() const override { return m_pAnimSequence->GetName(); } - virtual bool SetName(const char* pName) override; - virtual bool CanBeRenamed() const override { return true; } + AZStd::string GetName() const override { return m_pAnimSequence->GetName(); } + bool SetName(const char* pName) override; + bool CanBeRenamed() const override { return true; } // Binding/Unbinding - virtual void BindToEditorObjects() override; - virtual void UnBindFromEditorObjects() override; - virtual bool IsBoundToEditorObjects() const override; + void BindToEditorObjects() override; + void UnBindFromEditorObjects() override; + bool IsBoundToEditorObjects() const override; // Time range void SetTimeRange(Range timeRange); @@ -136,10 +136,10 @@ public: uint32 GetCryMovieId() const { return m_pAnimSequence->GetId(); } // Rendering - virtual void Render(const SAnimContext& animContext) override; + void Render(const SAnimContext& animContext) override; // Playback control - virtual void Animate(const SAnimContext& animContext) override; + void Animate(const SAnimContext& animContext) override; void Resume() { m_pAnimSequence->Resume(); } void Pause() { m_pAnimSequence->Pause(); } void StillUpdate() { m_pAnimSequence->StillUpdate(); } @@ -162,7 +162,7 @@ public: void TimeChanged(float newTime) { m_pAnimSequence->TimeChanged(newTime); } // Check if it's a group node - virtual bool IsGroupNode() const override { return true; } + bool IsGroupNode() const override { return true; } // Track Events (TODO: Undo?) int GetTrackEventsCount() const { return m_pAnimSequence->GetTrackEventsCount(); } @@ -195,7 +195,7 @@ public: bool IsActiveSequence() const; // The root sequence node is always an active director - virtual bool IsActiveDirector() const override { return true; } + bool IsActiveDirector() const override { return true; } // Copy keys to clipboard (in XML form) void CopyKeysToClipboard(const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks); @@ -306,15 +306,15 @@ private: // Called when an animation updates needs to be schedules void ForceAnimation(); - virtual void CopyKeysToClipboard(XmlNodeRef& xmlNode, const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks) override; + void CopyKeysToClipboard(XmlNodeRef& xmlNode, const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks) override; std::deque GetMatchingTracks(CTrackViewAnimNode* pAnimNode, XmlNodeRef trackNode); void GetMatchedPasteLocationsRec(std::vector& locations, CTrackViewNode* pCurrentNode, XmlNodeRef clipboardNode); - virtual void BeginUndoTransaction(); - virtual void EndUndoTransaction(); - virtual void BeginRestoreTransaction(); - virtual void EndRestoreTransaction(); + void BeginUndoTransaction() override; + void EndUndoTransaction() override; + void BeginRestoreTransaction() override; + void EndRestoreTransaction() override; // For record mode on AZ::Entities - connect (or disconnect) to buses for notification of property changes void ConnectToBusesForRecording(const AZ::EntityId& entityIdForBus, bool enableConnection); diff --git a/Code/Editor/TrackView/TrackViewSequenceManager.h b/Code/Editor/TrackView/TrackViewSequenceManager.h index 21c10f009a..1474323dc6 100644 --- a/Code/Editor/TrackView/TrackViewSequenceManager.h +++ b/Code/Editor/TrackView/TrackViewSequenceManager.h @@ -27,7 +27,7 @@ public: CTrackViewSequenceManager(); ~CTrackViewSequenceManager(); - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event); + void OnEditorNotifyEvent(EEditorNotifyEvent event) override; unsigned int GetCount() const { return static_cast(m_sequences.size()); } @@ -65,7 +65,7 @@ private: void OnSequenceAdded(CTrackViewSequence* pSequence); void OnSequenceRemoved(CTrackViewSequence* pSequence); - virtual void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event); + void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event) override; // AZ::EntitySystemBus void OnEntityNameChanged(const AZ::EntityId& entityId, const AZStd::string& name) override; diff --git a/Code/Editor/TrackView/TrackViewSplineCtrl.h b/Code/Editor/TrackView/TrackViewSplineCtrl.h index 2f4c790627..7cf12fb750 100644 --- a/Code/Editor/TrackView/TrackViewSplineCtrl.h +++ b/Code/Editor/TrackView/TrackViewSplineCtrl.h @@ -28,7 +28,7 @@ public: CTrackViewSplineCtrl(QWidget* parent); virtual ~CTrackViewSplineCtrl(); - virtual void ClearSelection(); + void ClearSelection() override; void AddSpline(ISplineInterpolator* pSpline, CTrackViewTrack* pTrack, const QColor& color); void AddSpline(ISplineInterpolator * pSpline, CTrackViewTrack * pTrack, QColor anColorArray[4]); @@ -53,12 +53,12 @@ protected: void wheelEvent(QWheelEvent* event) override; private: - virtual void SelectKey(ISplineInterpolator* pSpline, int nKey, int nDimension, bool bSelect) override; - virtual void SelectRectangle(const QRect& rc, bool bSelect) override; + void SelectKey(ISplineInterpolator* pSpline, int nKey, int nDimension, bool bSelect) override; + void SelectRectangle(const QRect& rc, bool bSelect) override; std::vector m_tracks; - virtual bool GetTangentHandlePts(QPoint& inTangentPt, QPoint& pt, QPoint& outTangentPt, + bool GetTangentHandlePts(QPoint& inTangentPt, QPoint& pt, QPoint& outTangentPt, int nSpline, int nKey, int nDimension) override; void ComputeIncomingTangentAndEaseTo(float& ds, float& easeTo, QPoint inTangentPt, int nSpline, int nKey, int nDimension); @@ -67,7 +67,7 @@ private: void AdjustTCB(float d_tension, float d_continuity, float d_bias); void MoveSelectedTangentHandleTo(const QPoint& point); - virtual ISplineCtrlUndo* CreateSplineCtrlUndoObject(std::vector& splineContainer); + ISplineCtrlUndo* CreateSplineCtrlUndoObject(std::vector& splineContainer) override; bool m_bKeysFreeze; bool m_bTangentsFreeze; diff --git a/Code/Editor/Util/ColumnGroupTreeView.h b/Code/Editor/Util/ColumnGroupTreeView.h index 3c7dea91c3..eda5f8e9c9 100644 --- a/Code/Editor/Util/ColumnGroupTreeView.h +++ b/Code/Editor/Util/ColumnGroupTreeView.h @@ -44,7 +44,7 @@ public slots: QVector Groups() const; protected: - void paintEvent(QPaintEvent* event) + void paintEvent(QPaintEvent* event) override { if (model() && model()->rowCount() > 0) { diff --git a/Code/Editor/Util/Variable.h b/Code/Editor/Util/Variable.h index 9c3f96a3f6..639161775c 100644 --- a/Code/Editor/Util/Variable.h +++ b/Code/Editor/Util/Variable.h @@ -379,11 +379,11 @@ AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING public: virtual ~CVariableBase() {} - void SetName(const QString& name) { m_name = name; }; + void SetName(const QString& name) override { m_name = name; }; //! Get name of parameter. - QString GetName() const { return m_name; }; + QString GetName() const override { return m_name; }; - QString GetHumanName() const + QString GetHumanName() const override { if (!m_humanName.isEmpty()) { @@ -391,82 +391,82 @@ public: } return m_name; } - void SetHumanName(const QString& name) { m_humanName = name; } + void SetHumanName(const QString& name) override { m_humanName = name; } - void SetDescription(const char* desc) { m_description = desc; }; - void SetDescription(const QString& desc) { m_description = desc; }; + void SetDescription(const char* desc) override { m_description = desc; }; + void SetDescription(const QString& desc) override { m_description = desc; }; //! Get name of parameter. - QString GetDescription() const { return m_description; }; + QString GetDescription() const override { return m_description; }; - EType GetType() const { return IVariable::UNKNOWN; }; - int GetSize() const { return sizeof(*this); }; + EType GetType() const override { return IVariable::UNKNOWN; }; + int GetSize() const override { return sizeof(*this); }; - unsigned char GetDataType() const { return m_dataType; }; - void SetDataType(unsigned char dataType) { m_dataType = dataType; } + unsigned char GetDataType() const override { return m_dataType; }; + void SetDataType(unsigned char dataType) override { m_dataType = dataType; } - void SetFlags(int flags) { m_flags = static_cast(flags); } - int GetFlags() const { return m_flags; } - void SetFlagRecursive(EFlags flag) { m_flags |= flag; } + void SetFlags(int flags) override { m_flags = static_cast(flags); } + int GetFlags() const override { return m_flags; } + void SetFlagRecursive(EFlags flag) override { m_flags |= flag; } - void SetUserData(const QVariant &data){ m_userData = data; }; - QVariant GetUserData() const { return m_userData; } + void SetUserData(const QVariant &data) override { m_userData = data; }; + QVariant GetUserData() const override { return m_userData; } ////////////////////////////////////////////////////////////////////////// // Set methods. ////////////////////////////////////////////////////////////////////////// - void Set([[maybe_unused]] int value) { assert(0); } - void Set([[maybe_unused]] bool value) { assert(0); } - void Set([[maybe_unused]] float value) { assert(0); } - void Set([[maybe_unused]] double value) { assert(0); } - void Set([[maybe_unused]] const Vec2& value) { assert(0); } - void Set([[maybe_unused]] const Vec3& value) { assert(0); } - void Set([[maybe_unused]] const Vec4& value) { assert(0); } - void Set([[maybe_unused]] const Ang3& value) { assert(0); } - void Set([[maybe_unused]] const Quat& value) { assert(0); } - void Set([[maybe_unused]] const QString& value) { assert(0); } - void Set([[maybe_unused]] const char* value) { assert(0); } - void SetDisplayValue(const QString& value) { Set(value); } + void Set([[maybe_unused]] int value) override { assert(0); } + void Set([[maybe_unused]] bool value) override { assert(0); } + void Set([[maybe_unused]] float value) override { assert(0); } + void Set([[maybe_unused]] double value) override { assert(0); } + void Set([[maybe_unused]] const Vec2& value) override { assert(0); } + void Set([[maybe_unused]] const Vec3& value) override { assert(0); } + void Set([[maybe_unused]] const Vec4& value) override { assert(0); } + void Set([[maybe_unused]] const Ang3& value) override { assert(0); } + void Set([[maybe_unused]] const Quat& value) override { assert(0); } + void Set([[maybe_unused]] const QString& value) override { assert(0); } + void Set([[maybe_unused]] const char* value) override { assert(0); } + void SetDisplayValue(const QString& value) override { Set(value); } ////////////////////////////////////////////////////////////////////////// // Get methods. ////////////////////////////////////////////////////////////////////////// - void Get([[maybe_unused]] int& value) const { assert(0); } - void Get([[maybe_unused]] bool& value) const { assert(0); } - void Get([[maybe_unused]] float& value) const { assert(0); } - void Get([[maybe_unused]] double& value) const { assert(0); } - void Get([[maybe_unused]] Vec2& value) const { assert(0); } - void Get([[maybe_unused]] Vec3& value) const { assert(0); } - void Get([[maybe_unused]] Vec4& value) const { assert(0); } - void Get([[maybe_unused]] Ang3& value) const { assert(0); } - void Get([[maybe_unused]] Quat& value) const { assert(0); } - void Get([[maybe_unused]] QString& value) const { assert(0); } - QString GetDisplayValue() const { QString val; Get(val); return val; } + void Get([[maybe_unused]] int& value) const override { assert(0); } + void Get([[maybe_unused]] bool& value) const override { assert(0); } + void Get([[maybe_unused]] float& value) const override { assert(0); } + void Get([[maybe_unused]] double& value) const override { assert(0); } + void Get([[maybe_unused]] Vec2& value) const override { assert(0); } + void Get([[maybe_unused]] Vec3& value) const override { assert(0); } + void Get([[maybe_unused]] Vec4& value) const override { assert(0); } + void Get([[maybe_unused]] Ang3& value) const override { assert(0); } + void Get([[maybe_unused]] Quat& value) const override { assert(0); } + void Get([[maybe_unused]] QString& value) const override { assert(0); } + QString GetDisplayValue() const override { QString val; Get(val); return val; } ////////////////////////////////////////////////////////////////////////// // IVariableContainer functions ////////////////////////////////////////////////////////////////////////// - virtual void AddVariable([[maybe_unused]] IVariable* var) { assert(0); } + void AddVariable([[maybe_unused]] IVariable* var) override { assert(0); } - virtual bool DeleteVariable([[maybe_unused]] IVariable* var, [[maybe_unused]] bool recursive = false) { return false; } - virtual void DeleteAllVariables() {} + bool DeleteVariable([[maybe_unused]] IVariable* var, [[maybe_unused]] bool recursive = false) override { return false; } + void DeleteAllVariables() override {} - virtual int GetNumVariables() const { return 0; } - virtual IVariable* GetVariable([[maybe_unused]] int index) const { return nullptr; } + int GetNumVariables() const override { return 0; } + IVariable* GetVariable([[maybe_unused]] int index) const override { return nullptr; } - virtual bool IsContainsVariable([[maybe_unused]] IVariable* pVar, [[maybe_unused]] bool bRecursive = false) const { return false; } + bool IsContainsVariable([[maybe_unused]] IVariable* pVar, [[maybe_unused]] bool bRecursive = false) const override { return false; } - virtual IVariable* FindVariable([[maybe_unused]] const char* name, [[maybe_unused]] bool bRecursive = false, [[maybe_unused]] bool bHumanName = false) const { return nullptr; } + IVariable* FindVariable([[maybe_unused]] const char* name, [[maybe_unused]] bool bRecursive = false, [[maybe_unused]] bool bHumanName = false) const override { return nullptr; } - virtual bool IsEmpty() const { return true; } + bool IsEmpty() const override { return true; } ////////////////////////////////////////////////////////////////////////// - void Wire(IVariable* var) + void Wire(IVariable* var) override { m_wiredVars.push_back(var); } ////////////////////////////////////////////////////////////////////////// - void Unwire(IVariable* var) + void Unwire(IVariable* var) override { if (!var) { @@ -480,7 +480,7 @@ public: } ////////////////////////////////////////////////////////////////////////// - void AddOnSetCallback(OnSetCallback* func) + void AddOnSetCallback(OnSetCallback* func) override { if (!stl::find(m_onSetFuncs, func)) { @@ -489,13 +489,13 @@ public: } ////////////////////////////////////////////////////////////////////////// - void RemoveOnSetCallback(OnSetCallback* func) + void RemoveOnSetCallback(OnSetCallback* func) override { stl::find_and_erase(m_onSetFuncs, func); } ////////////////////////////////////////////////////////////////////////// - void ClearOnSetCallbacks() + void ClearOnSetCallbacks() override { m_onSetFuncs.clear(); } @@ -509,7 +509,7 @@ public: } ////////////////////////////////////////////////////////////////////////// - void RemoveOnSetEnumCallback(OnSetCallback* func) + void RemoveOnSetEnumCallback(OnSetCallback* func) override { stl::find_and_erase(m_onSetEnumFuncs, func); } @@ -520,7 +520,7 @@ public: } - virtual void OnSetValue([[maybe_unused]] bool bRecursive) + void OnSetValue([[maybe_unused]] bool bRecursive) override { // If have wired variables or OnSet callback, process them. // Send value to wired variable. @@ -549,7 +549,8 @@ public: } ////////////////////////////////////////////////////////////////////////// - void Serialize(XmlNodeRef node, bool load) + using IVariable::Serialize; + void Serialize(XmlNodeRef node, bool load) override { if (load) { @@ -567,8 +568,8 @@ public: } } - virtual void EnableUpdateCallbacks(bool boEnable){m_boUpdateCallbacksEnabled = boEnable; }; - virtual void SetForceModified(bool bForceModified) { m_bForceModified = bForceModified; } + void EnableUpdateCallbacks(bool boEnable) override{m_boUpdateCallbacksEnabled = boEnable; }; + void SetForceModified(bool bForceModified) override { m_bForceModified = bForceModified; } protected: // Constructor. CVariableBase() @@ -641,13 +642,13 @@ public: CVariableArray(){} //! Get name of parameter. - virtual EType GetType() const { return IVariable::ARRAY; }; - virtual int GetSize() const { return sizeof(CVariableArray); }; + EType GetType() const override { return IVariable::ARRAY; }; + int GetSize() const override { return sizeof(CVariableArray); }; ////////////////////////////////////////////////////////////////////////// // Set methods. ////////////////////////////////////////////////////////////////////////// - virtual void Set(const QString& value) + void Set(const QString& value) override { if (m_strValue != value) { @@ -655,7 +656,7 @@ public: OnSetValue(false); } } - void OnSetValue(bool bRecursive) + void OnSetValue(bool bRecursive) override { CVariableBase::OnSetValue(bRecursive); if (bRecursive) @@ -666,7 +667,7 @@ public: } } } - void SetFlagRecursive(EFlags flag) + void SetFlagRecursive(EFlags flag) override { CVariableBase::SetFlagRecursive(flag); for (Variables::iterator it = m_vars.begin(); it != m_vars.end(); ++it) @@ -677,9 +678,9 @@ public: ////////////////////////////////////////////////////////////////////////// // Get methods. ////////////////////////////////////////////////////////////////////////// - virtual void Get(QString& value) const { value = m_strValue; } + void Get(QString& value) const override { value = m_strValue; } - virtual bool HasDefaultValue() const + bool HasDefaultValue() const override { for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it) { @@ -691,7 +692,7 @@ public: return true; } - virtual void ResetToDefault() + void ResetToDefault() override { for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it) { @@ -700,7 +701,7 @@ public: } ////////////////////////////////////////////////////////////////////////// - IVariable* Clone(bool bRecursive) const + IVariable* Clone(bool bRecursive) const override { CVariableArray* var = new CVariableArray(*this); @@ -713,7 +714,7 @@ public: } ////////////////////////////////////////////////////////////////////////// - void CopyValue(IVariable* fromVar) + void CopyValue(IVariable* fromVar) override { assert(fromVar); if (fromVar->GetType() != IVariable::ARRAY) @@ -733,20 +734,20 @@ public: } ////////////////////////////////////////////////////////////////////////// - virtual int GetNumVariables() const { return static_cast(m_vars.size()); } + int GetNumVariables() const override { return static_cast(m_vars.size()); } - virtual IVariable* GetVariable(int index) const + IVariable* GetVariable(int index) const override { assert(index >= 0 && index < (int)m_vars.size()); return m_vars[index]; } - virtual void AddVariable(IVariable* var) + void AddVariable(IVariable* var) override { m_vars.push_back(var); } - virtual bool DeleteVariable(IVariable* var, bool recursive /*=false*/) + bool DeleteVariable(IVariable* var, bool recursive /*=false*/) override { bool found = stl::find_and_erase(m_vars, var); if (!found && recursive) @@ -762,12 +763,12 @@ public: return found; } - virtual void DeleteAllVariables() + void DeleteAllVariables() override { m_vars.clear(); } - virtual bool IsContainsVariable(IVariable* pVar, bool bRecursive) const + bool IsContainsVariable(IVariable* pVar, bool bRecursive) const override { for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it) { @@ -793,14 +794,15 @@ public: return false; } - virtual IVariable* FindVariable(const char* name, bool bRecursive, bool bHumanName) const; + IVariable* FindVariable(const char* name, bool bRecursive, bool bHumanName) const override; - virtual bool IsEmpty() const + bool IsEmpty() const override { return m_vars.empty(); } - void Serialize(XmlNodeRef node, bool load) + using IVariable::Serialize; + void Serialize(XmlNodeRef node, bool load) override { if (load) { @@ -1074,11 +1076,11 @@ class CVariableVoid { public: CVariableVoid(){}; - virtual EType GetType() const { return IVariable::UNKNOWN; }; - virtual IVariable* Clone([[maybe_unused]] bool bRecursive) const { return new CVariableVoid(*this); } - virtual void CopyValue([[maybe_unused]] IVariable* fromVar) {}; - virtual bool HasDefaultValue() const { return true; } - virtual void ResetToDefault() {}; + EType GetType() const override { return IVariable::UNKNOWN; }; + IVariable* Clone([[maybe_unused]] bool bRecursive) const override { return new CVariableVoid(*this); } + void CopyValue([[maybe_unused]] IVariable* fromVar) override {}; + bool HasDefaultValue() const override { return true; } + void ResetToDefault() override {}; protected: CVariableVoid(const CVariableVoid& v) : CVariableBase(v) {}; @@ -1112,44 +1114,44 @@ public: } //! Get name of parameter. - virtual EType GetType() const { return (EType)var_type::type_traits::type(); }; - virtual int GetSize() const { return sizeof(T); }; + EType GetType() const override { return (EType)var_type::type_traits::type(); }; + int GetSize() const override { return sizeof(T); }; ////////////////////////////////////////////////////////////////////////// // Set methods. ////////////////////////////////////////////////////////////////////////// - virtual void Set(int value) { SetValue(value); } - virtual void Set(bool value) { SetValue(value); } - virtual void Set(float value) { SetValue(value); } - virtual void Set(double value) { SetValue(value); } - virtual void Set(const Vec2& value) { SetValue(value); } - virtual void Set(const Vec3& value) { SetValue(value); } - virtual void Set(const Vec4& value) { SetValue(value); } - virtual void Set(const Ang3& value) { SetValue(value); } - virtual void Set(const Quat& value) { SetValue(value); } - virtual void Set(const QString& value) { SetValue(value); } - virtual void Set(const char* value) { SetValue(QString(value)); } + void Set(int value) override { SetValue(value); } + void Set(bool value) override { SetValue(value); } + void Set(float value) override { SetValue(value); } + void Set(double value) override { SetValue(value); } + void Set(const Vec2& value) override { SetValue(value); } + void Set(const Vec3& value) override { SetValue(value); } + void Set(const Vec4& value) override { SetValue(value); } + void Set(const Ang3& value) override { SetValue(value); } + void Set(const Quat& value) override { SetValue(value); } + void Set(const QString& value) override { SetValue(value); } + void Set(const char* value) override { SetValue(QString(value)); } ////////////////////////////////////////////////////////////////////////// // Get methods. ////////////////////////////////////////////////////////////////////////// - virtual void Get(int& value) const { GetValue(value); } - virtual void Get(bool& value) const { GetValue(value); } - virtual void Get(float& value) const { GetValue(value); } - virtual void Get(double& value) const { GetValue(value); } - virtual void Get(Vec2& value) const { GetValue(value); } - virtual void Get(Vec3& value) const { GetValue(value); } - virtual void Get(Vec4& value) const { GetValue(value); } - virtual void Get(Quat& value) const { GetValue(value); } - virtual void Get(QString& value) const { GetValue(value); } - virtual bool HasDefaultValue() const + void Get(int& value) const override { GetValue(value); } + void Get(bool& value) const override { GetValue(value); } + void Get(float& value) const override { GetValue(value); } + void Get(double& value) const override { GetValue(value); } + void Get(Vec2& value) const override { GetValue(value); } + void Get(Vec3& value) const override { GetValue(value); } + void Get(Vec4& value) const override { GetValue(value); } + void Get(Quat& value) const override { GetValue(value); } + void Get(QString& value) const override { GetValue(value); } + bool HasDefaultValue() const override { T defval; var_type::init(defval); return m_valueDef == defval; } - virtual void ResetToDefault() + void ResetToDefault() override { T defval; var_type::init(defval); @@ -1159,7 +1161,7 @@ public: ////////////////////////////////////////////////////////////////////////// // Limits. ////////////////////////////////////////////////////////////////////////// - virtual void SetLimits(float fMin, float fMax, float fStep = 0.f, bool bHardMin = true, bool bHardMax = true) + void SetLimits(float fMin, float fMax, float fStep = 0.f, bool bHardMin = true, bool bHardMax = true) override { m_valueMin = fMin; m_valueMax = fMax; @@ -1171,7 +1173,7 @@ public: m_customLimits = true; } - virtual void GetLimits(float& fMin, float& fMax, float& fStep, bool& bHardMin, bool& bHardMax) + void GetLimits(float& fMin, float& fMax, float& fStep, bool& bHardMin, bool& bHardMax) override { if (!m_customLimits && var_type::type_traits::supports_range()) { @@ -1199,7 +1201,7 @@ public: m_customLimits = false; } - virtual bool HasCustomLimits() + bool HasCustomLimits() override { return m_customLimits; } @@ -1217,14 +1219,14 @@ public: void operator=(const T& value) { SetValue(value); } ////////////////////////////////////////////////////////////////////////// - IVariable* Clone([[maybe_unused]] bool bRecursive) const + IVariable* Clone([[maybe_unused]] bool bRecursive) const override { Self* var = new Self(*this); return var; } ////////////////////////////////////////////////////////////////////////// - void CopyValue(IVariable* fromVar) + void CopyValue(IVariable* fromVar) override { assert(fromVar); T val; @@ -1668,7 +1670,7 @@ struct CSmartVariableBase return *pV; } // Cast to CVariableBase& VarType& operator*() const { return *pVar; } - VarType* operator->(void) const { return pVar; } + VarType* operator->() const { return pVar; } VarType* GetVar() const { return pVar; }; @@ -1730,7 +1732,7 @@ struct CSmartVariableArray } VarType& operator*() const { return *pVar; } - VarType* operator->(void) const { return pVar; } + VarType* operator->() const { return pVar; } VarType* GetVar() const { return pVar; }; @@ -1752,35 +1754,35 @@ public: // Dtor. virtual ~CVarBlock() {} //! Add variable to block. - virtual void AddVariable(IVariable* var); + void AddVariable(IVariable* var) override; //! Remove variable from block - virtual bool DeleteVariable(IVariable* var, bool bRecursive = false); + bool DeleteVariable(IVariable* var, bool bRecursive = false) override; void AddVariable(IVariable* pVar, const char* varName, unsigned char dataType = IVariable::DT_SIMPLE); // This used from smart variable pointer. void AddVariable(CVariableBase& var, const char* varName, unsigned char dataType = IVariable::DT_SIMPLE); //! Returns number of variables in block. - virtual int GetNumVariables() const { return static_cast(m_vars.size()); } + int GetNumVariables() const override { return static_cast(m_vars.size()); } //! Get pointer to stored variable by index. - virtual IVariable* GetVariable(int index) const + IVariable* GetVariable(int index) const override { assert(index >= 0 && index < m_vars.size()); return m_vars[index]; } // Clear all vars from VarBlock. - virtual void DeleteAllVariables() { m_vars.clear(); }; + void DeleteAllVariables() override { m_vars.clear(); }; //! Return true if variable block is empty (Does not have any vars). - virtual bool IsEmpty() const { return m_vars.empty(); } + bool IsEmpty() const override { return m_vars.empty(); } // Returns true if var block contains specified variable. - virtual bool IsContainsVariable(IVariable* pVar, bool bRecursive = true) const; + bool IsContainsVariable(IVariable* pVar, bool bRecursive = true) const override; //! Find variable by name. - virtual IVariable* FindVariable(const char* name, bool bRecursive = true, bool bHumanName = false) const; + IVariable* FindVariable(const char* name, bool bRecursive = true, bool bHumanName = false) const override; ////////////////////////////////////////////////////////////////////////// //! Clone var block. diff --git a/Code/Editor/Viewport.h b/Code/Editor/Viewport.h index 74897508f0..60c1306420 100644 --- a/Code/Editor/Viewport.h +++ b/Code/Editor/Viewport.h @@ -172,7 +172,7 @@ public: //! Get current view matrix. //! This is a matrix that transforms from world space to view space. - virtual const Matrix34& GetViewTM() const + const Matrix34& GetViewTM() const override { AZ_Error("CryLegacy", false, "QtViewport::GetViewTM not implemented"); static const Matrix34 m; @@ -182,7 +182,7 @@ public: ////////////////////////////////////////////////////////////////////////// //! Get current screen matrix. //! Screen matrix transform from World space to Screen space. - virtual const Matrix34& GetScreenTM() const + const Matrix34& GetScreenTM() const override { return m_screenTM; } @@ -190,9 +190,9 @@ public: virtual Vec3 MapViewToCP(const QPoint& point) = 0; //! Map viewport position to world space position. - virtual Vec3 ViewToWorld(const QPoint& vp, bool* pCollideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const = 0; + Vec3 ViewToWorld(const QPoint& vp, bool* pCollideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override = 0; //! Convert point on screen to world ray. - virtual void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const = 0; + void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const override = 0; //! Get normal for viewport position virtual Vec3 ViewToWorldNormal(const QPoint& vp, bool onlyTerrain, bool bTestRenderMesh = false) = 0; @@ -261,7 +261,7 @@ public: virtual void SetCursorString(const QString& str) = 0; virtual void SetFocus() = 0; - virtual void Invalidate(bool bErase = 1) = 0; + virtual void Invalidate(bool bErase = true) = 0; // Is overridden by RenderViewport virtual void SetFOV([[maybe_unused]] float fov) {} @@ -274,7 +274,7 @@ public: void SetViewPane(CLayoutViewPane* viewPane) { m_viewPane = viewPane; } - virtual CViewport *asCViewport() { return this; } + CViewport *asCViewport() override { return this; } protected: CLayoutViewPane* m_viewPane = nullptr; @@ -336,7 +336,7 @@ public: void SetActiveWindow() override { activateWindow(); } //! Called while window is idle. - virtual void Update(); + void Update() override; /** Set name of this viewport. */ @@ -344,24 +344,24 @@ public: /** Get name of viewport */ - QString GetName() const; + QString GetName() const override; - virtual void SetFocus() { setFocus(); } - virtual void Invalidate([[maybe_unused]] bool bErase = 1) { update(); } + void SetFocus() override { setFocus(); } + void Invalidate([[maybe_unused]] bool bErase = 1) override { update(); } // Is overridden by RenderViewport - virtual void SetFOV([[maybe_unused]] float fov) {} - virtual float GetFOV() const; + void SetFOV([[maybe_unused]] float fov) override {} + float GetFOV() const override; // Must be overridden in derived classes. // Returns: // e.g. 4.0/3.0 - virtual float GetAspectRatio() const = 0; - virtual void GetDimensions(int* pWidth, int* pHeight) const; - virtual void ScreenToClient(QPoint& pPoint) const override; + float GetAspectRatio() const override = 0; + void GetDimensions(int* pWidth, int* pHeight) const override; + void ScreenToClient(QPoint& pPoint) const override; - virtual void ResetContent(); - virtual void UpdateContent(int flags); + void ResetContent() override; + void UpdateContent(int flags) override; //! Set current zoom factor for this viewport. virtual void SetZoomFactor(float fZoomFactor); @@ -373,10 +373,10 @@ public: virtual void OnDeactivate(); //! Map world space position to viewport position. - virtual QPoint WorldToView(const Vec3& wp) const override; + QPoint WorldToView(const Vec3& wp) const override; //! Map world space position to 3D viewport position. - virtual Vec3 WorldToView3D(const Vec3& wp, int nFlags = 0) const; + Vec3 WorldToView3D(const Vec3& wp, int nFlags = 0) const override; //! Map viewport position to world space position. virtual Vec3 ViewToWorld(const QPoint& vp, bool* pCollideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override; @@ -391,17 +391,18 @@ public: //! This method return a vector (p2-p1) in world space alligned to construction plane and restriction axises. //! p1 and p2 must be given in world space and lie on construction plane. - virtual Vec3 GetCPVector(const Vec3& p1, const Vec3& p2, int axis); + using CViewport::GetCPVector; + Vec3 GetCPVector(const Vec3& p1, const Vec3& p2, int axis) override; //! Snap any given 3D world position to grid lines if snap is enabled. Vec3 SnapToGrid(const Vec3& vec) override; - virtual float GetGridStep() const; + float GetGridStep() const override; //! Returns the screen scale factor for a point given in world coordinates. //! This factor gives the width in world-space units at the point's distance of the viewport. - virtual float GetScreenScaleFactor([[maybe_unused]] const Vec3& worldPoint) const { return 1; }; + float GetScreenScaleFactor([[maybe_unused]] const Vec3& worldPoint) const override { return 1; }; - void SetAxisConstrain(int axis); + void SetAxisConstrain(int axis) override; /// Take raw input and create a final mouse interaction. /// @attention Do not map **point** from widget to viewport explicitly, @@ -413,7 +414,7 @@ public: // Selection. ////////////////////////////////////////////////////////////////////////// //! Resets current selection region. - virtual void ResetSelectionRegion(); + void ResetSelectionRegion() override; //! Set 2D selection rectangle. void SetSelectionRectangle(const QRect& rect) override; @@ -422,12 +423,12 @@ public: //! Called when dragging selection rectangle. void OnDragSelectRectangle(const QRect& rect, bool bNormalizeRect = false) override; //! Get selection precision tolerance. - float GetSelectionTolerance() const { return m_selectionTolerance; } + float GetSelectionTolerance() const override { return m_selectionTolerance; } //! Center viewport on selection. void CenterOnSelection() override {} void CenterOnAABB([[maybe_unused]] const AABB& aabb) override {} - virtual void CenterOnSliceInstance() {} + void CenterOnSliceInstance() override {} //! Performs hit testing of 2d point in view to find which object hit. bool HitTest(const QPoint& point, HitContext& hitInfo) override; @@ -440,10 +441,10 @@ public: float GetDistanceToLine(const Vec3& lineP1, const Vec3& lineP2, const QPoint& point) const override; // Access to the member m_bAdvancedSelectMode so interested modules can know its value. - bool GetAdvancedSelectModeFlag(); + bool GetAdvancedSelectModeFlag() override; - virtual void GetPerpendicularAxis(EAxis* pAxis, bool* pIs2D) const; - virtual const ::Plane* GetConstructionPlane() const { return &m_constructionPlane; } + void GetPerpendicularAxis(EAxis* pAxis, bool* pIs2D) const override; + const ::Plane* GetConstructionPlane() const override { return &m_constructionPlane; } ////////////////////////////////////////////////////////////////////////// @@ -451,7 +452,7 @@ public: //! Set construction plane from given position construction matrix refrence coord system and axis settings. ////////////////////////////////////////////////////////////////////////// void MakeConstructionPlane(int axis) override; - virtual void SetConstructionMatrix(RefCoordSys coordSys, const Matrix34& xform); + void SetConstructionMatrix(RefCoordSys coordSys, const Matrix34& xform) override; virtual const Matrix34& GetConstructionMatrix(RefCoordSys coordSys); // Set simple construction plane origin. void SetConstructionOrigin(const Vec3& worldPos); @@ -461,11 +462,11 @@ public: ////////////////////////////////////////////////////////////////////////// // Undo for viewpot operations. - void BeginUndo(); - void AcceptUndo(const QString& undoDescription); - void CancelUndo(); - void RestoreUndo(); - bool IsUndoRecording() const; + void BeginUndo() override; + void AcceptUndo(const QString& undoDescription) override; + void CancelUndo() override; + void RestoreUndo() override; + bool IsUndoRecording() const override; ////////////////////////////////////////////////////////////////////////// //! Get prefered original size for this viewport. @@ -473,39 +474,39 @@ public: virtual QSize GetIdealSize() const; //! Check if world space bounding box is visible in this view. - virtual bool IsBoundsVisible(const AABB& box) const; + bool IsBoundsVisible(const AABB& box) const override; ////////////////////////////////////////////////////////////////////////// - void SetCursor(const QCursor& cursor) + void SetCursor(const QCursor& cursor) override { setCursor(cursor); } // Set`s current cursor string. void SetCurrentCursor(const QCursor& hCursor, const QString& cursorString); - virtual void SetCurrentCursor(EStdCursor stdCursor, const QString& cursorString); - void SetCurrentCursor(EStdCursor stdCursor); - virtual void SetCursorString(const QString& cursorString); - void ResetCursor(); - void SetSupplementaryCursorStr(const QString& str); + void SetCurrentCursor(EStdCursor stdCursor, const QString& cursorString) override; + void SetCurrentCursor(EStdCursor stdCursor) override; + void SetCursorString(const QString& cursorString) override; + void ResetCursor() override; + void SetSupplementaryCursorStr(const QString& str) override; ////////////////////////////////////////////////////////////////////////// // Return visble objects cache. - CBaseObjectsCache* GetVisibleObjectsCache() { return m_pVisibleObjectsCache; }; + CBaseObjectsCache* GetVisibleObjectsCache() override { return m_pVisibleObjectsCache; }; - void RegisterRenderListener(IRenderListener* piListener); - bool UnregisterRenderListener(IRenderListener* piListener); - bool IsRenderListenerRegistered(IRenderListener* piListener); + void RegisterRenderListener(IRenderListener* piListener) override; + bool UnregisterRenderListener(IRenderListener* piListener) override; + bool IsRenderListenerRegistered(IRenderListener* piListener) override; - void AddPostRenderer(IPostRenderer* pPostRenderer); - bool RemovePostRenderer(IPostRenderer* pPostRenderer); + void AddPostRenderer(IPostRenderer* pPostRenderer) override; + bool RemovePostRenderer(IPostRenderer* pPostRenderer) override; void CaptureMouse() override { m_mouseCaptured = true; QWidget::grabMouse(); } void ReleaseMouse() override { m_mouseCaptured = false; QWidget::releaseMouse(); } - virtual void setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir); - virtual void setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir); + void setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir) override; + void setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir) override; QPoint m_vp; AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING Vec3 m_raySrc; diff --git a/Code/Editor/ViewportTitleDlg.h b/Code/Editor/ViewportTitleDlg.h index 5acb04ca99..4a2a454907 100644 --- a/Code/Editor/ViewportTitleDlg.h +++ b/Code/Editor/ViewportTitleDlg.h @@ -77,7 +77,7 @@ Q_SIGNALS: protected: virtual void OnInitDialog(); - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event); + void OnEditorNotifyEvent(EEditorNotifyEvent event) override; void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override; void OnMaximize(); diff --git a/Code/Framework/AzCore/AzCore/Component/Component.h b/Code/Framework/AzCore/AzCore/Component/Component.h index 9b4ae3f55f..3cbb9b5a86 100644 --- a/Code/Framework/AzCore/AzCore/Component/Component.h +++ b/Code/Framework/AzCore/AzCore/Component/Component.h @@ -266,7 +266,7 @@ namespace AZ _ComponentClass::RTTI_Type().ToString().c_str(), descriptor->GetName(), _ComponentClass::RTTI_TypeName()); \ return nullptr; \ } \ - else if (descriptor->GetName() != _ComponentClass::RTTI_TypeName()) \ + if (descriptor->GetName() != _ComponentClass::RTTI_TypeName()) \ { \ AZ_Error("Component", false, "The same component UUID (%s) / name (%s) was registered twice. This isn't allowed, " \ "it can cause lifetime management issues / crashes.\nThis situation can happen by declaring a component " \ diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp index 04a76b0f8e..a13f11c007 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp @@ -1251,6 +1251,8 @@ namespace AZ return AZ::SettingsRegistryInterface::VisitResponse::Continue; } + + using SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, bool value) override { // By default the auto load option is true diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h index 3768a75d83..bfc541ca09 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h @@ -196,14 +196,14 @@ namespace AZ ////////////////////////////////////////////////////////////////////////// // ComponentApplicationRequests - void RegisterComponentDescriptor(const ComponentDescriptor* descriptor) override final; - void UnregisterComponentDescriptor(const ComponentDescriptor* descriptor) override final; - void RegisterEntityAddedEventHandler(EntityAddedEvent::Handler& handler) override final; - void RegisterEntityRemovedEventHandler(EntityRemovedEvent::Handler& handler) override final; - void RegisterEntityActivatedEventHandler(EntityActivatedEvent::Handler& handler) override final; - void RegisterEntityDeactivatedEventHandler(EntityDeactivatedEvent::Handler& handler) override final; - void SignalEntityActivated(Entity* entity) override final; - void SignalEntityDeactivated(Entity* entity) override final; + void RegisterComponentDescriptor(const ComponentDescriptor* descriptor) final; + void UnregisterComponentDescriptor(const ComponentDescriptor* descriptor) final; + void RegisterEntityAddedEventHandler(EntityAddedEvent::Handler& handler) final; + void RegisterEntityRemovedEventHandler(EntityRemovedEvent::Handler& handler) final; + void RegisterEntityActivatedEventHandler(EntityActivatedEvent::Handler& handler) final; + void RegisterEntityDeactivatedEventHandler(EntityDeactivatedEvent::Handler& handler) final; + void SignalEntityActivated(Entity* entity) final; + void SignalEntityDeactivated(Entity* entity) final; bool AddEntity(Entity* entity) override; bool RemoveEntity(Entity* entity) override; bool DeleteEntity(const EntityId& id) override; diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h b/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h index c46edbb80e..f538c516c3 100644 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h +++ b/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h @@ -86,6 +86,7 @@ namespace AZ class AssetTreeNodeBase { public: + virtual ~AssetTreeNodeBase() = default; virtual const AssetPrimaryInfo* GetAssetPrimaryInfo() const = 0; virtual AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) = 0; }; @@ -94,6 +95,7 @@ namespace AZ class AssetTreeBase { public: + virtual ~AssetTreeBase() = default; virtual AssetTreeNodeBase& GetRoot() = 0; }; @@ -101,6 +103,7 @@ namespace AZ class AssetAllocationTableBase { public: + virtual ~AssetAllocationTableBase() = default; virtual AssetTreeNodeBase* FindAllocation(void* ptr) const = 0; }; } diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h b/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h index 7916a442b5..eac809c406 100644 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h +++ b/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h @@ -31,6 +31,8 @@ namespace AZ { } + ~AssetTreeNode() override = default; + const AssetPrimaryInfo* GetAssetPrimaryInfo() const override { return m_primaryinfo; @@ -67,6 +69,8 @@ namespace AZ class AssetTree : public AssetTreeBase { public: + ~AssetTree() override = default; + AssetTreeNodeBase& GetRoot() override { return m_rootAssets; @@ -99,6 +103,7 @@ namespace AZ AllocationTable(mutex_type& mutex) : m_mutex(mutex) { } + ~AllocationTable() override = default; AssetTreeNodeBase* FindAllocation(void* ptr) const override { diff --git a/Code/Framework/AzCore/AzCore/Debug/BudgetTracker.h b/Code/Framework/AzCore/AzCore/Debug/BudgetTracker.h index 1357bb5870..34d8510349 100644 --- a/Code/Framework/AzCore/AzCore/Debug/BudgetTracker.h +++ b/Code/Framework/AzCore/AzCore/Debug/BudgetTracker.h @@ -19,7 +19,7 @@ namespace AZ::Debug class BudgetTracker { public: - AZ_RTTI(BudgetTracker, "{E14A746D-BFFE-4C02-90FB-4699B79864A5}"); + AZ_TYPE_INFO(BudgetTracker, "{E14A746D-BFFE-4C02-90FB-4699B79864A5}"); static Budget* GetBudgetFromEnvironment(const char* budgetName, uint32_t crc); ~BudgetTracker(); diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h index 16d8f4fba3..32726931fc 100644 --- a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h +++ b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h @@ -28,21 +28,21 @@ namespace AZ protected: ////////////////////////////////////////////////////////////////////////// // Driller - virtual const char* GroupName() const { return "SystemDrillers"; } - virtual const char* GetName() const { return "TraceMessagesDriller"; } - virtual const char* GetDescription() const { return "Handles all system messages like Assert, Exception, Error, Warning, Printf, etc."; } - virtual void Start(const Param* params = NULL, int numParams = 0); - virtual void Stop(); + const char* GroupName() const override { return "SystemDrillers"; } + const char* GetName() const override { return "TraceMessagesDriller"; } + const char* GetDescription() const override { return "Handles all system messages like Assert, Exception, Error, Warning, Printf, etc."; } + void Start(const Param* params = NULL, int numParams = 0) override; + void Stop() override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // TraceMessagesDrillerBus /// Triggered when a AZ_Assert failed. This is terminating event! (the code will break, crash). - virtual void OnAssert(const char* message); - virtual void OnException(const char* message); - virtual void OnError(const char* window, const char* message); - virtual void OnWarning(const char* window, const char* message); - virtual void OnPrintf(const char* window, const char* message); + void OnAssert(const char* message) override; + void OnException(const char* message) override; + void OnError(const char* window, const char* message) override; + void OnWarning(const char* window, const char* message) override; + void OnPrintf(const char* window, const char* message) override; ////////////////////////////////////////////////////////////////////////// }; } // namespace Debug diff --git a/Code/Framework/AzCore/AzCore/Driller/Stream.h b/Code/Framework/AzCore/AzCore/Driller/Stream.h index f883984b11..5efa416ef4 100644 --- a/Code/Framework/AzCore/AzCore/Driller/Stream.h +++ b/Code/Framework/AzCore/AzCore/Driller/Stream.h @@ -443,7 +443,7 @@ namespace AZ const unsigned char* GetData() const { return m_data.data(); } unsigned int GetDataSize() const { return static_cast(m_data.size()); } inline void Reset() { m_data.clear(); } - virtual void WriteBinary(const void* data, unsigned int dataSize) + void WriteBinary(const void* data, unsigned int dataSize) override { m_data.insert(m_data.end(), reinterpret_cast(data), reinterpret_cast(data) + dataSize); } @@ -489,7 +489,7 @@ namespace AZ } unsigned int GetDataLeft() const { return static_cast(m_dataEnd - m_data); } - virtual unsigned int ReadBinary(void* data, unsigned int maxDataSize) + unsigned int ReadBinary(void* data, unsigned int maxDataSize) override { AZ_Assert(m_data != nullptr, "You must call SetData function, before you can read data!"); AZ_Assert(data != nullptr && maxDataSize > 0, "We must have a valid pointer and max data size!"); @@ -523,7 +523,7 @@ namespace AZ bool Open(const char* fileName, int mode, int platformFlags = 0); void Close(); - virtual void WriteBinary(const void* data, unsigned int dataSize); + void WriteBinary(const void* data, unsigned int dataSize) override; }; /** @@ -540,7 +540,7 @@ namespace AZ DrillerInputFileStream(); ~DrillerInputFileStream(); bool Open(const char* fileName, int mode, int platformFlags = 0); - virtual unsigned int ReadBinary(void* data, unsigned int maxDataSize); + unsigned int ReadBinary(void* data, unsigned int maxDataSize) override; void Close(); }; diff --git a/Code/Framework/AzCore/AzCore/IO/CompressorZLib.h b/Code/Framework/AzCore/AzCore/IO/CompressorZLib.h index abd21e1450..dd1fb226c3 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressorZLib.h +++ b/Code/Framework/AzCore/AzCore/IO/CompressorZLib.h @@ -98,21 +98,21 @@ namespace AZ /// Return compressor type id. static AZ::u32 TypeId(); - virtual AZ::u32 GetTypeId() const { return TypeId(); } + AZ::u32 GetTypeId() const override { return TypeId(); } /// Called when we open a stream to Read for the first time. Data contains the first. dataSize <= m_maxHeaderSize. - virtual bool ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize); + bool ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) override; /// Called when we are about to start writing to a compressed stream. - virtual bool WriteHeaderAndData(CompressorStream* stream); + bool WriteHeaderAndData(CompressorStream* stream) override; /// Forwarded function from the Device when we from a compressed stream. - virtual SizeType Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer); + SizeType Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) override; /// Forwarded function from the Device when we write to a compressed stream. - virtual SizeType Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset = SizeType(-1)); + SizeType Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset = SizeType(-1)) override; /// Write a seek point. - virtual bool WriteSeekPoint(CompressorStream* stream); + bool WriteSeekPoint(CompressorStream* stream) override; /// Set auto seek point even dataSize bytes. - virtual bool StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize); + bool StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) override; /// Called just before we close the stream. All compression data will be flushed and finalized. (You can't add data afterwards). - virtual bool Close(CompressorStream* stream); + bool Close(CompressorStream* stream) override; protected: diff --git a/Code/Framework/AzCore/AzCore/Jobs/Internal/JobNotify.h b/Code/Framework/AzCore/AzCore/Jobs/Internal/JobNotify.h index 9b6a39af4f..1c15b7105e 100644 --- a/Code/Framework/AzCore/AzCore/Jobs/Internal/JobNotify.h +++ b/Code/Framework/AzCore/AzCore/Jobs/Internal/JobNotify.h @@ -31,7 +31,7 @@ namespace AZ { } protected: - virtual void Process() + void Process() override { m_notifyFlag->store(true, AZStd::memory_order_release); } diff --git a/Code/Framework/AzCore/AzCore/Math/InterpolationSample.h b/Code/Framework/AzCore/AzCore/Math/InterpolationSample.h index 12b18f86b8..942f02727e 100644 --- a/Code/Framework/AzCore/AzCore/Math/InterpolationSample.h +++ b/Code/Framework/AzCore/AzCore/Math/InterpolationSample.h @@ -77,7 +77,7 @@ namespace AZ : public Sample { public: - Vector3 GetInterpolatedValue(TimeType time) override final + Vector3 GetInterpolatedValue(TimeType time) final { Vector3 interpolatedValue = m_previousValue; if (m_targetTimestamp != 0) @@ -108,7 +108,7 @@ namespace AZ : public Sample { public: - Quaternion GetInterpolatedValue(TimeType time) override final + Quaternion GetInterpolatedValue(TimeType time) final { Quaternion interpolatedValue = m_previousValue; if (m_targetTimestamp != 0) @@ -144,7 +144,7 @@ namespace AZ : public Sample { public: - Vector3 GetInterpolatedValue(TimeType /*time*/) override final + Vector3 GetInterpolatedValue(TimeType /*time*/) final { return GetTargetValue(); } @@ -155,7 +155,7 @@ namespace AZ : public Sample { public: - Quaternion GetInterpolatedValue(TimeType /*time*/) override final + Quaternion GetInterpolatedValue(TimeType /*time*/) final { return GetTargetValue(); } diff --git a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h index f6c6f98315..f72ae31057 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h @@ -48,18 +48,18 @@ namespace AZ HeapSchema(const Descriptor& desc); virtual ~HeapSchema(); - virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0); - virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0); - virtual pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) { (void)ptr; (void)newSize; (void)newAlignment; return NULL; } - virtual size_type Resize(pointer_type ptr, size_type newSize) { (void)ptr; (void)newSize; return 0; } - virtual size_type AllocationSize(pointer_type ptr); + pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; + void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; + pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override { (void)ptr; (void)newSize; (void)newAlignment; return NULL; } + size_type Resize(pointer_type ptr, size_type newSize) override { (void)ptr; (void)newSize; return 0; } + size_type AllocationSize(pointer_type ptr) override; - virtual size_type NumAllocatedBytes() const { return m_used; } - virtual size_type Capacity() const { return m_capacity; } - virtual size_type GetMaxAllocationSize() const; - size_type GetMaxContiguousAllocationSize() const override; - virtual IAllocatorAllocate* GetSubAllocator() { return m_subAllocator; } - virtual void GarbageCollect() {} + size_type NumAllocatedBytes() const override { return m_used; } + size_type Capacity() const override { return m_capacity; } + size_type GetMaxAllocationSize() const override; + size_type GetMaxContiguousAllocationSize() const override; + IAllocatorAllocate* GetSubAllocator() override { return m_subAllocator; } + void GarbageCollect() override {} private: AZ_FORCE_INLINE size_type ChunckSize(pointer_type ptr); diff --git a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.h b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.h index 0f84ca1e68..5ee0205196 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.h @@ -56,22 +56,22 @@ namespace AZ HphaSchema(const Descriptor& desc); virtual ~HphaSchema(); - virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0); - virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0); - virtual pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment); + pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; + void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; + pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; /// Resizes allocated memory block to the size possible and returns that size. - virtual size_type Resize(pointer_type ptr, size_type newSize); - virtual size_type AllocationSize(pointer_type ptr); + size_type Resize(pointer_type ptr, size_type newSize) override; + size_type AllocationSize(pointer_type ptr) override; - virtual size_type NumAllocatedBytes() const; - virtual size_type Capacity() const; - virtual size_type GetMaxAllocationSize() const; - size_type GetMaxContiguousAllocationSize() const override; - virtual size_type GetUnAllocatedMemory(bool isPrint = false) const; - virtual IAllocatorAllocate* GetSubAllocator() { return m_desc.m_subAllocator; } + size_type NumAllocatedBytes() const override; + size_type Capacity() const override; + size_type GetMaxAllocationSize() const override; + size_type GetMaxContiguousAllocationSize() const override; + size_type GetUnAllocatedMemory(bool isPrint = false) const override; + IAllocatorAllocate* GetSubAllocator() override { return m_desc.m_subAllocator; } /// Return unused memory to the OS (if we don't use fixed block). Don't call this unless you really need free memory, it is slow. - virtual void GarbageCollect(); + void GarbageCollect() override; private: // [LY-84974][sconel@][2018-08-10] SliceStrike integration up to CL 671758 diff --git a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.h b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.h index cbf928e189..7a8c4a0366 100644 --- a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.h @@ -41,18 +41,18 @@ namespace AZ //--------------------------------------------------------------------- // IAllocatorAllocate //--------------------------------------------------------------------- - virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; - virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; - virtual pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; - virtual size_type Resize(pointer_type ptr, size_type newSize) override; - virtual size_type AllocationSize(pointer_type ptr) override; + pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; + void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; + pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; + size_type Resize(pointer_type ptr, size_type newSize) override; + size_type AllocationSize(pointer_type ptr) override; - virtual size_type NumAllocatedBytes() const override; - virtual size_type Capacity() const override; - virtual size_type GetMaxAllocationSize() const override; - virtual size_type GetMaxContiguousAllocationSize() const override; - virtual IAllocatorAllocate* GetSubAllocator() override; - virtual void GarbageCollect() override; + size_type NumAllocatedBytes() const override; + size_type Capacity() const override; + size_type GetMaxAllocationSize() const override; + size_type GetMaxContiguousAllocationSize() const override; + IAllocatorAllocate* GetSubAllocator() override; + void GarbageCollect() override; private: typedef void* (*MallocFn)(size_t); diff --git a/Code/Framework/AzCore/AzCore/Memory/Memory.h b/Code/Framework/AzCore/AzCore/Memory/Memory.h index d09003f3f0..2e08ec1b15 100644 --- a/Code/Framework/AzCore/AzCore/Memory/Memory.h +++ b/Code/Framework/AzCore/AzCore/Memory/Memory.h @@ -849,7 +849,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/AzCore/AzCore/Memory/MemoryDriller.h b/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h index 94c364c719..9bcbc85217 100644 --- a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h +++ b/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h @@ -38,24 +38,24 @@ namespace AZ protected: ////////////////////////////////////////////////////////////////////////// // Driller - virtual const char* GroupName() const { return "SystemDrillers"; } - virtual const char* GetName() const { return "MemoryDriller"; } - virtual const char* GetDescription() const { return "Reports all allocators and memory allocations."; } - virtual void Start(const Param* params = NULL, int numParams = 0); - virtual void Stop(); + const char* GroupName() const override { return "SystemDrillers"; } + const char* GetName() const override { return "MemoryDriller"; } + const char* GetDescription() const override { return "Reports all allocators and memory allocations."; } + void Start(const Param* params = NULL, int numParams = 0) override; + void Stop() override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // MemoryDrillerBus - virtual void RegisterAllocator(IAllocator* allocator); - virtual void UnregisterAllocator(IAllocator* allocator); + void RegisterAllocator(IAllocator* allocator) override; + void UnregisterAllocator(IAllocator* allocator) override; - virtual void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount); - virtual void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info); - virtual void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment); - virtual void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize); + void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) override; + void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) override; + void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) override; + void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) override; - virtual void DumpAllAllocations(); + void DumpAllAllocations() override; ////////////////////////////////////////////////////////////////////////// void RegisterAllocatorOutput(IAllocator* allocator); diff --git a/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.h b/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.h index 3dffdfad56..9895a5f84f 100644 --- a/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.h @@ -77,18 +77,18 @@ namespace AZ //--------------------------------------------------------------------- // IAllocatorAllocate //--------------------------------------------------------------------- - virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; - virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; - virtual pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; - virtual size_type Resize(pointer_type ptr, size_type newSize) override; - virtual size_type AllocationSize(pointer_type ptr) override; + pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; + void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; + pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; + size_type Resize(pointer_type ptr, size_type newSize) override; + size_type AllocationSize(pointer_type ptr) override; - virtual size_type NumAllocatedBytes() const override; - virtual size_type Capacity() const override; - virtual size_type GetMaxAllocationSize() const override; + size_type NumAllocatedBytes() const override; + size_type Capacity() const override; + size_type GetMaxAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override; - virtual IAllocatorAllocate* GetSubAllocator() override; - virtual void GarbageCollect() override; + IAllocatorAllocate* GetSubAllocator() override; + void GarbageCollect() override; private: OverrunDetectionSchemaImpl* m_impl; diff --git a/Code/Framework/AzCore/AzCore/Module/Module.h b/Code/Framework/AzCore/AzCore/Module/Module.h index a4843f002c..3809bd1bb4 100644 --- a/Code/Framework/AzCore/AzCore/Module/Module.h +++ b/Code/Framework/AzCore/AzCore/Module/Module.h @@ -62,7 +62,7 @@ namespace AZ * DO NOT OVERRIDE. This method will return in the future, but at this point things reflected here are not unreflected for all ReflectContexts (Serialize, Editor, Network, Script, etc.) * Place all calls to non-component reflect functions inside of a component reflect function to ensure that your types are unreflected. */ - virtual void Reflect(AZ::ReflectContext*) final { } + void Reflect(AZ::ReflectContext*) {} /** * Override to require specific components on the system entity. diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h index b436f5adab..0a1af21213 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h +++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h @@ -594,8 +594,8 @@ namespace AZ void SetArgumentName(size_t index, const AZStd::string& name) override; const AZStd::string* GetArgumentToolTip(size_t index) const override; void SetArgumentToolTip(size_t index, const AZStd::string& name) override; - virtual void SetDefaultValue(size_t index, BehaviorDefaultValuePtr defaultValue) override; - virtual BehaviorDefaultValuePtr GetDefaultValue(size_t index) const override; + void SetDefaultValue(size_t index, BehaviorDefaultValuePtr defaultValue) override; + BehaviorDefaultValuePtr GetDefaultValue(size_t index) const override; const BehaviorParameter* GetResult() const override; void OverrideParameterTraits(size_t index, AZ::u32 addTraits, AZ::u32 removeTraits) override; diff --git a/Code/Framework/AzCore/AzCore/RTTI/RTTI.h b/Code/Framework/AzCore/AzCore/RTTI/RTTI.h index fa081a9497..acf6f64f77 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/RTTI.h +++ b/Code/Framework/AzCore/AzCore/RTTI/RTTI.h @@ -5,8 +5,8 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZCORE_RTTI_H -#define AZCORE_RTTI_H + +#pragma once #include #include @@ -44,21 +44,9 @@ namespace AZ /// RTTI typeId typedef void (* RTTI_EnumCallback)(const AZ::TypeId& /*typeId*/, void* /*userData*/); - // Disabling missing override warning because we intentionally want to allow for declaring RTTI base classes that don't impelment RTTI. -#if defined(AZ_COMPILER_CLANG) -# define AZ_PUSH_DISABLE_OVERRIDE_WARNING \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Winconsistent-missing-override\"") -# define AZ_POP_DISABLE_OVERRIDE_WARNING \ - _Pragma("clang diagnostic pop") -#else -# define AZ_PUSH_DISABLE_OVERRIDE_WARNING -# define AZ_POP_DISABLE_OVERRIDE_WARNING -#endif - // We require AZ_TYPE_INFO to be declared #define AZ_RTTI_COMMON() \ - AZ_PUSH_DISABLE_OVERRIDE_WARNING \ + AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \ void RTTI_Enable(); \ virtual inline const AZ::TypeId& RTTI_GetType() const { return RTTI_Type(); } \ virtual inline const char* RTTI_GetTypeName() const { return RTTI_TypeName(); } \ @@ -66,7 +54,7 @@ namespace AZ virtual void RTTI_EnumTypes(AZ::RTTI_EnumCallback cb, void* userData) { RTTI_EnumHierarchy(cb, userData); } \ static inline const AZ::TypeId& RTTI_Type() { return TYPEINFO_Uuid(); } \ static inline const char* RTTI_TypeName() { return TYPEINFO_Name(); } \ - AZ_POP_DISABLE_OVERRIDE_WARNING + AZ_POP_DISABLE_WARNING //#define AZ_RTTI_1(_1) static_assert(false,"You must provide a valid classUuid!") @@ -74,8 +62,10 @@ namespace AZ #define AZ_RTTI_1() AZ_RTTI_COMMON() \ static bool RTTI_IsContainType(const AZ::TypeId& id) { return id == RTTI_Type(); } \ static void RTTI_EnumHierarchy(AZ::RTTI_EnumCallback cb, void* userData) { cb(RTTI_Type(), userData); } \ + AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { return (id == RTTI_Type()) ? this : nullptr; } \ - virtual inline void* RTTI_AddressOf(const AZ::TypeId& id) { return (id == RTTI_Type()) ? this : nullptr; } + virtual inline void* RTTI_AddressOf(const AZ::TypeId& id) { return (id == RTTI_Type()) ? this : nullptr; } \ + AZ_POP_DISABLE_WARNING /// AZ_RTTI(BaseClass) #define AZ_RTTI_2(_1) AZ_RTTI_COMMON() \ @@ -85,14 +75,14 @@ namespace AZ static void RTTI_EnumHierarchy(AZ::RTTI_EnumCallback cb, void* userData) { \ cb(RTTI_Type(), userData); \ AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, userData); } \ - AZ_PUSH_DISABLE_OVERRIDE_WARNING \ + AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \ if (id == RTTI_Type()) { return this; } \ return AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); } \ virtual inline void* RTTI_AddressOf(const AZ::TypeId& id) { \ if (id == RTTI_Type()) { return this; } \ return AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); } \ - AZ_POP_DISABLE_OVERRIDE_WARNING + AZ_POP_DISABLE_WARNING /// AZ_RTTI(BaseClass1,BaseClass2) #define AZ_RTTI_3(_1, _2) AZ_RTTI_COMMON() \ @@ -104,7 +94,7 @@ namespace AZ cb(RTTI_Type(), userData); \ AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_2>::RTTI_EnumHierarchy(cb, userData); } \ - AZ_PUSH_DISABLE_OVERRIDE_WARNING \ + AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \ if (id == RTTI_Type()) { return this; } \ const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ @@ -113,7 +103,7 @@ namespace AZ if (id == RTTI_Type()) { return this; } \ void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ return AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); } \ - AZ_POP_DISABLE_OVERRIDE_WARNING + AZ_POP_DISABLE_WARNING /// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3) #define AZ_RTTI_4(_1, _2, _3) AZ_RTTI_COMMON() \ @@ -127,7 +117,7 @@ namespace AZ AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_2>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_3>::RTTI_EnumHierarchy(cb, userData); } \ - AZ_PUSH_DISABLE_OVERRIDE_WARNING \ + AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \ if (id == RTTI_Type()) { return this; } \ const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ @@ -138,7 +128,7 @@ namespace AZ void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ r = AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); if (r) { return r; } \ return AZ::Internal::RttiCaller<_3>::RTTI_AddressOf(this, id); } \ - AZ_POP_DISABLE_OVERRIDE_WARNING + AZ_POP_DISABLE_WARNING /// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3,BaseClass4) #define AZ_RTTI_5(_1, _2, _3, _4) AZ_RTTI_COMMON() \ @@ -154,7 +144,7 @@ namespace AZ AZ::Internal::RttiCaller<_2>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_3>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_4>::RTTI_EnumHierarchy(cb, userData); } \ - AZ_PUSH_DISABLE_OVERRIDE_WARNING \ + AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \ if (id == RTTI_Type()) { return this; } \ const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ @@ -167,7 +157,7 @@ namespace AZ r = AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); if (r) { return r; } \ r = AZ::Internal::RttiCaller<_3>::RTTI_AddressOf(this, id); if (r) { return r; } \ return AZ::Internal::RttiCaller<_4>::RTTI_AddressOf(this, id); } \ - AZ_POP_DISABLE_OVERRIDE_WARNING + AZ_POP_DISABLE_WARNING /// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3,BaseClass4,BaseClass5) #define AZ_RTTI_6(_1, _2, _3, _4, _5) AZ_RTTI_COMMON() \ @@ -185,7 +175,7 @@ namespace AZ AZ::Internal::RttiCaller<_3>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_4>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_5>::RTTI_EnumHierarchy(cb, userData); } \ - AZ_PUSH_DISABLE_OVERRIDE_WARNING \ + AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \ if (id == RTTI_Type()) { return this; } \ const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ @@ -200,7 +190,7 @@ namespace AZ r = AZ::Internal::RttiCaller<_3>::RTTI_AddressOf(this, id); if (r) { return r; } \ r = AZ::Internal::RttiCaller<_4>::RTTI_AddressOf(this, id); if (r) { return r; } \ return AZ::Internal::RttiCaller<_5>::RTTI_AddressOf(this, id); } \ - AZ_POP_DISABLE_OVERRIDE_WARNING + AZ_POP_DISABLE_WARNING ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // MACRO specialization to allow optional parameters for template version of AZ_RTTI @@ -951,10 +941,7 @@ namespace AZ { return AZStd::shared_ptr(ptr, castPtr); } - else - { - return AZStd::shared_ptr(); - } + return AZStd::shared_ptr(); } // RttiCast specialization for intrusive_ptr. @@ -1077,7 +1064,6 @@ namespace AZ { return AZ::Internal::RttiIsTypeOfIdHelper::Check(id, data, typename HasAZRtti>::kind_type()); } + } // namespace AZ -#endif // AZCORE_RTTI_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.h b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.h index c46ba32209..a691bb1bcb 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.h +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.h @@ -19,8 +19,8 @@ namespace AZ public: AZ_COMPONENT(JsonSystemComponent, "{3C2C7234-9512-4E24-86F0-C40865D7EECE}", Component); - void Activate(); - void Deactivate(); + void Activate() override; + void Deactivate() override; static void Reflect(ReflectContext* reflectContext); }; diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/MapSerializer.h b/Code/Framework/AzCore/AzCore/Serialization/Json/MapSerializer.h index e0d2635fc3..937c8389ff 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/MapSerializer.h +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/MapSerializer.h @@ -46,7 +46,8 @@ namespace AZ public: AZ_RTTI(JsonUnorderedMapSerializer, "{EF4478D3-1820-4FDB-A7B7-C9711EB41602}", JsonMapSerializer); AZ_CLASS_ALLOCATOR_DECL; - + + using JsonMapSerializer::Store; JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, const Uuid& valueTypeId, JsonSerializerContext& context) override; }; @@ -63,6 +64,7 @@ namespace AZ const SerializeContext::ClassElement* keyElement, const SerializeContext::ClassElement* valueElement, const rapidjson::Value& key, const rapidjson::Value& value, JsonDeserializerContext& context) override; + using JsonMapSerializer::Store; JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, const Uuid& valueTypeId, JsonSerializerContext& context) override; }; diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp index 71ffece892..5290c9b02a 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp @@ -78,6 +78,7 @@ namespace AZ::Internal struct EnginePathsVisitor : public AZ::SettingsRegistryInterface::Visitor { + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit( [[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName, [[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override @@ -355,6 +356,7 @@ namespace AZ::SettingsRegistryMergeUtils : m_settingsSpecialization{ specializations } {} + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit([[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName, [[maybe_unused]] AZ::SettingsRegistryInterface::Type type, bool value) override { @@ -761,6 +763,7 @@ namespace AZ::SettingsRegistryMergeUtils return SettingsRegistryInterface::VisitResponse::Continue; } + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view, [[maybe_unused]] AZStd::string_view valueName, SettingsRegistryInterface::Type, AZStd::string_view value) override { if (processingSourcePathKey) @@ -896,6 +899,7 @@ namespace AZ::SettingsRegistryMergeUtils struct CommandLineVisitor : AZ::SettingsRegistryInterface::Visitor { + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type , AZStd::string_view value) override { diff --git a/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h b/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h index d9e3dfad1e..e5dcb32d9d 100644 --- a/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h +++ b/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h @@ -131,17 +131,23 @@ namespace UnitTest , public AllocatorsBase { public: - // Bring in both const and non-const SetUp and TearDown function into scope to resolve warning 4266 - // no override available for virtual member function from base 'benchmark::Fixture'; function is hidden - using ::benchmark::Fixture::SetUp, ::benchmark::Fixture::TearDown; - //Benchmark interface + void SetUp(const ::benchmark::State& st) override + { + AZ_UNUSED(st); + SetupAllocator(); + } void SetUp(::benchmark::State& st) override { AZ_UNUSED(st); SetupAllocator(); } + void TearDown(const ::benchmark::State& st) override + { + AZ_UNUSED(st); + TeardownAllocator(); + } void TearDown(::benchmark::State& st) override { AZ_UNUSED(st); diff --git a/Code/Framework/AzCore/AzCore/UserSettings/UserSettingsProvider.h b/Code/Framework/AzCore/AzCore/UserSettings/UserSettingsProvider.h index 4721d3baa8..6a807c915e 100644 --- a/Code/Framework/AzCore/AzCore/UserSettings/UserSettingsProvider.h +++ b/Code/Framework/AzCore/AzCore/UserSettings/UserSettingsProvider.h @@ -116,9 +116,9 @@ namespace AZ ////////////////////////////////////////////////////////////////////////// // UserSettingsBus - virtual AZStd::intrusive_ptr FindUserSettings(u32 id); - virtual void AddUserSettings(u32 id, UserSettings* settings); - virtual bool Save(const char* settingsPath, SerializeContext* sc); + AZStd::intrusive_ptr FindUserSettings(u32 id) override; + void AddUserSettings(u32 id, UserSettings* settings) override; + bool Save(const char* settingsPath, SerializeContext* sc) override; ////////////////////////////////////////////////////////////////////////// static void Reflect(ReflectContext* reflection); diff --git a/Code/Framework/AzCore/AzCore/std/algorithm.h b/Code/Framework/AzCore/AzCore/std/algorithm.h index 3508eff2b4..e28d127062 100644 --- a/Code/Framework/AzCore/AzCore/std/algorithm.h +++ b/Code/Framework/AzCore/AzCore/std/algorithm.h @@ -831,7 +831,6 @@ namespace AZStd // find first element that value is before, using operator< typename iterator_traits::difference_type count = AZStd::distance(first, last); typename iterator_traits::difference_type step{}; - count = AZStd::distance(first, last); for (; 0 < count; ) { // divide and conquer, find half that contains answer step = count / 2; diff --git a/Code/Framework/AzCore/AzCore/std/parallel/thread.h b/Code/Framework/AzCore/AzCore/std/parallel/thread.h index 9f7830c91b..15d8c9dc8e 100644 --- a/Code/Framework/AzCore/AzCore/std/parallel/thread.h +++ b/Code/Framework/AzCore/AzCore/std/parallel/thread.h @@ -187,7 +187,7 @@ namespace AZStd : m_f(AZStd::move(f)) {} thread_info_impl(Internal::thread_move_t f) : m_f(f) {} - virtual void execute() { m_f(); } + void execute() override { m_f(); } private: F m_f; diff --git a/Code/Framework/AzCore/AzCore/std/smart_ptr/shared_count.h b/Code/Framework/AzCore/AzCore/std/smart_ptr/shared_count.h index c86adbd69e..ac49dc9ae5 100644 --- a/Code/Framework/AzCore/AzCore/std/smart_ptr/shared_count.h +++ b/Code/Framework/AzCore/AzCore/std/smart_ptr/shared_count.h @@ -129,16 +129,16 @@ namespace AZStd { } - virtual void dispose() // nothrow + void dispose() override // nothrow { AZStd::checked_delete(px_); } - virtual void destroy() // nothrow + void destroy() override // nothrow { this->~this_type(); a_.deallocate(this, sizeof(this_type), AZStd::alignment_of::value); } - virtual void* get_deleter(Internal::sp_typeinfo const&) + void* get_deleter(Internal::sp_typeinfo const&) override { return 0; } @@ -176,18 +176,18 @@ namespace AZStd { } - virtual void dispose() // nothrow + void dispose() override // nothrow { d_(p_); } - virtual void destroy() // nothrow + void destroy() override // nothrow { this->~this_type(); a_.deallocate(this, sizeof(this_type), AZStd::alignment_of::value); } - virtual void* get_deleter(Internal::sp_typeinfo const& ti) + void* get_deleter(Internal::sp_typeinfo const& ti) override { return ti == aztypeid(D) ? &reinterpret_cast(d_) : 0; } diff --git a/Code/Framework/AzCore/AzCore/std/string/regex.h b/Code/Framework/AzCore/AzCore/std/string/regex.h index 2ca223937b..3d4a2a0b38 100644 --- a/Code/Framework/AzCore/AzCore/std/string/regex.h +++ b/Code/Framework/AzCore/AzCore/std/string/regex.h @@ -215,6 +215,7 @@ namespace AZStd struct ErrorSink { + virtual ~ErrorSink() = default; virtual void RegexError(regex_constants::error_type code) = 0; }; } @@ -1079,7 +1080,7 @@ namespace AZStd NodeBase* m_next; NodeBase* m_previous; - virtual ~NodeBase() { } + virtual ~NodeBase() = default; }; inline void DestroyNode(NodeBase* node, NodeBase* end = nullptr) @@ -1758,7 +1759,7 @@ namespace AZStd return (*this); } - ~basic_regex() + ~basic_regex() override { // destroy the object Clear(); } @@ -2916,7 +2917,7 @@ namespace AZStd } template - inline NodeBase* Builder::BeginGroup(void) + inline NodeBase* Builder::BeginGroup() { // add group node return (NewNode(NT_group)); } @@ -3026,7 +3027,7 @@ namespace AZStd } template - inline RootNode* Builder::EndPattern(void) + inline RootNode* Builder::EndPattern() { // wrap up NewNode(NT_end); return m_root; diff --git a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Memory/OverrunDetectionAllocator_WinAPI.h b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Memory/OverrunDetectionAllocator_WinAPI.h index 19f83374e7..b5cdc11d5d 100644 --- a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Memory/OverrunDetectionAllocator_WinAPI.h +++ b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Memory/OverrunDetectionAllocator_WinAPI.h @@ -21,7 +21,7 @@ namespace AZ class WinAPIOverrunDetectionSchema : public OverrunDetectionSchema::PlatformAllocator { public: - virtual SystemInformation GetSystemInformation() override + SystemInformation GetSystemInformation() override { SystemInformation result; SYSTEM_INFO info; @@ -32,7 +32,7 @@ namespace AZ return result; } - virtual void* ReserveBytes(size_t amount) override + void* ReserveBytes(size_t amount) override { void* result = VirtualAlloc(0, amount, MEM_RESERVE, PAGE_NOACCESS); @@ -45,12 +45,12 @@ namespace AZ return result; } - virtual void ReleaseReservedBytes(void* base) override + void ReleaseReservedBytes(void* base) override { VirtualFree(base, 0, MEM_RELEASE); } - virtual void* CommitBytes(void* base, size_t amount) override + void* CommitBytes(void* base, size_t amount) override { void* result = VirtualAlloc(base, amount, MEM_COMMIT, PAGE_READWRITE); @@ -63,7 +63,7 @@ namespace AZ return result; } - virtual void DecommitBytes(void* base, size_t amount) override + void DecommitBytes(void* base, size_t amount) override { VirtualFree(base, amount, MEM_DECOMMIT); } diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp index fe6d83b7a4..0a73da5a92 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp @@ -267,6 +267,7 @@ namespace AZ::IO SettingsRegistryInterface::VisitResponse::Continue : SettingsRegistryInterface::VisitResponse::Skip; } + using SettingsRegistryInterface::Visitor::Visit; void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName, [[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override { diff --git a/Code/Framework/AzCore/Tests/AssetJsonSerializerTests.cpp b/Code/Framework/AzCore/Tests/AssetJsonSerializerTests.cpp index 2ca564681c..e968ee28fc 100644 --- a/Code/Framework/AzCore/Tests/AssetJsonSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/AssetJsonSerializerTests.cpp @@ -100,6 +100,7 @@ namespace JsonSerializationTests AZ::AllocatorInstance::Destroy(); } + using JsonSerializerConformityTestDescriptor>::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); diff --git a/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp b/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp index cf212aa34c..34076a10f6 100644 --- a/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp +++ b/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp @@ -956,18 +956,8 @@ AZ_POP_DISABLE_WARNING namespace Benchmark { class PathBenchmarkFixture - : public ::benchmark::Fixture - , public ::UnitTest::AllocatorsBase + : public ::UnitTest::AllocatorsBenchmarkFixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override - { - ::UnitTest::AllocatorsBase::SetupAllocator(); - } - void TearDown([[maybe_unused]] const ::benchmark::State& state) override - { - ::UnitTest::AllocatorsBase::TeardownAllocator(); - } protected: AZStd::fixed_vector m_appendPaths{ "foo", "bar", "baz", "bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz", "boo/bar/base", "C:\\path\\to\\O3DE", "C", "\\\\", "/", R"(test\\path/with\mixed\separators)" }; diff --git a/Code/Framework/AzCore/Tests/Jobs.cpp b/Code/Framework/AzCore/Tests/Jobs.cpp index b63e139dd0..041f4970d1 100644 --- a/Code/Framework/AzCore/Tests/Jobs.cpp +++ b/Code/Framework/AzCore/Tests/Jobs.cpp @@ -1704,7 +1704,7 @@ namespace Benchmark static const AZ::u32 MEDIUM_NUMBER_OF_JOBS = 1024; static const AZ::u32 LARGE_NUMBER_OF_JOBS = 16384; - void SetUp([[maybe_unused]] ::benchmark::State& state) override + void internalSetUp() { AllocatorInstance::Create(); AllocatorInstance::Create(); @@ -1749,8 +1749,16 @@ namespace Benchmark return randomDepthDistribution(randomDepthGenerator); }); } + void SetUp(::benchmark::State&) override + { + internalSetUp(); + } + void SetUp(const ::benchmark::State&) override + { + internalSetUp(); + } - void TearDown([[maybe_unused]] ::benchmark::State& state) override + void internalTearDown() { JobContext::SetGlobalContext(nullptr); @@ -1763,6 +1771,14 @@ namespace Benchmark AllocatorInstance::Destroy(); AllocatorInstance::Destroy(); } + void TearDown(::benchmark::State&) override + { + internalTearDown(); + } + void TearDown(const ::benchmark::State&) override + { + internalTearDown(); + } protected: inline void RunCalculatePiJob(AZ::s32 depth, AZ::s8 priority) diff --git a/Code/Framework/AzCore/Tests/Math/FrustumPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/FrustumPerformanceTests.cpp index b132c9f726..e26d896e5a 100644 --- a/Code/Framework/AzCore/Tests/Math/FrustumPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/FrustumPerformanceTests.cpp @@ -19,8 +19,7 @@ namespace Benchmark class BM_MathFrustum : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_testFrustum = AZ::Frustum(AZ::ViewFrustumAttributes(AZ::Transform::CreateIdentity(), 1.0f, 2.0f * atanf(0.5f), 10.0f, 90.0f)); @@ -40,6 +39,15 @@ namespace Benchmark return data; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct Data { diff --git a/Code/Framework/AzCore/Tests/Math/Matrix3x3PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Matrix3x3PerformanceTests.cpp index f345f26d06..918673d475 100644 --- a/Code/Framework/AzCore/Tests/Math/Matrix3x3PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Matrix3x3PerformanceTests.cpp @@ -23,8 +23,7 @@ namespace Benchmark class BM_MathMatrix3x3 : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_testDataArray.resize(1000); @@ -44,6 +43,15 @@ namespace Benchmark return testData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct TestData { diff --git a/Code/Framework/AzCore/Tests/Math/Matrix3x4PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Matrix3x4PerformanceTests.cpp index 9aed29005d..63ddefdd2c 100644 --- a/Code/Framework/AzCore/Tests/Math/Matrix3x4PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Matrix3x4PerformanceTests.cpp @@ -21,8 +21,7 @@ namespace Benchmark class BM_MathMatrix3x4 : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const::benchmark::State& state) override + void internalSetUp() { m_testDataArray.resize(1000); @@ -58,6 +57,15 @@ namespace Benchmark return testData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct TestData { diff --git a/Code/Framework/AzCore/Tests/Math/Matrix4x4PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Matrix4x4PerformanceTests.cpp index 90865064c8..21f440c3a1 100644 --- a/Code/Framework/AzCore/Tests/Math/Matrix4x4PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Matrix4x4PerformanceTests.cpp @@ -20,8 +20,7 @@ namespace Benchmark class BM_MathMatrix4x4 : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_testDataArray.resize(1000); @@ -41,6 +40,15 @@ namespace Benchmark return testData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct TestData { diff --git a/Code/Framework/AzCore/Tests/Math/ObbPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/ObbPerformanceTests.cpp index 8463758fa5..d1e8ac2225 100644 --- a/Code/Framework/AzCore/Tests/Math/ObbPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/ObbPerformanceTests.cpp @@ -19,8 +19,7 @@ namespace Benchmark class BM_MathObb : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_position.Set(1.0f, 2.0f, 3.0f); m_rotation = AZ::Quaternion::CreateRotationZ(AZ::Constants::QuarterPi); @@ -28,6 +27,16 @@ namespace Benchmark m_obb = AZ::Obb::CreateFromPositionRotationAndHalfLengths(m_position, m_rotation, m_halfLengths); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + AZ::Obb m_obb; AZ::Vector3 m_position; AZ::Quaternion m_rotation; diff --git a/Code/Framework/AzCore/Tests/Math/PlanePerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/PlanePerformanceTests.cpp index c23ded582c..e066207635 100644 --- a/Code/Framework/AzCore/Tests/Math/PlanePerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/PlanePerformanceTests.cpp @@ -18,14 +18,7 @@ namespace Benchmark class BM_MathPlane : public benchmark::Fixture { - public: - BM_MathPlane() - { - const unsigned int seed = 1; - rng = std::mt19937_64(seed); - } - - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { for (int i = 0; i < m_numIters; ++i) { @@ -39,7 +32,7 @@ namespace Benchmark m_distance = unif(rng); m_dists.push_back(m_distance); - //set these differently so they don't overlap with same values as other vectors + // set these differently so they don't overlap with same values as other vectors m_normal = AZ::Vector3(unif(rng), unif(rng), unif(rng)); m_normal.Normalize(); m_distance = unif(rng); @@ -47,6 +40,21 @@ namespace Benchmark m_planes.push_back(m_plane); } } + public: + BM_MathPlane() + { + const unsigned int seed = 1; + rng = std::mt19937_64(seed); + } + + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } AZ::Plane m_plane; AZ::Vector3 m_normal; diff --git a/Code/Framework/AzCore/Tests/Math/QuaternionPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/QuaternionPerformanceTests.cpp index 6f5a23d027..486a33ba67 100644 --- a/Code/Framework/AzCore/Tests/Math/QuaternionPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/QuaternionPerformanceTests.cpp @@ -17,8 +17,7 @@ namespace Benchmark class BM_MathQuaternion : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_quatDataArray.resize(1000); @@ -42,6 +41,15 @@ namespace Benchmark return quatData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct QuatData { diff --git a/Code/Framework/AzCore/Tests/Math/ShapeIntersectionPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/ShapeIntersectionPerformanceTests.cpp index b088330302..ecab1717b2 100644 --- a/Code/Framework/AzCore/Tests/Math/ShapeIntersectionPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/ShapeIntersectionPerformanceTests.cpp @@ -35,8 +35,7 @@ namespace Benchmark class BM_MathShapeIntersection : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_testDataArray.resize(1000); @@ -58,6 +57,15 @@ namespace Benchmark return testData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct TestData { diff --git a/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp index 193535c020..dde0192ef9 100644 --- a/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/TransformPerformanceTests.cpp @@ -22,8 +22,7 @@ namespace Benchmark class BM_MathTransform : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_testDataArray.resize(1000); @@ -51,6 +50,15 @@ namespace Benchmark return testData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct TestData { diff --git a/Code/Framework/AzCore/Tests/Math/Vector2PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Vector2PerformanceTests.cpp index e8506890aa..3ab306ff66 100644 --- a/Code/Framework/AzCore/Tests/Math/Vector2PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Vector2PerformanceTests.cpp @@ -19,8 +19,7 @@ namespace Benchmark class BM_MathVector2 : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_vecDataArray.resize(1000); @@ -37,6 +36,15 @@ namespace Benchmark return vecData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct VecData { diff --git a/Code/Framework/AzCore/Tests/Math/Vector3PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Vector3PerformanceTests.cpp index 27fa01ae95..5f33730bca 100644 --- a/Code/Framework/AzCore/Tests/Math/Vector3PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Vector3PerformanceTests.cpp @@ -19,8 +19,7 @@ namespace Benchmark class BM_MathVector3 : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_vecDataArray.resize(1000); @@ -37,6 +36,15 @@ namespace Benchmark return vecData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct VecData { diff --git a/Code/Framework/AzCore/Tests/Math/Vector4PerformanceTests.cpp b/Code/Framework/AzCore/Tests/Math/Vector4PerformanceTests.cpp index 4a0bcb49d2..f12851b1ed 100644 --- a/Code/Framework/AzCore/Tests/Math/Vector4PerformanceTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Vector4PerformanceTests.cpp @@ -19,8 +19,7 @@ namespace Benchmark class BM_MathVector4 : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { m_vecDataArray.resize(1000); @@ -38,6 +37,15 @@ namespace Benchmark return vecData; }); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } struct VecData { diff --git a/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp b/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp index aaf4ce1811..85dd79931d 100644 --- a/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp +++ b/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp @@ -120,19 +120,34 @@ namespace Benchmark class HphaSchemaBenchmarkFixture : public ::benchmark::Fixture { - public: - void SetUp(const ::benchmark::State& state) override + void internalSetUp() { - AZ_UNUSED(state); AZ::AllocatorInstance::Create(); } - void TearDown(const ::benchmark::State& state) override + void internalTearDown() { - AZ_UNUSED(state); AZ::AllocatorInstance::Destroy(); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); + } + static void BM_Allocations(benchmark::State& state, const AllocationSizeArray& allocationArray) { AZStd::vector allocations; diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp index 6d572a02a3..22fb6379d2 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp @@ -1155,6 +1155,23 @@ namespace Benchmark { class StorageDriveWindowsFixture : public benchmark::Fixture { + void internalTearDown() + { + using namespace AZ::IO; + + AZStd::string temp; + m_absolutePath.swap(temp); + + delete m_streamer; + m_streamer = nullptr; + + SystemFile::Delete(TestFileName); + + AZ::IO::FileIOBase::SetInstance(nullptr); + AZ::IO::FileIOBase::SetInstance(m_previousFileIO); + delete m_fileIO; + m_fileIO = nullptr; + } public: constexpr static const char* TestFileName = "StreamerBenchmark.bin"; constexpr static size_t FileSize = 64_mib; @@ -1197,20 +1214,13 @@ namespace Benchmark } } - void TearDown([[maybe_unused]] const ::benchmark::State& state) override + void TearDown(const benchmark::State&) override { - using namespace AZ::IO; - - AZStd::string temp; - m_absolutePath.swap(temp); - - delete m_streamer; - - SystemFile::Delete(TestFileName); - - AZ::IO::FileIOBase::SetInstance(nullptr); - AZ::IO::FileIOBase::SetInstance(m_previousFileIO); - delete m_fileIO; + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); } void RepeatedlyReadFile(benchmark::State& state) diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/ArraySerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/ArraySerializerTests.cpp index e410ba9ca4..8582453683 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/ArraySerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/ArraySerializerTests.cpp @@ -35,6 +35,7 @@ namespace JsonSerializationTests features.m_fixedSizeArray = true; } + using JsonSerializerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); @@ -243,6 +244,7 @@ namespace JsonSerializationTests ])"; } + using ArraySerializerTestDescriptionBase>::Reflect; void Reflect(AZStd::unique_ptr& context) override { Base::Reflect(context); @@ -299,6 +301,7 @@ namespace JsonSerializationTests AZ::JsonArraySerializer m_serializer; public: + using BaseJsonSerializerFixture::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& context) override { context->RegisterGenericType(); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp index 3bc574c2ce..4a6a8e9e8a 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp @@ -60,6 +60,7 @@ namespace JsonSerializationTests return "[188, 288, 388]"; } + using BasicContainerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); @@ -133,6 +134,7 @@ namespace JsonSerializationTests return "[188, 288, 388]"; } + using BasicContainerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); @@ -225,6 +227,7 @@ namespace JsonSerializationTests features.m_supportsPartialInitialization = true; } + using BasicContainerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { SimpleClass::Reflect(context, true); @@ -291,6 +294,7 @@ namespace JsonSerializationTests using Container = AZStd::vector; using BaseClassContainer = AZStd::vector>; + using JsonBasicContainerSerializerTests::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& serializeContext) override { SimpleClass::Reflect(serializeContext, true); @@ -352,6 +356,7 @@ namespace JsonSerializationTests static constexpr size_t ContainerSize = 4; using Container = AZStd::fixed_vector; + using JsonBasicContainerSerializerTests::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& serializeContext) override { serializeContext->RegisterGenericType(); @@ -387,6 +392,7 @@ namespace JsonSerializationTests public: using Set = AZStd::set; + using JsonBasicContainerSerializerTests::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& serializeContext) override { serializeContext->RegisterGenericType(); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/BoolSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/BoolSerializerTests.cpp index a670a2a6e1..e9bb404ba8 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/BoolSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/BoolSerializerTests.cpp @@ -83,6 +83,7 @@ namespace JsonSerializationTests BaseJsonSerializerFixture::TearDown(); } + using BaseJsonSerializerFixture::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& serializeContext) override { serializeContext->Class() diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/DoubleSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/DoubleSerializerTests.cpp index 76aaae393d..53eb855a63 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/DoubleSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/DoubleSerializerTests.cpp @@ -95,6 +95,7 @@ namespace JsonSerializationTests BaseJsonSerializerFixture::TearDown(); } + using BaseJsonSerializerFixture::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& serializeContext) override { serializeContext->Class() diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/MapSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/MapSerializerTests.cpp index 4979df04be..7ffe3ffee0 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/MapSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/MapSerializerTests.cpp @@ -44,6 +44,7 @@ namespace JsonSerializationTests features.m_supportsPartialInitialization = false; } + using JsonSerializerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); @@ -247,6 +248,7 @@ namespace JsonSerializationTests features.m_supportsPartialInitialization = true; } + using MapBaseTestDescription, Serializer>::Reflect; void Reflect(AZStd::unique_ptr& context) override { SimpleClass::Reflect(context, true); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/SmartPointerSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/SmartPointerSerializerTests.cpp index 43dc1a85d9..d89d9bfb33 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/SmartPointerSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/SmartPointerSerializerTests.cpp @@ -33,6 +33,7 @@ namespace JsonSerializationTests return AZStd::make_shared(); } + using JsonSerializerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); @@ -102,6 +103,7 @@ namespace JsonSerializationTests return *lhs == *rhs; } + using Base::Reflect; void Reflect(AZStd::unique_ptr& context) override { SimpleClass::Reflect(context, true); @@ -176,6 +178,7 @@ namespace JsonSerializationTests features.m_supportsPartialInitialization = true; } + using SmartPointerBaseTestDescription>::Reflect; void Reflect(AZStd::unique_ptr& context) override { SimpleInheritence::Reflect(context, true); @@ -340,6 +343,7 @@ namespace JsonSerializationTests features.m_supportsPartialInitialization = true; } + using SmartPointerBaseTestDescription>::Reflect; void Reflect(AZStd::unique_ptr& context) override { MultipleInheritence::Reflect(context, true); @@ -513,7 +517,8 @@ namespace JsonSerializationTests public: using SmartPointer = typename SmartPointerSimpleDerivedClassTestDescription::SmartPointer; using InstanceSmartPointer = AZStd::shared_ptr; - + + using BaseJsonSerializerFixture::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& context) override { m_description.Reflect(context); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/TupleSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/TupleSerializerTests.cpp index ff0fbcc5a6..cfd844f3f5 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/TupleSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/TupleSerializerTests.cpp @@ -72,6 +72,7 @@ namespace JsonSerializationTests TupleSerializerTestsInternal::ConfigureFeatures(features); } + using JsonSerializerConformityTestDescriptor>::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->Class()->Field("pair", &PairPlaceholder::m_pair); @@ -126,6 +127,7 @@ namespace JsonSerializationTests TupleSerializerTestsInternal::ConfigureFeatures(features); } + using JsonSerializerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); @@ -344,6 +346,7 @@ namespace JsonSerializationTests features.m_enableNewInstanceTests = false; } + using JsonSerializerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->Class() @@ -477,6 +480,7 @@ namespace JsonSerializationTests features.m_typeToInject = rapidjson::kNullType; } + using JsonSerializerConformityTestDescriptor::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); @@ -535,6 +539,7 @@ namespace JsonSerializationTests BaseJsonSerializerFixture::TearDown(); } + using BaseJsonSerializerFixture::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& serializeContext) override { SimpleClass::Reflect(serializeContext, true); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/UnorderedSetSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/UnorderedSetSerializerTests.cpp index 17902b6900..f4a1f48dc5 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/UnorderedSetSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/UnorderedSetSerializerTests.cpp @@ -54,6 +54,7 @@ namespace JsonSerializationTests features.m_supportsPartialInitialization = false; } + using JsonSerializerConformityTestDescriptor>::Reflect; void Reflect(AZStd::unique_ptr& context) override { context->RegisterGenericType(); @@ -108,6 +109,7 @@ namespace JsonSerializationTests context->RegisterGenericType(); } + using JsonSerializerConformityTestDescriptor::Reflect; bool AreEqual(const MultiSet& lhs, const MultiSet& rhs) override { return @@ -139,6 +141,7 @@ namespace JsonSerializationTests BaseJsonSerializerFixture::TearDown(); } + using BaseJsonSerializerFixture::RegisterAdditional; void RegisterAdditional(AZStd::unique_ptr& serializeContext) override { serializeContext->RegisterGenericType(); diff --git a/Code/Framework/AzCore/Tests/SettingsRegistryTests.cpp b/Code/Framework/AzCore/Tests/SettingsRegistryTests.cpp index 61f93fb860..8485747991 100644 --- a/Code/Framework/AzCore/Tests/SettingsRegistryTests.cpp +++ b/Code/Framework/AzCore/Tests/SettingsRegistryTests.cpp @@ -423,6 +423,8 @@ namespace SettingsRegistryTests struct : public AZ::SettingsRegistryInterface::Visitor { + using AZ::SettingsRegistryInterface::Visitor::Visit; + using ValueType [[maybe_unused]] = typename SettingsType::ValueType; void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type type, ValueType value) override { @@ -452,6 +454,8 @@ namespace SettingsRegistryTests struct : public AZ::SettingsRegistryInterface::Visitor { + using AZ::SettingsRegistryInterface::Visitor::Visit; + using ValueType [[maybe_unused]] = typename SettingsType::ValueType; void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type type, ValueType value) override { @@ -482,6 +486,7 @@ namespace SettingsRegistryTests struct : public AZ::SettingsRegistryInterface::Visitor { + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type type, AZ::s64 value) override { EXPECT_EQ(AZ::SettingsRegistryInterface::Type::Integer, type); @@ -517,6 +522,8 @@ namespace SettingsRegistryTests EXPECT_TRUE(path.ends_with(valueName)); return AZ::SettingsRegistryInterface::VisitResponse::Continue; } + + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type , AZStd::string_view)override { EXPECT_TRUE(path.ends_with(valueName)); diff --git a/Code/Framework/AzCore/Tests/TaskTests.cpp b/Code/Framework/AzCore/Tests/TaskTests.cpp index f65dffcd99..e743ab6643 100644 --- a/Code/Framework/AzCore/Tests/TaskTests.cpp +++ b/Code/Framework/AzCore/Tests/TaskTests.cpp @@ -551,19 +551,37 @@ namespace Benchmark { class TaskGraphBenchmarkFixture : public ::benchmark::Fixture { - public: - void SetUp(benchmark::State&) override + void internalSetUp() { executor = new TaskExecutor; graph = new TaskGraph; } - void TearDown(benchmark::State&) override + void internalTearDown() { delete graph; delete executor; } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); + } + TaskDescriptor descriptors[4] = { { "critical", "benchmark", TaskPriority::CRITICAL }, { "high", "benchmark", TaskPriority::HIGH }, { "medium", "benchmark", TaskPriority::MEDIUM }, diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.h b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.h index 2cd8f37adc..c99fbb14c5 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.h @@ -65,7 +65,7 @@ namespace AZ::IO void SetAlias(const char* alias, const char* path) override; void ClearAlias(const char* alias) override; AZStd::optional ConvertToAlias(char* inOutBuffer, AZ::u64 bufferLength) const override; - bool ConvertToAlias(AZ::IO::FixedMaxPath& convertedPath, const AZ::IO::PathView& path) const; + bool ConvertToAlias(AZ::IO::FixedMaxPath& convertedPath, const AZ::IO::PathView& path) const override; using FileIOBase::ConvertToAlias; const char* GetAlias(const char* alias) const override; bool ResolvePath(const char* path, char* resolvedPath, AZ::u64 resolvedPathSize) const override; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.h b/Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.h index 8ab943a24e..eac98b2f07 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.h @@ -40,7 +40,7 @@ namespace AZ::IO NestedArchive(IArchive* pArchive, AZStd::string_view strBindRoot, ZipDir::CachePtr pCache, uint32_t nFlags = 0); ~NestedArchive() override; - auto GetRootFolderHandle() -> Handle; + auto GetRootFolderHandle() -> Handle override; // Adds a new file to the zip or update an existing one // adds a directory (creates several nested directories if needed) @@ -66,26 +66,26 @@ namespace AZ::IO int RemoveDir(AZStd::string_view szRelativePath) override; // deletes all files from the archive - int RemoveAll(); + int RemoveAll() override; // finds the file; you don't have to close the returned handle - Handle FindFile(AZStd::string_view szRelativePath); + Handle FindFile(AZStd::string_view szRelativePath) override; // returns the size of the file (unpacked) by the handle - uint64_t GetFileSize(Handle fileHandle); + uint64_t GetFileSize(Handle fileHandle) override; // reads the file into the preallocated buffer (must be at least the size of GetFileSize()) - int ReadFile(Handle fileHandle, void* pBuffer); + int ReadFile(Handle fileHandle, void* pBuffer) override; // returns the full path to the archive file - const char* GetFullPath() const; + const char* GetFullPath() const override; ZipDir::Cache* GetCache(); - uint32_t GetFlags() const; - bool SetFlags(uint32_t nFlagsToSet); - bool ResetFlags(uint32_t nFlagsToReset); + uint32_t GetFlags() const override; + bool SetFlags(uint32_t nFlagsToSet) override; + bool ResetFlags(uint32_t nFlagsToReset) override; - bool SetPackAccessible(bool bAccessible); + bool SetPackAccessible(bool bAccessible) override; protected: // returns the pointer to the relative file path to be passed 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/Asset/GenericAssetHandler.h b/Code/Framework/AzFramework/AzFramework/Asset/GenericAssetHandler.h index 5ead8154e6..4c3f911871 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/GenericAssetHandler.h +++ b/Code/Framework/AzFramework/AzFramework/Asset/GenericAssetHandler.h @@ -75,7 +75,7 @@ namespace AzFramework { public: AZ_RTTI(GenericAssetHandlerBase, "{B153B8B5-25CC-4BB7-A2BD-9A47ECF4123C}", AZ::Data::AssetHandler); - virtual ~GenericAssetHandlerBase() {} + virtual ~GenericAssetHandlerBase() = default; }; template @@ -186,7 +186,7 @@ namespace AzFramework } } - bool CanHandleAsset(const AZ::Data::AssetId& id) const + bool CanHandleAsset(const AZ::Data::AssetId& id) const override { AZStd::string assetPath; EBUS_EVENT_RESULT(assetPath, AZ::Data::AssetCatalogRequestBus, GetAssetPathById, id); diff --git a/Code/Framework/AzFramework/AzFramework/Components/NonUniformScaleComponent.h b/Code/Framework/AzFramework/AzFramework/Components/NonUniformScaleComponent.h index 16032e5337..bc1bf1a6b2 100644 --- a/Code/Framework/AzFramework/AzFramework/Components/NonUniformScaleComponent.h +++ b/Code/Framework/AzFramework/AzFramework/Components/NonUniformScaleComponent.h @@ -28,7 +28,7 @@ namespace AzFramework // AZ::NonUniformScaleRequests::Handler ... AZ::Vector3 GetScale() const override; void SetScale(const AZ::Vector3& scale) override; - void RegisterScaleChangedEvent(AZ::NonUniformScaleChangedEvent::Handler& handler); + void RegisterScaleChangedEvent(AZ::NonUniformScaleChangedEvent::Handler& handler) override; protected: // AZ::Component ... diff --git a/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h b/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h index 68af9dbb26..49506364f4 100644 --- a/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h +++ b/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h @@ -105,7 +105,7 @@ namespace AzFramework virtual AZ::Matrix3x4 PopPremultipliedMatrix() { return AZ::Matrix3x4::CreateIdentity(); } protected: - ~DebugDisplayRequests() = default; + virtual ~DebugDisplayRequests() = default; }; /// Inherit from DebugDisplayRequestBus::Handler to implement the DebugDisplayRequests interface. diff --git a/Code/Framework/AzFramework/AzFramework/Entity/GameEntityContextComponent.h b/Code/Framework/AzFramework/AzFramework/Entity/GameEntityContextComponent.h index 831067d728..b9a4ea0da1 100644 --- a/Code/Framework/AzFramework/AzFramework/Entity/GameEntityContextComponent.h +++ b/Code/Framework/AzFramework/AzFramework/Entity/GameEntityContextComponent.h @@ -69,7 +69,7 @@ namespace AzFramework // EntityContext AZ::Entity* CreateEntity(const char* name) override; void OnRootEntityReloaded() override; - void OnContextEntitiesAdded(const EntityList& entities); + void OnContextEntitiesAdded(const EntityList& entities) override; void OnContextReset() override; bool ValidateEntitiesAreValidForContext(const EntityList& entities) override; ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzFramework/AzFramework/Gem/GemInfo.cpp b/Code/Framework/AzFramework/AzFramework/Gem/GemInfo.cpp index 62a6334b5d..a7c6b18061 100644 --- a/Code/Framework/AzFramework/AzFramework/Gem/GemInfo.cpp +++ b/Code/Framework/AzFramework/AzFramework/Gem/GemInfo.cpp @@ -34,6 +34,7 @@ namespace AzFramework { } + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override { diff --git a/Code/Framework/AzFramework/AzFramework/Logging/LoggingComponent.h b/Code/Framework/AzFramework/AzFramework/Logging/LoggingComponent.h index 98eb6df95a..73f2ff2c75 100644 --- a/Code/Framework/AzFramework/AzFramework/Logging/LoggingComponent.h +++ b/Code/Framework/AzFramework/AzFramework/Logging/LoggingComponent.h @@ -31,9 +31,9 @@ namespace AzFramework ////////////////////////////////////////////////////////////////////////// // AZ::Component - virtual void Init(); - virtual void Activate(); - virtual void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// 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/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h index d4c6992057..72b15c1a69 100644 --- a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h +++ b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h @@ -19,6 +19,8 @@ namespace UnitTest { public: TestDebugDisplayRequests(); + ~TestDebugDisplayRequests() override = default; + const AZStd::vector& GetPoints() const; void ClearPoints(); //! Returns the AABB of the points generated from received draw calls. @@ -27,7 +29,9 @@ namespace UnitTest // DebugDisplayRequests ... void DrawWireBox(const AZ::Vector3& min, const AZ::Vector3& max) override; void DrawSolidBox(const AZ::Vector3& min, const AZ::Vector3& max) override; + using AzFramework::DebugDisplayRequests::DrawWireQuad; void DrawWireQuad(float width, float height) override; + using AzFramework::DebugDisplayRequests::DrawQuad; void DrawQuad(float width, float height) override; void DrawTriangles(const AZStd::vector& vertices, const AZ::Color& color) override; void DrawTrianglesIndexed(const AZStd::vector& vertices, const AZStd::vector& indices, const AZ::Color& color) override; diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h index 4016f29f8f..7a31665259 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h @@ -45,10 +45,10 @@ namespace AzFramework //! All current and added controllers will be registered with this viewport. void RegisterViewportContext(ViewportId viewport) override; //! Unregisters a Viewport from this list and all associated controllers. - void UnregisterViewportContext(ViewportId viewport); + void UnregisterViewportContext(ViewportId viewport) override; //! All ViewportControllerLists have a priority of Custom to ensure //! that they receive events at all priorities from any parent controllers. - AzFramework::ViewportControllerPriority GetPriority() const { return ViewportControllerPriority::DispatchToAllPriorities; } + AzFramework::ViewportControllerPriority GetPriority() const override { return ViewportControllerPriority::DispatchToAllPriorities; } //! Returns true if this controller list is enabled, i.e. //! it is accepting and forwarding input and update events to its children. bool IsEnabled() const; diff --git a/Code/Framework/AzFramework/Tests/OctreePerformanceTests.cpp b/Code/Framework/AzFramework/Tests/OctreePerformanceTests.cpp index 79332d638b..64fba61e2c 100644 --- a/Code/Framework/AzFramework/Tests/OctreePerformanceTests.cpp +++ b/Code/Framework/AzFramework/Tests/OctreePerformanceTests.cpp @@ -20,8 +20,7 @@ namespace Benchmark class BM_Octree : public benchmark::Fixture { - public: - void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { // Create the SystemAllocator if not available if (!AZ::AllocatorInstance::IsReady()) @@ -72,7 +71,7 @@ namespace Benchmark }); } - void TearDown([[maybe_unused]] const ::benchmark::State& state) override + void internalTearDown() { m_octreeSystemComponent->DestroyVisibilityScene(m_visScene); delete m_octreeSystemComponent; @@ -91,6 +90,25 @@ namespace Benchmark } } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); + } + void InsertEntries(uint32_t entryCount) { for (uint32_t i = 0; i < entryCount; ++i) diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h index 8b6ea5c59b..1bc329d404 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h @@ -40,7 +40,7 @@ namespace AzManipulatorTestFramework // ViewportInteractionRequestBus overrides ... AzFramework::CameraState GetCameraState() override; - AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition); + AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) override; AZStd::optional ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) override; AZStd::optional ViewportScreenToWorldRay( const AzFramework::ScreenPoint& screenPosition) override; diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h index 15d4cfa10c..9c929d63e8 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h @@ -30,6 +30,7 @@ namespace AzNetworking { public: + virtual ~UdpFragmentQueue() = default; //! Updates the UdpFragmentQueue timeout queue. void Update(); @@ -53,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/AzQtComponents/AzQtComponents/Components/Style.h b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.h index 702544eea6..2896fc51eb 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.h @@ -137,8 +137,10 @@ namespace AzQtComponents int pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option, const QWidget* widget) const override; + using QProxyStyle::polish; void polish(QApplication* application) override; void polish(QWidget* widget) override; + using QProxyStyle::unpolish; void unpolish(QWidget* widget) override; QPalette standardPalette() const override; diff --git a/Code/Framework/AzTest/AzTest/AzTest.h b/Code/Framework/AzTest/AzTest/AzTest.h index 18e846f9d8..352db1a0b5 100644 --- a/Code/Framework/AzTest/AzTest/AzTest.h +++ b/Code/Framework/AzTest/AzTest/AzTest.h @@ -44,12 +44,12 @@ namespace AZ virtual ~ITestEnvironment() {} - void SetUp() override final + void SetUp() final { SetupEnvironment(); } - void TearDown() override final + void TearDown() final { TeardownEnvironment(); } @@ -218,7 +218,7 @@ namespace AZ public: std::list resultList; - void OnTestEnd(const ::testing::TestInfo& test_info) + void OnTestEnd(const ::testing::TestInfo& test_info) override { std::string result; if (test_info.result()->Failed()) @@ -233,7 +233,7 @@ namespace AZ resultList.emplace_back(formattedResult); } - void OnTestProgramEnd(const ::testing::UnitTest& unit_test) + void OnTestProgramEnd(const ::testing::UnitTest& unit_test) override { for (std::string testResults : resultList) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/EditorEntityManager.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/EditorEntityManager.h index f74b971512..5786cc3fbc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/EditorEntityManager.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/EditorEntityManager.h @@ -17,7 +17,7 @@ namespace AzToolsFramework : public EditorEntityAPI { public: - ~EditorEntityManager(); + virtual ~EditorEntityManager(); void Start(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h index d05ec5728d..5e9208b475 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.h @@ -37,7 +37,7 @@ namespace AzToolsFramework ToolsApplication(int* argc = nullptr, char*** argv = nullptr); ~ToolsApplication(); - void Stop(); + void Stop() override; void CreateReflectionManager() override; void Reflect(AZ::ReflectContext* context) override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetUtils.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetUtils.cpp index 6e55d9f97c..139bbb563c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetUtils.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Asset/AssetUtils.cpp @@ -97,6 +97,7 @@ namespace AzToolsFramework::AssetUtils struct EnabledPlatformsVisitor : AZ::SettingsRegistryInterface::Visitor { + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override; AZStd::vector m_enabledPlatforms; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Commands/PreemptiveUndoCache.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Commands/PreemptiveUndoCache.h index ed36a4458e..85947f56f6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Commands/PreemptiveUndoCache.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Commands/PreemptiveUndoCache.h @@ -34,7 +34,7 @@ namespace AzToolsFramework static PreemptiveUndoCache* Get(); PreemptiveUndoCache(); - ~PreemptiveUndoCache(); + virtual ~PreemptiveUndoCache(); void RegisterToUndoCacheInterface(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntitySortComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntitySortComponent.h index b5a771f658..d728191c64 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntitySortComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntitySortComponent.h @@ -65,7 +65,7 @@ namespace AzToolsFramework /** * Called right before we start reading from the instance pointed by classPtr. */ - void OnReadBegin(void* classPtr) + void OnReadBegin(void* classPtr) override { EditorEntitySortComponent* component = reinterpret_cast(classPtr); component->PrepareSave(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.h index 57d92d78f4..75acb410c9 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.h @@ -31,7 +31,7 @@ namespace AzToolsFramework void AppendEntityAliasToPatchPaths(PrefabDom& providedPatch, const AZ::EntityId& entityId) override; - InstanceOptionalReference GetTopMostInstanceInHierarchy(AZ::EntityId entityId); + InstanceOptionalReference GetTopMostInstanceInHierarchy(AZ::EntityId entityId) override; bool PatchTemplate(PrefabDomValue& providedPatch, TemplateId templateId, InstanceOptionalReference instanceToExclude = AZStd::nullopt) override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoCache.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoCache.h index b5a8cf9e3a..43cb7f0d2d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoCache.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabUndoCache.h @@ -32,6 +32,8 @@ namespace AzToolsFramework public: AZ_CLASS_ALLOCATOR(PrefabUndoCache, AZ::SystemAllocator, 0); + virtual ~PrefabUndoCache() = default; + void Initialize(); void Destroy(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceMetadataEntityContextComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceMetadataEntityContextComponent.h index 08fa9f03ce..71e4e8d8f3 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceMetadataEntityContextComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceMetadataEntityContextComponent.h @@ -76,10 +76,10 @@ namespace AzToolsFramework void ResetContext() override; void GetRequiredComponentTypes(AZ::ComponentTypeList& required) override; bool IsSliceMetadataEntity(const AZ::EntityId entityId) override; - AZ::Entity* GetMetadataEntity(const AZ::EntityId entityId); + AZ::Entity* GetMetadataEntity(const AZ::EntityId entityId) override; AZ::EntityId GetMetadataEntityIdFromEditorEntity(const AZ::EntityId editorEntityId) override; AZ::EntityId GetMetadataEntityIdFromSliceAddress(const AZ::SliceComponent::SliceInstanceAddress& address) override; - void AddMetadataEntityToContext(const AZ::SliceComponent::SliceInstanceAddress& /*sliceAddress*/, AZ::Entity& entity); + void AddMetadataEntityToContext(const AZ::SliceComponent::SliceInstanceAddress& /*sliceAddress*/, AZ::Entity& entity) override; ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorInspectorComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorInspectorComponent.h index ecc7e34c76..f9170e67b0 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorInspectorComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorInspectorComponent.h @@ -61,7 +61,7 @@ namespace AzToolsFramework /** * Called right before we start reading from the instance pointed by classPtr. */ - void OnReadBegin(void* classPtr) + void OnReadBegin(void* classPtr) override { EditorInspectorComponent* component = reinterpret_cast(classPtr); component->PrepareSave(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.h index 66d7cd67d7..0c1ec4c153 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.h @@ -37,7 +37,7 @@ namespace AzToolsFramework // AZ::NonUniformScaleRequestBus::Handler ... AZ::Vector3 GetScale() const override; void SetScale(const AZ::Vector3& scale) override; - void RegisterScaleChangedEvent(AZ::NonUniformScaleChangedEvent::Handler& handler); + void RegisterScaleChangedEvent(AZ::NonUniformScaleChangedEvent::Handler& handler) override; private: static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h index bcd9d23203..99235c420c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h @@ -63,23 +63,23 @@ namespace LegacyFramework // ------------------------------------------------------------------ // implementation of FrameworkApplicationMessages::Handler - virtual bool IsRunningInGUIMode() { return m_desc.m_enableGUI; } - virtual bool RequiresGameProject() { return m_desc.m_enableProjectManager; } - virtual bool ShouldRunAssetProcessor() { return m_desc.m_shouldRunAssetProcessor; } - virtual void* GetMainModule(); - virtual const char* GetApplicationName(); - virtual const char* GetApplicationModule(); - virtual const char* GetApplicationDirectory(); - virtual const AzFramework::CommandLine* GetCommandLineParser(); - virtual void TeardownApplicationComponent(); - virtual void RunAssetProcessor() override; + bool IsRunningInGUIMode() override { return m_desc.m_enableGUI; } + bool RequiresGameProject() override { return m_desc.m_enableProjectManager; } + bool ShouldRunAssetProcessor() override { return m_desc.m_shouldRunAssetProcessor; } + void* GetMainModule() override; + const char* GetApplicationName() override; + const char* GetApplicationModule() override; + const char* GetApplicationDirectory() override; + const AzFramework::CommandLine* GetCommandLineParser() override; + void TeardownApplicationComponent() override; + void RunAssetProcessor() override; // ------------------------------------------------------------------ void SetSettingsRegistrySpecializations(AZ::SettingsRegistryInterface::Specializations& specializations) override; // ------------------------------------------------------------------ // implementation of CoreMessageBus::Handler - virtual void OnProjectSet(const char* /*pathToProject*/); + void OnProjectSet(const char* /*pathToProject*/) override; // ------------------------------------------------------------------ // This is called during the bootstrap and makes all the components we should have for SYSTEM minimal functionality. @@ -114,17 +114,17 @@ namespace LegacyFramework * ComponentApplication::RegisterCoreComponents and then register the application * specific core components. */ - virtual void RegisterCoreComponents(); + void RegisterCoreComponents() override; AZ::Entity* m_ptrSystemEntity; - virtual int GetDesiredExitCode() override { return m_desiredExitCode; } - virtual void SetDesiredExitCode(int code) override { m_desiredExitCode = code; } - virtual bool GetAbortRequested() override { return m_abortRequested; } - virtual void SetAbortRequested() override { m_abortRequested = true; } - virtual AZStd::string GetApplicationGlobalStoragePath() override; - virtual bool IsPrimary() override { return m_isPrimary; } + int GetDesiredExitCode() override { return m_desiredExitCode; } + void SetDesiredExitCode(int code) override { m_desiredExitCode = code; } + bool GetAbortRequested() override { return m_abortRequested; } + void SetAbortRequested() override { m_abortRequested = true; } + AZStd::string GetApplicationGlobalStoragePath() override; + bool IsPrimary() override { return m_isPrimary; } - virtual bool IsAppConfigWritable() override; + bool IsAppConfigWritable() override; AZ::Entity* m_applicationEntity; 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/AzToolsFramework/AzToolsFramework/UI/Logging/TracePrintFLogPanel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/TracePrintFLogPanel.h index 78462e842f..755e27db67 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/TracePrintFLogPanel.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Logging/TracePrintFLogPanel.h @@ -62,11 +62,11 @@ namespace AzToolsFramework ////////////////////////////////////////////////////////////////////////// // TraceMessagesBus - virtual bool OnAssert(const char* message); - virtual bool OnException(const char* message); - virtual bool OnError(const char* window, const char* message); - virtual bool OnWarning(const char* window, const char* message); - virtual bool OnPrintf(const char* window, const char* message); + bool OnAssert(const char* message) override; + bool OnException(const char* message) override; + bool OnError(const char* window, const char* message) override; + bool OnWarning(const char* window, const char* message) override; + bool OnPrintf(const char* window, const char* message) override; ////////////////////////////////////////////////////////////////////////// /// Log a message received from the TraceMessageBus diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx index a6ac859971..25e4276dd4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx @@ -230,7 +230,7 @@ namespace AzToolsFramework bool DropMimeDataAssets(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); bool CanDropMimeDataAssets(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; - QMap itemData(const QModelIndex& index) const; + QMap itemData(const QModelIndex& index) const override; QVariant dataForAll(const QModelIndex& index, int role) const; QVariant dataForName(const QModelIndex& index, int role) const; QVariant dataForVisibility(const QModelIndex& index, int role) const; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx index 3ff69f80e0..83b275b81a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx @@ -139,8 +139,8 @@ namespace AzToolsFramework EntityPropertyEditor(QWidget* pParent = NULL, Qt::WindowFlags flags = Qt::WindowFlags(), bool isLevelEntityEditor = false); virtual ~EntityPropertyEditor(); - virtual void BeforeUndoRedo(); - virtual void AfterUndoRedo(); + void BeforeUndoRedo() override; + void AfterUndoRedo() override; static void Reflect(AZ::ReflectContext* context); @@ -249,8 +249,8 @@ namespace AzToolsFramework bool IsEntitySelected(const AZ::EntityId& id) const; bool IsSingleEntitySelected(const AZ::EntityId& id) const; - virtual void GotSceneSourceControlStatus(AzToolsFramework::SourceControlFileInfo& fileInfo); - virtual void PerformActionsBasedOnSceneStatus(bool sceneIsNew, bool readOnly); + void GotSceneSourceControlStatus(AzToolsFramework::SourceControlFileInfo& fileInfo) override; + void PerformActionsBasedOnSceneStatus(bool sceneIsNew, bool readOnly) override; // enable/disable editor void EnableEditor(bool enabled); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/MultiLineTextEditHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/MultiLineTextEditHandler.h index 88a3d89f9f..c4a8980d29 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/MultiLineTextEditHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/MultiLineTextEditHandler.h @@ -41,7 +41,7 @@ namespace AzToolsFramework QWidget* CreateGUI(QWidget* parent) override; AZ::u32 GetHandlerName() const override; - bool AutoDelete() const; + bool AutoDelete() const override; void ConsumeAttribute(GrowTextEdit* widget, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override; void WriteGUIValuesIntoProperty(size_t index, GrowTextEdit* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h index 9ab896ab9d..f5529eec15 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h @@ -55,12 +55,12 @@ namespace AzToolsFramework // GUI is a pointer to the GUI used to editor your property (the one you created in CreateGUI) // and instance is a the actual value (PropertyType). // you may not cache the pointer to anything. - virtual void WriteGUIValuesIntoProperty(size_t index, WidgetType* GUI, PropertyType& instance, InstanceDataNode* node) = 0; + void WriteGUIValuesIntoProperty(size_t index, WidgetType* GUI, PropertyType& instance, InstanceDataNode* node) override = 0; // this will get called in order to initialize your gui. It will be called once for each instance. // for example if you have multiple objects selected, index will go from 0 to however many there are. // you may not cache the pointer to anything. - virtual bool ReadValuesIntoGUI(size_t index, WidgetType* GUI, const PropertyType& instance, InstanceDataNode* node) = 0; + bool ReadValuesIntoGUI(size_t index, WidgetType* GUI, const PropertyType& instance, InstanceDataNode* node) override = 0; // this will be called in order to initialize or refresh your gui. Your class will be fed one attribute at a time // you may override this to interpret the attributes as you wish - use attrValue->Read() for example, to interpret it as an int. @@ -87,19 +87,19 @@ namespace AzToolsFramework // and cause the next row to tab to your last button, when the user hits shift+tab on the next row. // if your widget is a single widget or has a single focus proxy there is no need to override. // you may not cache the pointer to anything. - virtual QWidget* GetFirstInTabOrder(WidgetType* widget) { return widget; } - virtual QWidget* GetLastInTabOrder(WidgetType* widget) { return widget; } + QWidget* GetFirstInTabOrder(WidgetType* widget) override { return widget; } + QWidget* GetLastInTabOrder(WidgetType* widget) override { return widget; } // implement this function in order to set your internal tab order between child controls. // just call a series of QWidget::setTabOrder // you may not cache the pointer to anything. - virtual void UpdateWidgetInternalTabbing(WidgetType* /*widget*/) { } + void UpdateWidgetInternalTabbing(WidgetType* /*widget*/) override {} // you must implement CreateGUI: // create an instance of the GUI that is used to edit this property type. // the QWidget pointer you return also serves as a handle for accessing data. This means that in order to trigger // a write, you need to call RequestWrite(...) on that same widget handle you return. - virtual QWidget* CreateGUI(QWidget *pParent) override = 0; + QWidget* CreateGUI(QWidget *pParent) override = 0; // you MAY override this if you wish to pool your widgets or reuse them. The default implementation simply calls delete. //virtual QWidget* DestroyGUI(QWidget* object) override; @@ -129,24 +129,24 @@ namespace AzToolsFramework return false; } - virtual QWidget* GetFirstInTabOrder(WidgetType* widget) { return widget; } - virtual QWidget* GetLastInTabOrder(WidgetType* widget) { return widget; } - virtual void UpdateWidgetInternalTabbing(WidgetType* /*widget*/) { } + QWidget* GetFirstInTabOrder(WidgetType* widget) override { return widget; } + QWidget* GetLastInTabOrder(WidgetType* widget) override { return widget; } + void UpdateWidgetInternalTabbing(WidgetType* /*widget*/) override {} - virtual QWidget* CreateGUI(QWidget *pParent) override = 0; + QWidget* CreateGUI(QWidget *pParent) override = 0; protected: - virtual bool HandlesType(const AZ::Uuid& id) const override + bool HandlesType(const AZ::Uuid& id) const override { (void)id; return true; } - virtual const AZ::Uuid& GetHandledType() const override + const AZ::Uuid& GetHandledType() const override { return nullUuid; } - virtual void WriteGUIValuesIntoProperty_Internal(QWidget* widget, InstanceDataNode* node) override + void WriteGUIValuesIntoProperty_Internal(QWidget* widget, InstanceDataNode* node) override { for (size_t i = 0; i < node->GetNumInstances(); ++i) { @@ -154,13 +154,13 @@ namespace AzToolsFramework } } - virtual void WriteGUIValuesIntoTempProperty_Internal(QWidget* widget, void* tempValue, const AZ::Uuid& propertyType, AZ::SerializeContext* serializeContext) override + void WriteGUIValuesIntoTempProperty_Internal(QWidget* widget, void* tempValue, const AZ::Uuid& propertyType, AZ::SerializeContext* serializeContext) override { (void)serializeContext; WriteGUIValuesIntoProperty(0, reinterpret_cast(widget), tempValue, propertyType); } - virtual void ReadValuesIntoGUI_Internal(QWidget* widget, InstanceDataNode* node) override + void ReadValuesIntoGUI_Internal(QWidget* widget, InstanceDataNode* node) override { AZ_PROFILE_FUNCTION(AzToolsFramework); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyManagerComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyManagerComponent.h index 4be288f52b..423bf401af 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyManagerComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyManagerComponent.h @@ -34,11 +34,11 @@ namespace AzToolsFramework ////////////////////////////////////////////////////////////////////////// // AZ::Component - virtual void Init(); - virtual void Activate(); - virtual void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; - virtual PropertyHandlerBase* ResolvePropertyHandler(AZ::u32 handlerName, const AZ::Uuid& handlerType) override; + PropertyHandlerBase* ResolvePropertyHandler(AZ::u32 handlerName, const AZ::Uuid& handlerType) override; ////////////////////////////////////////////////////////////////////////// private: @@ -57,8 +57,8 @@ namespace AzToolsFramework ////////////////////////////////////////////////////////////////////////// // PropertyTypeRegistrationMessages::Bus::Handler - virtual void RegisterPropertyType(PropertyHandlerBase* pHandler) override; - virtual void UnregisterPropertyType(PropertyHandlerBase* pHandler) override; + void RegisterPropertyType(PropertyHandlerBase* pHandler) override; + void UnregisterPropertyType(PropertyHandlerBase* pHandler) override; ////////////////////////////////////////////////////////////////////////// typedef AZStd::unordered_multimap HandlerMap; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.hxx index 61cbf4a541..879d0d4abc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.hxx @@ -235,7 +235,7 @@ namespace AzToolsFramework void PopulateFieldTreeRemovedEntities(); /// Event filter for key presses. - bool eventFilter(QObject* target, QEvent *event); + bool eventFilter(QObject* target, QEvent *event) override; /// Conduct the push operation for all selected fields. bool PushSelectedFields(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h index 137ee7b2c0..c5ecf7aee6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h @@ -40,7 +40,7 @@ namespace AzToolsFramework::ViewportUi void RegisterSwitcherEventHandler(SwitcherId switcherId, AZ::Event::Handler& handler) override; void RemoveCluster(ClusterId clusterId) override; void RemoveSwitcher(SwitcherId switcherId) override; - void SetClusterVisible(ClusterId clusterId, bool visible); + void SetClusterVisible(ClusterId clusterId, bool visible) override; void SetSwitcherVisible(SwitcherId switcherId, bool visible); void SetClusterGroupVisible(const AZStd::vector& clusterGroup, bool visible) override; const TextFieldId CreateTextField( diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabBenchmarkFixture.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabBenchmarkFixture.cpp index 9925d5bff3..e5ce22e13a 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabBenchmarkFixture.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabBenchmarkFixture.cpp @@ -50,7 +50,7 @@ namespace Benchmark SetupPrefabSystem(); } - void BM_Prefab::SetUp(::benchmark::State & state) + void BM_Prefab::internalSetUp(const benchmark::State& state) { AZ::Debug::TraceMessageBus::Handler::BusConnect(); @@ -59,7 +59,7 @@ namespace Benchmark SetupPrefabSystem(); } - void BM_Prefab::TearDown(::benchmark::State & state) + void BM_Prefab::internalTearDown(const benchmark::State& state) { m_paths = {}; diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabBenchmarkFixture.h b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabBenchmarkFixture.h index a55d5c7789..bd4b20cd77 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabBenchmarkFixture.h +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabBenchmarkFixture.h @@ -24,12 +24,27 @@ namespace Benchmark : public UnitTest::AllocatorsBenchmarkFixture , public UnitTest::TraceBusRedirector { - protected: - using ::benchmark::Fixture::SetUp; - using ::benchmark::Fixture::TearDown; + void internalSetUp(const benchmark::State& state); + void internalTearDown(const benchmark::State& state); - void SetUp(::benchmark::State& state) override; - void TearDown(::benchmark::State& state) override; + protected: + void SetUp(const benchmark::State& state) override + { + internalSetUp(state); + } + void SetUp(benchmark::State& state) override + { + internalSetUp(state); + } + + void TearDown(const benchmark::State& state) override + { + internalTearDown(state); + } + void TearDown(benchmark::State& state) override + { + internalTearDown(state); + } AZ::Entity* CreateEntity( const char* entityName, diff --git a/Code/Framework/AzToolsFramework/Tests/SliceStabilityTests/SliceStabilityTestFramework.h b/Code/Framework/AzToolsFramework/Tests/SliceStabilityTests/SliceStabilityTestFramework.h index 64dd8636a7..93e86374db 100644 --- a/Code/Framework/AzToolsFramework/Tests/SliceStabilityTests/SliceStabilityTestFramework.h +++ b/Code/Framework/AzToolsFramework/Tests/SliceStabilityTests/SliceStabilityTestFramework.h @@ -137,7 +137,7 @@ namespace UnitTest void CreateEditorRepresentation(AZ::Entity* entity) override; void BrowseForAssets(AzToolsFramework::AssetBrowser::AssetSelectionModel& selection) override { AZ_UNUSED(selection); } int GetIconTextureIdFromEntityIconPath(const AZStd::string& entityIconPath) override { AZ_UNUSED(entityIconPath); return 0; } - bool DisplayHelpersVisible() { return false; } + bool DisplayHelpersVisible() override { return false; } /* * AssetSystemRequestBus 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/Interest/BitmaskInterestHandler.h b/Code/Framework/GridMate/GridMate/Replica/Interest/BitmaskInterestHandler.h index 3de3fe8bfe..6b91859c95 100644 --- a/Code/Framework/GridMate/GridMate/Replica/Interest/BitmaskInterestHandler.h +++ b/Code/Framework/GridMate/GridMate/Replica/Interest/BitmaskInterestHandler.h @@ -133,7 +133,7 @@ namespace GridMate typedef AZStd::intrusive_ptr Ptr; bool IsReplicaMigratable() override { return false; } - bool IsBroadcast() { return true; } + bool IsBroadcast() override { return true; } static const char* GetChunkName() { return "BitmaskInterestChunk"; } void OnReplicaActivate(const ReplicaContext& rc) override; 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/IConsole.h b/Code/Legacy/CryCommon/IConsole.h index f77237f1af..5fb10f05d8 100644 --- a/Code/Legacy/CryCommon/IConsole.h +++ b/Code/Legacy/CryCommon/IConsole.h @@ -82,7 +82,7 @@ enum EVarFlags struct ICVarDumpSink { // - virtual ~ICVarDumpSink(){} + virtual ~ICVarDumpSink()= default; virtual void OnElementFound(ICVar* pCVar) = 0; // }; @@ -90,7 +90,7 @@ struct ICVarDumpSink struct IKeyBindDumpSink { // - virtual ~IKeyBindDumpSink(){} + virtual ~IKeyBindDumpSink()= default; virtual void OnKeyBindFound(const char* sBind, const char* sCommand) = 0; // }; @@ -98,7 +98,7 @@ struct IKeyBindDumpSink struct IOutputPrintSink { // - virtual ~IOutputPrintSink(){} + virtual ~IOutputPrintSink()= default; virtual void Print(const char* inszText) = 0; // }; @@ -107,7 +107,7 @@ struct IOutputPrintSink struct IConsoleVarSink { // - virtual ~IConsoleVarSink(){} + virtual ~IConsoleVarSink()= default; // Called by Console before changing console var value, to validate if var can be changed. // Return value: true if ok to change value, false if should not change value. virtual bool OnBeforeVarChange(ICVar* pVar, const char* sNewValue) = 0; @@ -120,7 +120,7 @@ struct IConsoleVarSink struct IConsoleCmdArgs { // - virtual ~IConsoleCmdArgs(){} + virtual ~IConsoleCmdArgs()= default; // Gets number of arguments supplied to the command (including the command itself) virtual int GetArgCount() const = 0; // Gets argument by index, nIndex must be in 0 <= nIndex < GetArgCount() @@ -134,7 +134,7 @@ struct IConsoleCmdArgs struct IConsoleArgumentAutoComplete { // - virtual ~IConsoleArgumentAutoComplete(){} + virtual ~IConsoleArgumentAutoComplete()= default; // Gets number of matches for the argument to auto complete. virtual int GetCount() const = 0; // Gets argument value by index, nIndex must be in 0 <= nIndex < GetCount() @@ -143,10 +143,10 @@ struct IConsoleArgumentAutoComplete }; // This a definition of the console command function that can be added to console with AddCommand. -typedef void (* ConsoleCommandFunc)(IConsoleCmdArgs*); +using ConsoleCommandFunc = void (*)(IConsoleCmdArgs*); // This a definition of the callback function that is called when variable change. -typedef void (* ConsoleVarFunc)(ICVar*); +using ConsoleVarFunc = void (*)(ICVar*); /* Summary: Interface to the engine console. @@ -163,7 +163,7 @@ typedef void (* ConsoleVarFunc)(ICVar*); struct IConsole { // - virtual ~IConsole(){} + virtual ~IConsole()= default; //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Deletes the console virtual void Release() = 0; @@ -180,7 +180,7 @@ struct IConsole // help - help text that is shown when you use ? in the console // Return: // pointer to the interface ICVar - virtual ICVar* RegisterString(const char* sName, const char* sValue, int nFlags, const char* help = "", ConsoleVarFunc pChangeFunc = 0) = 0; + virtual ICVar* RegisterString(const char* sName, const char* sValue, int nFlags, const char* help = "", ConsoleVarFunc pChangeFunc = nullptr) = 0; // Create a new console variable that store the value in a int // Arguments: // sName - console variable name @@ -189,7 +189,7 @@ struct IConsole // help - help text that is shown when you use ? in the console // Return: // pointer to the interface ICVar - virtual ICVar* RegisterInt(const char* sName, int iValue, int nFlags, const char* help = "", ConsoleVarFunc pChangeFunc = 0) = 0; + virtual ICVar* RegisterInt(const char* sName, int iValue, int nFlags, const char* help = "", ConsoleVarFunc pChangeFunc = nullptr) = 0; // Create a new console variable that store the value in a float // Arguments: // sName - console variable name @@ -198,7 +198,7 @@ struct IConsole // help - help text that is shown when you use ? in the console // Return: // pointer to the interface ICVar - virtual ICVar* RegisterFloat(const char* sName, float fValue, int nFlags, const char* help = "", ConsoleVarFunc pChangeFunc = 0) = 0; + virtual ICVar* RegisterFloat(const char* sName, float fValue, int nFlags, const char* help = "", ConsoleVarFunc pChangeFunc = nullptr) = 0; // Create a new console variable that will update the user defined float // Arguments: @@ -209,7 +209,7 @@ struct IConsole // allowModify - allow modification through config vars, prevents missing modifications in release mode // Return: // pointer to the interface ICVar - virtual ICVar* Register(const char* name, float* src, float defaultvalue, int nFlags = 0, const char* help = "", ConsoleVarFunc pChangeFunc = 0, bool allowModify = true) = 0; + virtual ICVar* Register(const char* name, float* src, float defaultvalue, int nFlags = 0, const char* help = "", ConsoleVarFunc pChangeFunc = nullptr, bool allowModify = true) = 0; // Create a new console variable that will update the user defined integer // Arguments: // sName - console variable name @@ -219,7 +219,7 @@ struct IConsole // allowModify - allow modification through config vars, prevents missing modifications in release mode // Return: // pointer to the interface ICVar - virtual ICVar* Register(const char* name, int* src, int defaultvalue, int nFlags = 0, const char* help = "", ConsoleVarFunc pChangeFunc = 0, bool allowModify = true) = 0; + virtual ICVar* Register(const char* name, int* src, int defaultvalue, int nFlags = 0, const char* help = "", ConsoleVarFunc pChangeFunc = nullptr, bool allowModify = true) = 0; // Create a new console variable that will update the user defined pointer to null terminated string // Arguments: @@ -230,7 +230,7 @@ struct IConsole // allowModify - allow modification through config vars, prevents missing modifications in release mode // Return: // pointer to the interface ICVar - virtual ICVar* Register(const char* name, const char** src, const char* defaultvalue, int nFlags = 0, const char* help = "", ConsoleVarFunc pChangeFunc = 0, bool allowModify = true) = 0; + virtual ICVar* Register(const char* name, const char** src, const char* defaultvalue, int nFlags = 0, const char* help = "", ConsoleVarFunc pChangeFunc = nullptr, bool allowModify = true) = 0; // ! Remove a variable from the console // @param sVarName console variable name @@ -348,7 +348,7 @@ struct IConsole // sHelp - Help string, will be displayed when typing in console "command ?". // Return // True if successful, false otherwise. - virtual bool AddCommand(const char* sCommand, ConsoleCommandFunc func, int nFlags = 0, const char* sHelp = NULL) = 0; + virtual bool AddCommand(const char* sCommand, ConsoleCommandFunc func, int nFlags = 0, const char* sHelp = nullptr) = 0; //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Description: @@ -363,7 +363,7 @@ struct IConsole // Return // True if successful, false otherwise. //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - virtual bool AddCommand(const char* sName, const char* sScriptFunc, int nFlags = 0, const char* sHelp = NULL) = 0; + virtual bool AddCommand(const char* sName, const char* sScriptFunc, int nFlags = 0, const char* sHelp = nullptr) = 0; //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Description: @@ -402,7 +402,7 @@ struct IConsole // szPrefix - 0 or prefix e.g. "sys_spec_" // Return // used size - virtual size_t GetSortedVars(AZStd::vector& pszArray, const char* szPrefix = 0) = 0; + virtual size_t GetSortedVars(AZStd::vector& pszArray, const char* szPrefix = nullptr) = 0; virtual const char* AutoComplete(const char* substr) = 0; virtual const char* AutoCompletePrev(const char* substr) = 0; virtual const char* ProcessCompletion(const char* szInputBuffer) = 0; @@ -466,7 +466,7 @@ struct IConsole // This interface for the remote console struct IRemoteConsoleListener { - virtual ~IRemoteConsoleListener() {} + virtual ~IRemoteConsoleListener() = default; virtual void OnConsoleCommand([[maybe_unused]] const char* cmd) {}; virtual void OnGameplayCommand([[maybe_unused]] const char* cmd) {}; @@ -474,7 +474,7 @@ struct IRemoteConsoleListener struct IRemoteConsole { - virtual ~IRemoteConsole() {}; + virtual ~IRemoteConsole() = default;; virtual void RegisterConsoleVariables() = 0; virtual void UnregisterConsoleVariables() = 0; @@ -513,7 +513,7 @@ struct ICVar // // TODO make protected; - virtual ~ICVar() {} + virtual ~ICVar() = default; //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // delete the variable // NOTE: the variable will automatically unregister itself from the console diff --git a/Code/Legacy/CryCommon/ILocalizationManager.h b/Code/Legacy/CryCommon/ILocalizationManager.h index 0b5d76fc24..81ad5b595c 100644 --- a/Code/Legacy/CryCommon/ILocalizationManager.h +++ b/Code/Legacy/CryCommon/ILocalizationManager.h @@ -28,7 +28,7 @@ class XmlNodeRef; struct SLocalizedInfoGame { SLocalizedInfoGame () - : szCharacterName(NULL) + : szCharacterName(nullptr) , bUseSubtitle(false) { } @@ -50,15 +50,15 @@ struct SLocalizedSoundInfoGame : public SLocalizedInfoGame { SLocalizedSoundInfoGame() - : sSoundEvent(NULL) + : sSoundEvent(nullptr) , fVolume(0.f) , fRadioRatio (0.f) , bIsDirectRadio(false) , bIsIntercepted(false) , nNumSoundMoods(0) - , pSoundMoods (NULL) + , pSoundMoods (nullptr) , nNumEventParameters(0) - , pEventParameters(NULL) + , pEventParameters(nullptr) { } @@ -82,10 +82,10 @@ struct SLocalizedInfoEditor : public SLocalizedInfoGame { SLocalizedInfoEditor() - : sKey(NULL) - , sOriginalCharacterName(NULL) - , sOriginalActorLine(NULL) - , sUtf8TranslatedActorLine(NULL) + : sKey(nullptr) + , sOriginalCharacterName(nullptr) + , sOriginalActorLine(nullptr) + , sUtf8TranslatedActorLine(nullptr) , nRow(0) { } @@ -133,21 +133,21 @@ struct ILocalizationManager ePILID_MAX_OR_INVALID, //Not a language, denotes the maximum number of languages or an unknown language }; - typedef uint32 TLocalizationBitfield; + using TLocalizationBitfield = uint32; // - virtual ~ILocalizationManager(){} + virtual ~ILocalizationManager()= default; virtual const char* LangNameFromPILID(const ILocalizationManager::EPlatformIndependentLanguageID id) = 0; virtual ILocalizationManager::EPlatformIndependentLanguageID PILIDFromLangName(AZStd::string langName) = 0; virtual ILocalizationManager::EPlatformIndependentLanguageID GetSystemLanguage() { return ILocalizationManager::EPlatformIndependentLanguageID::ePILID_English_US; } virtual ILocalizationManager::TLocalizationBitfield MaskSystemLanguagesFromSupportedLocalizations(const ILocalizationManager::TLocalizationBitfield systemLanguages) = 0; virtual ILocalizationManager::TLocalizationBitfield IsLanguageSupported(const ILocalizationManager::EPlatformIndependentLanguageID id) = 0; - virtual bool SetLanguage([[maybe_unused]] const char* sLanguage) override { return false; } - virtual const char* GetLanguage() override { return nullptr; } + bool SetLanguage([[maybe_unused]] const char* sLanguage) override { return false; } + const char* GetLanguage() override { return nullptr; } - virtual int GetLocalizationFormat() const { return -1; } - virtual AZStd::string GetLocalizedSubtitleFilePath([[maybe_unused]] const AZStd::string& localVideoPath, [[maybe_unused]] const AZStd::string& subtitleFileExtension) const { return ""; } - virtual AZStd::string GetLocalizedLocXMLFilePath([[maybe_unused]] const AZStd::string& localXmlPath) const { return ""; } + int GetLocalizationFormat() const override { return -1; } + AZStd::string GetLocalizedSubtitleFilePath([[maybe_unused]] const AZStd::string& localVideoPath, [[maybe_unused]] const AZStd::string& subtitleFileExtension) const override { return ""; } + AZStd::string GetLocalizedLocXMLFilePath([[maybe_unused]] const AZStd::string& localXmlPath) const override { return ""; } // load the descriptor file with tag information virtual bool InitLocalizationData(const char* sFileName, bool bReload = false) = 0; // request to load loca data by tag. Actual loading will happen during next level load begin event. @@ -157,8 +157,8 @@ struct ILocalizationManager virtual bool ReleaseLocalizationDataByTag(const char* sTag) = 0; virtual bool LoadAllLocalizationData(bool bReload = false) = 0; - virtual bool LoadExcelXmlSpreadsheet([[maybe_unused]] const char* sFileName, [[maybe_unused]] bool bReload = false) override { return false; } - virtual void ReloadData() override {}; + bool LoadExcelXmlSpreadsheet([[maybe_unused]] const char* sFileName, [[maybe_unused]] bool bReload = false) override { return false; } + void ReloadData() override {}; // Summary: // Free localization data. @@ -174,15 +174,15 @@ struct ILocalizationManager // bEnglish - if true, translates the string into the always present English language. // Returns: // true if localization was successful, false otherwise - virtual bool LocalizeString_ch([[maybe_unused]] const char* sString, [[maybe_unused]] AZStd::string& outLocalizedString, [[maybe_unused]] bool bEnglish = false) override { return false; } + bool LocalizeString_ch([[maybe_unused]] const char* sString, [[maybe_unused]] AZStd::string& outLocalizedString, [[maybe_unused]] bool bEnglish = false) override { return false; } // Summary: // Same as LocalizeString( const char* sString, AZStd::string& outLocalizedString, bool bEnglish=false ) // but at the moment this is faster. - virtual bool LocalizeString_s([[maybe_unused]] const AZStd::string& sString, [[maybe_unused]] AZStd::string& outLocalizedString, [[maybe_unused]] bool bEnglish = false) override { return false; } + bool LocalizeString_s([[maybe_unused]] const AZStd::string& sString, [[maybe_unused]] AZStd::string& outLocalizedString, [[maybe_unused]] bool bEnglish = false) override { return false; } // Summary: - virtual void LocalizeAndSubstituteInternal([[maybe_unused]] AZStd::string& locString, [[maybe_unused]] const AZStd::vector& keys, [[maybe_unused]] const AZStd::vector& values) override {} + void LocalizeAndSubstituteInternal([[maybe_unused]] AZStd::string& locString, [[maybe_unused]] const AZStd::vector& keys, [[maybe_unused]] const AZStd::vector& values) override {} // Return the localized version corresponding to a label. // Description: // A label has to start with '@' sign. @@ -192,7 +192,7 @@ struct ILocalizationManager // bEnglish - if true, returns the always present English version of the label. // Returns: // True if localization was successful, false otherwise. - virtual bool LocalizeLabel([[maybe_unused]] const char* sLabel, [[maybe_unused]] AZStd::string& outLocalizedString, [[maybe_unused]] bool bEnglish = false) override { return false; } + bool LocalizeLabel([[maybe_unused]] const char* sLabel, [[maybe_unused]] AZStd::string& outLocalizedString, [[maybe_unused]] bool bEnglish = false) override { return false; } virtual bool IsLocalizedInfoFound([[maybe_unused]] const char* sKey) { return false; } // Summary: @@ -220,7 +220,7 @@ struct ILocalizationManager // Summary: // Return number of localization entries. - virtual int GetLocalizedStringCount() override { return -1; } + int GetLocalizedStringCount() override { return -1; } // Summary: // Get the localization info structure at index nIndex. @@ -247,7 +247,7 @@ struct ILocalizationManager // sLocalizedString - Corresponding english language string. // Returns: // True if successful, false otherwise (key not found). - virtual bool GetEnglishString([[maybe_unused]] const char* sKey, [[maybe_unused]] AZStd::string& sLocalizedString) override { return false; } + bool GetEnglishString([[maybe_unused]] const char* sKey, [[maybe_unused]] AZStd::string& sLocalizedString) override { return false; } // Summary: // Get Subtitle for Key or Label . @@ -257,25 +257,25 @@ struct ILocalizationManager // bForceSubtitle - If true, get subtitle (sLocalized or sEnglish) even if not specified in Data file. // Returns: // True if subtitle found (and outSubtitle filled in), false otherwise. - virtual bool GetSubtitle([[maybe_unused]] const char* sKeyOrLabel, [[maybe_unused]] AZStd::string& outSubtitle, [[maybe_unused]] bool bForceSubtitle = false) override { return false; } + bool GetSubtitle([[maybe_unused]] const char* sKeyOrLabel, [[maybe_unused]] AZStd::string& outSubtitle, [[maybe_unused]] bool bForceSubtitle = false) override { return false; } // Description: // These methods format outString depending on sString with ordered arguments // FormatStringMessage(outString, "This is %2 and this is %1", "second", "first"); // Arguments: // outString - This is first and this is second. - virtual void FormatStringMessage_List([[maybe_unused]] AZStd::string& outString, [[maybe_unused]] const AZStd::string& sString, [[maybe_unused]] const char** sParams, [[maybe_unused]] int nParams) override {} - virtual void FormatStringMessage([[maybe_unused]] AZStd::string& outString, [[maybe_unused]] const AZStd::string& sString, [[maybe_unused]] const char* param1, [[maybe_unused]] const char* param2 = 0, [[maybe_unused]] const char* param3 = 0, [[maybe_unused]] const char* param4 = 0) override {} + void FormatStringMessage_List([[maybe_unused]] AZStd::string& outString, [[maybe_unused]] const AZStd::string& sString, [[maybe_unused]] const char** sParams, [[maybe_unused]] int nParams) override {} + void FormatStringMessage([[maybe_unused]] AZStd::string& outString, [[maybe_unused]] const AZStd::string& sString, [[maybe_unused]] const char* param1, [[maybe_unused]] const char* param2 = nullptr, [[maybe_unused]] const char* param3 = nullptr, [[maybe_unused]] const char* param4 = nullptr) override {} - virtual void LocalizeTime([[maybe_unused]] time_t t, [[maybe_unused]] bool bMakeLocalTime, [[maybe_unused]] bool bShowSeconds, [[maybe_unused]] AZStd::string& outTimeString) override {} - virtual void LocalizeDate([[maybe_unused]] time_t t, [[maybe_unused]] bool bMakeLocalTime, [[maybe_unused]] bool bShort, [[maybe_unused]] bool bIncludeWeekday, [[maybe_unused]] AZStd::string& outDateString) override {} - virtual void LocalizeDuration([[maybe_unused]] int seconds, [[maybe_unused]] AZStd::string& outDurationString) override {} - virtual void LocalizeNumber([[maybe_unused]] int number, [[maybe_unused]] AZStd::string& outNumberString) override {} - virtual void LocalizeNumber_Decimal([[maybe_unused]] float number, [[maybe_unused]] int decimals, [[maybe_unused]] AZStd::string& outNumberString) override {} + void LocalizeTime([[maybe_unused]] time_t t, [[maybe_unused]] bool bMakeLocalTime, [[maybe_unused]] bool bShowSeconds, [[maybe_unused]] AZStd::string& outTimeString) override {} + void LocalizeDate([[maybe_unused]] time_t t, [[maybe_unused]] bool bMakeLocalTime, [[maybe_unused]] bool bShort, [[maybe_unused]] bool bIncludeWeekday, [[maybe_unused]] AZStd::string& outDateString) override {} + void LocalizeDuration([[maybe_unused]] int seconds, [[maybe_unused]] AZStd::string& outDurationString) override {} + void LocalizeNumber([[maybe_unused]] int number, [[maybe_unused]] AZStd::string& outNumberString) override {} + void LocalizeNumber_Decimal([[maybe_unused]] float number, [[maybe_unused]] int decimals, [[maybe_unused]] AZStd::string& outNumberString) override {} // Summary: // Returns true if the project has localization configured for use, false otherwise. - virtual bool ProjectUsesLocalization() const override { return false; } + bool ProjectUsesLocalization() const override { return false; } // static ILINE TLocalizationBitfield LocalizationBitfieldFromPILID(EPlatformIndependentLanguageID pilid) 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/LocalizedStringManager.h b/Code/Legacy/CrySystem/LocalizedStringManager.h index b1cb5b2067..8dfb3644a0 100644 --- a/Code/Legacy/CrySystem/LocalizedStringManager.h +++ b/Code/Legacy/CrySystem/LocalizedStringManager.h @@ -27,7 +27,7 @@ class CLocalizedStringsManager , public ISystemEventListener { public: - typedef std::vector TLocalizationTagVec; + using TLocalizationTagVec = std::vector; constexpr const static size_t LOADING_FIXED_STRING_LENGTH = 2048; constexpr const static size_t COMPRESSION_FIXED_BUFFER_LENGTH = 6144; @@ -36,45 +36,45 @@ public: virtual ~CLocalizedStringsManager(); // ILocalizationManager - const char* LangNameFromPILID(const ILocalizationManager::EPlatformIndependentLanguageID id); + const char* LangNameFromPILID(const ILocalizationManager::EPlatformIndependentLanguageID id) override; ILocalizationManager::EPlatformIndependentLanguageID PILIDFromLangName(AZStd::string langName) override; ILocalizationManager::EPlatformIndependentLanguageID GetSystemLanguage() override; - ILocalizationManager::TLocalizationBitfield MaskSystemLanguagesFromSupportedLocalizations(const ILocalizationManager::TLocalizationBitfield systemLanguages); - ILocalizationManager::TLocalizationBitfield IsLanguageSupported(const ILocalizationManager::EPlatformIndependentLanguageID id); + ILocalizationManager::TLocalizationBitfield MaskSystemLanguagesFromSupportedLocalizations(const ILocalizationManager::TLocalizationBitfield systemLanguages) override; + ILocalizationManager::TLocalizationBitfield IsLanguageSupported(const ILocalizationManager::EPlatformIndependentLanguageID id) override; const char* GetLanguage() override; bool SetLanguage(const char* sLanguage) override; int GetLocalizationFormat() const override; - virtual AZStd::string GetLocalizedSubtitleFilePath(const AZStd::string& localVideoPath, const AZStd::string& subtitleFileExtension) const override; - virtual AZStd::string GetLocalizedLocXMLFilePath(const AZStd::string& localXmlPath) const override; - bool InitLocalizationData(const char* sFileName, bool bReload = false); - bool RequestLoadLocalizationDataByTag(const char* sTag); - bool LoadLocalizationDataByTag(const char* sTag, bool bReload = false); - bool ReleaseLocalizationDataByTag(const char* sTag); + AZStd::string GetLocalizedSubtitleFilePath(const AZStd::string& localVideoPath, const AZStd::string& subtitleFileExtension) const override; + AZStd::string GetLocalizedLocXMLFilePath(const AZStd::string& localXmlPath) const override; + bool InitLocalizationData(const char* sFileName, bool bReload = false) override; + bool RequestLoadLocalizationDataByTag(const char* sTag) override; + bool LoadLocalizationDataByTag(const char* sTag, bool bReload = false) override; + bool ReleaseLocalizationDataByTag(const char* sTag) override; bool LoadAllLocalizationData(bool bReload = false) override; bool LoadExcelXmlSpreadsheet(const char* sFileName, bool bReload = false) override; void ReloadData() override; - void FreeData(); + void FreeData() override; bool LocalizeString_s(const AZStd::string& sString, AZStd::string& outLocalizedString, bool bEnglish = false) override; bool LocalizeString_ch(const char* sString, AZStd::string& outLocalizedString, bool bEnglish = false) override; void LocalizeAndSubstituteInternal(AZStd::string& locString, const AZStd::vector& keys, const AZStd::vector& values) override; bool LocalizeLabel(const char* sLabel, AZStd::string& outLocalizedString, bool bEnglish = false) override; - bool IsLocalizedInfoFound(const char* sKey); - bool GetLocalizedInfoByKey(const char* sKey, SLocalizedInfoGame& outGameInfo); - bool GetLocalizedInfoByKey(const char* sKey, SLocalizedSoundInfoGame* pOutSoundInfoGame); - int GetLocalizedStringCount(); - bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoGame& outGameInfo); - bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoEditor& outEditorInfo); + bool IsLocalizedInfoFound(const char* sKey) override; + bool GetLocalizedInfoByKey(const char* sKey, SLocalizedInfoGame& outGameInfo) override; + bool GetLocalizedInfoByKey(const char* sKey, SLocalizedSoundInfoGame* pOutSoundInfoGame) override; + int GetLocalizedStringCount() override; + bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoGame& outGameInfo) override; + bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoEditor& outEditorInfo) override; bool GetEnglishString(const char* sKey, AZStd::string& sLocalizedString) override; bool GetSubtitle(const char* sKeyOrLabel, AZStd::string& outSubtitle, bool bForceSubtitle = false) override; void FormatStringMessage_List(AZStd::string& outString, const AZStd::string& sString, const char** sParams, int nParams) override; - void FormatStringMessage(AZStd::string& outString, const AZStd::string& sString, const char* param1, const char* param2 = 0, const char* param3 = 0, const char* param4 = 0) override; + void FormatStringMessage(AZStd::string& outString, const AZStd::string& sString, const char* param1, const char* param2 = nullptr, const char* param3 = nullptr, const char* param4 = nullptr) override; void LocalizeTime(time_t t, bool bMakeLocalTime, bool bShowSeconds, AZStd::string& outTimeString) override; void LocalizeDate(time_t t, bool bMakeLocalTime, bool bShort, bool bIncludeWeekday, AZStd::string& outDateString) override; @@ -86,7 +86,7 @@ public: // ~ILocalizationManager // ISystemEventManager - void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam); + void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override; // ~ISystemEventManager void GetLoadedTags(TLocalizationTagVec& tagVec); @@ -98,7 +98,7 @@ private: bool LocalizeStringInternal(const char* pStr, size_t len, AZStd::string& outLocalizedString, bool bEnglish); bool DoLoadExcelXmlSpreadsheet(const char* sFileName, uint8 tagID, bool bReload); - typedef bool(CLocalizedStringsManager::*LoadFunc)(const char*, uint8, bool); + using LoadFunc = bool(CLocalizedStringsManager::*)(const char*, uint8, bool); bool DoLoadAGSXmlDocument(const char* sFileName, uint8 tagID, bool bReload); LoadFunc GetLoadFunction() const; @@ -163,9 +163,9 @@ private: SLocalizedStringEntry() : flags(0) , huffmanTreeIndex(-1) - , pEditorExtension(NULL) + , pEditorExtension(nullptr) { - TranslatedText.psUtf8Uncompressed = NULL; + TranslatedText.psUtf8Uncompressed = nullptr; }; ~SLocalizedStringEntry() { @@ -184,12 +184,12 @@ private: }; //Keys as CRC32. Strings previously, but these proved too large - typedef VectorMap StringsKeyMap; + using StringsKeyMap = VectorMap; struct SLanguage { - typedef std::vector TLocalizedStringEntries; - typedef std::vector THuffmanCoders; + using TLocalizedStringEntries = std::vector; + using THuffmanCoders = std::vector; AZStd::string sLanguage; StringsKeyMap m_keysMap; @@ -224,27 +224,27 @@ private: SLanguage* m_pLanguage; // all loaded Localization Files - typedef std::pair pairFileName; - typedef std::map tmapFilenames; + using pairFileName = std::pair; + using tmapFilenames = std::map; tmapFilenames m_loadedTables; // filenames per tag - typedef std::vector TStringVec; + using TStringVec = std::vector; struct STag { TStringVec filenames; uint8 id; bool loaded; }; - typedef std::map TTagFileNames; + using TTagFileNames = std::map; TTagFileNames m_tagFileNames; TStringVec m_tagLoadRequests; // Array of loaded languages. std::vector m_languages; - typedef std::set PrototypeSoundEvents; + using PrototypeSoundEvents = std::set; PrototypeSoundEvents m_prototypeEvents; // this set is purely used for clever string/string assigning to save memory struct less_strcmp @@ -255,7 +255,7 @@ private: } }; - typedef std::set CharacterNameSet; + using CharacterNameSet = std::set; CharacterNameSet m_characterNameSet; // this set is purely used for clever string/string assigning to save memory // CVARs @@ -268,5 +268,5 @@ private: //Lock for mutable AZStd::mutex m_cs; - typedef AZStd::lock_guard AutoLock; + using AutoLock = AZStd::lock_guard; }; diff --git a/Code/Legacy/CrySystem/System.h b/Code/Legacy/CrySystem/System.h index 9023171ea3..015b09a69b 100644 --- a/Code/Legacy/CrySystem/System.h +++ b/Code/Legacy/CrySystem/System.h @@ -90,7 +90,7 @@ class CWatchdogThread; #endif #ifdef WIN32 -typedef void* WIN_HMODULE; +using WIN_HMODULE = void*; #else typedef void* WIN_HMODULE; #endif @@ -105,7 +105,7 @@ struct IDataProbe; #define PHSYICS_OBJECT_ENTITY 0 -typedef void (__cdecl * VTuneFunction)(void); +using VTuneFunction = void (__cdecl *)(void); extern VTuneFunction VTResume; extern VTuneFunction VTPause; @@ -177,10 +177,10 @@ struct CProfilingSystem // Summary: // Resumes vtune data collection. - virtual void VTuneResume(); + void VTuneResume() override; // Summary: // Pauses vtune data collection. - virtual void VTunePause(); + void VTunePause() override; ////////////////////////////////////////////////////////////////////////// }; @@ -216,105 +216,105 @@ public: // interface ILoadConfigurationEntrySink ---------------------------------- - virtual void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup); + void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup) override; // ISystemEventListener - virtual void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam); + void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override; /////////////////////////////////////////////////////////////////////////// //! @name ISystem implementation //@{ virtual bool Init(const SSystemInitParams& startupParams); - virtual void Release(); + void Release() override; - virtual SSystemGlobalEnvironment* GetGlobalEnvironment() { return &m_env; } + SSystemGlobalEnvironment* GetGlobalEnvironment() override { return &m_env; } - virtual bool UpdatePreTickBus(int updateFlags = 0, int nPauseMode = 0); - virtual bool UpdatePostTickBus(int updateFlags = 0, int nPauseMode = 0); - virtual bool UpdateLoadtime(); + bool UpdatePreTickBus(int updateFlags = 0, int nPauseMode = 0) override; + bool UpdatePostTickBus(int updateFlags = 0, int nPauseMode = 0) override; + bool UpdateLoadtime() override; //////////////////////////////////////////////////////////////////////// // CrySystemRequestBus interface implementation ISystem* GetCrySystem() override; //////////////////////////////////////////////////////////////////////// - void Relaunch(bool bRelaunch); - bool IsRelaunch() const { return m_bRelaunch; }; + void Relaunch(bool bRelaunch) override; + bool IsRelaunch() const override { return m_bRelaunch; }; - void SerializingFile(int mode) { m_iLoadingMode = mode; } - int IsSerializingFile() const { return m_iLoadingMode; } - void Quit(); - bool IsQuitting() const; + void SerializingFile(int mode) override { m_iLoadingMode = mode; } + int IsSerializingFile() const override { return m_iLoadingMode; } + void Quit() override; + bool IsQuitting() const override; void ShutdownFileSystem(); // used to cleanup any file resources, such as cache handle. void SetAffinity(); - virtual const char* GetUserName(); - virtual int GetApplicationInstance(); + const char* GetUserName() override; + int GetApplicationInstance() override; int GetApplicationLogInstance(const char* logFilePath) override; - ITimer* GetITimer(){ return m_env.pTimer; } - AZ::IO::IArchive* GetIPak() { return m_env.pCryPak; }; - IConsole* GetIConsole() { return m_env.pConsole; }; - IRemoteConsole* GetIRemoteConsole(); - IMovieSystem* GetIMovieSystem() { return m_env.pMovieSystem; }; - ICryFont* GetICryFont(){ return m_env.pCryFont; } - ILog* GetILog(){ return m_env.pLog; } - ICmdLine* GetICmdLine(){ return m_pCmdLine; } - IViewSystem* GetIViewSystem(); - ILevelSystem* GetILevelSystem(); - ISystemEventDispatcher* GetISystemEventDispatcher() { return m_pSystemEventDispatcher; } - IProfilingSystem* GetIProfilingSystem() { return &m_ProfilingSystem; } + ITimer* GetITimer() override{ return m_env.pTimer; } + AZ::IO::IArchive* GetIPak() override { return m_env.pCryPak; }; + IConsole* GetIConsole() override { return m_env.pConsole; }; + IRemoteConsole* GetIRemoteConsole() override; + IMovieSystem* GetIMovieSystem() override { return m_env.pMovieSystem; }; + ICryFont* GetICryFont() override{ return m_env.pCryFont; } + ILog* GetILog() override{ return m_env.pLog; } + ICmdLine* GetICmdLine() override{ return m_pCmdLine; } + IViewSystem* GetIViewSystem() override; + ILevelSystem* GetILevelSystem() override; + ISystemEventDispatcher* GetISystemEventDispatcher() override { return m_pSystemEventDispatcher; } + IProfilingSystem* GetIProfilingSystem() override { return &m_ProfilingSystem; } ////////////////////////////////////////////////////////////////////////// // retrieves the perlin noise singleton instance - CPNoise3* GetNoiseGen(); - virtual uint64 GetUpdateCounter() { return m_nUpdateCounter; }; + CPNoise3* GetNoiseGen() override; + uint64 GetUpdateCounter() override { return m_nUpdateCounter; }; void DetectGameFolderAccessRights(); - virtual void ExecuteCommandLine(bool deferred=true); + void ExecuteCommandLine(bool deferred=true) override; - virtual void GetUpdateStats(SSystemUpdateStats& stats); + void GetUpdateStats(SSystemUpdateStats& stats) override; ////////////////////////////////////////////////////////////////////////// - virtual XmlNodeRef CreateXmlNode(const char* sNodeName = "", bool bReuseStrings = false, bool bIsProcessingInstruction = false); - virtual XmlNodeRef LoadXmlFromFile(const char* sFilename, bool bReuseStrings = false); - virtual XmlNodeRef LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings = false, bool bSuppressWarnings = false); - virtual IXmlUtils* GetXmlUtils(); + XmlNodeRef CreateXmlNode(const char* sNodeName = "", bool bReuseStrings = false, bool bIsProcessingInstruction = false) override; + XmlNodeRef LoadXmlFromFile(const char* sFilename, bool bReuseStrings = false) override; + XmlNodeRef LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings = false, bool bSuppressWarnings = false) override; + IXmlUtils* GetXmlUtils() override; ////////////////////////////////////////////////////////////////////////// - void IgnoreUpdates(bool bIgnore) { m_bIgnoreUpdates = bIgnore; }; + void IgnoreUpdates(bool bIgnore) override { m_bIgnoreUpdates = bIgnore; }; - void SetIProcess(IProcess* process); - IProcess* GetIProcess(){ return m_pProcess; } + void SetIProcess(IProcess* process) override; + IProcess* GetIProcess() override{ return m_pProcess; } - bool IsTestMode() const { return m_bTestMode; } + bool IsTestMode() const override { return m_bTestMode; } //@} void SleepIfNeeded(); - virtual void FatalError(const char* format, ...) PRINTF_PARAMS(2, 3); - virtual void ReportBug(const char* format, ...) PRINTF_PARAMS(2, 3); + void FatalError(const char* format, ...) override PRINTF_PARAMS(2, 3); + void ReportBug(const char* format, ...) override PRINTF_PARAMS(2, 3); // Validator Warning. - void WarningV(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, va_list args); - void Warning(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, ...); - virtual int ShowMessage(const char* text, const char* caption, unsigned int uType); - bool CheckLogVerbosity(int verbosity); + void WarningV(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, va_list args) override; + void Warning(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, ...) override; + int ShowMessage(const char* text, const char* caption, unsigned int uType) override; + bool CheckLogVerbosity(int verbosity) override; //! Return pointer to user defined callback. ISystemUserCallback* GetUserCallback() const { return m_pUserCallback; }; ////////////////////////////////////////////////////////////////////////// - virtual void SaveConfiguration(); - virtual void LoadConfiguration(const char* sFilename, ILoadConfigurationEntrySink* pSink = 0, bool warnIfMissing = true); - virtual ESystemConfigSpec GetMaxConfigSpec() const; - virtual ESystemConfigPlatform GetConfigPlatform() const; - virtual void SetConfigPlatform(ESystemConfigPlatform platform); + void SaveConfiguration() override; + void LoadConfiguration(const char* sFilename, ILoadConfigurationEntrySink* pSink = nullptr, bool warnIfMissing = true) override; + ESystemConfigSpec GetMaxConfigSpec() const override; + ESystemConfigPlatform GetConfigPlatform() const override; + void SetConfigPlatform(ESystemConfigPlatform platform) override; ////////////////////////////////////////////////////////////////////////// - virtual bool IsPaused() const { return m_bPaused; }; + bool IsPaused() const override { return m_bPaused; }; - virtual ILocalizationManager* GetLocalizationManager(); - virtual void debug_GetCallStack(const char** pFunctions, int& nCount); - virtual void debug_LogCallStack(int nMaxFuncs = 32, int nFlags = 0); + ILocalizationManager* GetLocalizationManager() override; + void debug_GetCallStack(const char** pFunctions, int& nCount) override; + void debug_LogCallStack(int nMaxFuncs = 32, int nFlags = 0) override; // Get the current callstack in raw address form (more lightweight than the above functions) // static as memReplay needs it before CSystem has been setup - expose a ISystem interface to this function if you need it outside CrySystem static void debug_GetCallStackRaw(void** callstack, uint32& callstackLength); @@ -329,13 +329,13 @@ public: #if defined(WIN32) friend LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); #endif - virtual void* GetRootWindowMessageHandler(); - virtual void RegisterWindowMessageHandler(IWindowMessageHandler* pHandler); - virtual void UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler); + void* GetRootWindowMessageHandler() override; + void RegisterWindowMessageHandler(IWindowMessageHandler* pHandler) override; + void UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler) override; // IWindowMessageHandler #if defined(WIN32) - virtual bool HandleMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult); + bool HandleMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult) override; #endif // ~IWindowMessageHandler @@ -378,7 +378,7 @@ private: bool ReLaunchMediaCenter(); void UpdateAudioSystems(); - void AddCVarGroupDirectory(const AZStd::string& sPath); + void AddCVarGroupDirectory(const AZStd::string& sPath) override; AZStd::unique_ptr LoadDynamiclibrary(const char* dllName) const; @@ -394,13 +394,13 @@ public: // interface ISystem ------------------------------------------- virtual IDataProbe* GetIDataProbe() { return m_pDataProbe; }; - virtual void SetForceNonDevMode(bool bValue); - virtual bool GetForceNonDevMode() const; - virtual bool WasInDevMode() const { return m_bWasInDevMode; }; - virtual bool IsDevMode() const { return m_bInDevMode && !GetForceNonDevMode(); } + void SetForceNonDevMode(bool bValue) override; + bool GetForceNonDevMode() const override; + bool WasInDevMode() const override { return m_bWasInDevMode; }; + bool IsDevMode() const override { return m_bInDevMode && !GetForceNonDevMode(); } - virtual void SetConsoleDrawEnabled(bool enabled) { m_bDrawConsole = enabled; } - virtual void SetUIDrawEnabled(bool enabled) { m_bDrawUI = enabled; } + void SetConsoleDrawEnabled(bool enabled) override { m_bDrawConsole = enabled; } + void SetUIDrawEnabled(bool enabled) override { m_bDrawUI = enabled; } // ------------------------------------------------------------- @@ -408,10 +408,10 @@ public: //! recreates the variable if necessary ICVar* attachVariable (const char* szVarName, int* pContainer, const char* szComment, int dwFlags = 0); - const CTimeValue& GetLastTickTime(void) const { return m_lastTickTime; } - const ICVar* GetDedicatedMaxRate(void) const { return m_svDedicatedMaxRate; } + const CTimeValue& GetLastTickTime() const { return m_lastTickTime; } + const ICVar* GetDedicatedMaxRate() const { return m_svDedicatedMaxRate; } - std::shared_ptr CreateLocalFileIO(); + std::shared_ptr CreateLocalFileIO() override; private: // ------------------------------------------------------ @@ -584,9 +584,9 @@ public: ////////////////////////////////////////////////////////////////////////// // File version. ////////////////////////////////////////////////////////////////////////// - virtual const SFileVersion& GetFileVersion(); - virtual const SFileVersion& GetProductVersion(); - virtual const SFileVersion& GetBuildVersion(); + const SFileVersion& GetFileVersion() override; + const SFileVersion& GetProductVersion() override; + const SFileVersion& GetBuildVersion() override; bool InitVTuneProfiler(); @@ -601,16 +601,16 @@ public: ////////////////////////////////////////////////////////////////////////// // CryAssert and error related. - virtual bool RegisterErrorObserver(IErrorObserver* errorObserver); - bool UnregisterErrorObserver(IErrorObserver* errorObserver); - virtual void OnAssert(const char* condition, const char* message, const char* fileName, unsigned int fileLineNumber); + bool RegisterErrorObserver(IErrorObserver* errorObserver) override; + bool UnregisterErrorObserver(IErrorObserver* errorObserver) override; + void OnAssert(const char* condition, const char* message, const char* fileName, unsigned int fileLineNumber) override; void OnFatalError(const char* message); - bool IsAssertDialogVisible() const; - void SetAssertVisible(bool bAssertVisble); + bool IsAssertDialogVisible() const override; + void SetAssertVisible(bool bAssertVisble) override; ////////////////////////////////////////////////////////////////////////// - virtual void ClearErrorMessages() + void ClearErrorMessages() override { m_ErrorMessages.clear(); } @@ -620,11 +620,11 @@ public: return m_eRuntimeState == ESYSTEM_EVENT_LEVEL_LOAD_START_LOADINGSCREEN; } - virtual ESystemGlobalState GetSystemGlobalState(void); - virtual void SetSystemGlobalState(ESystemGlobalState systemGlobalState); + ESystemGlobalState GetSystemGlobalState() override; + void SetSystemGlobalState(ESystemGlobalState systemGlobalState) override; #if !defined(_RELEASE) - virtual bool IsSavingResourceList() const { return (g_cvars.archiveVars.nSaveLevelResourceList != 0); } + bool IsSavingResourceList() const override { return (g_cvars.archiveVars.nSaveLevelResourceList != 0); } #endif private: @@ -651,7 +651,7 @@ protected: // ------------------------------------------------------------- float m_Color[4]; bool m_HardFailure; }; - typedef std::list TErrorMessages; + using TErrorMessages = std::list; TErrorMessages m_ErrorMessages; bool m_bHasRenderedErrorMessage; diff --git a/Code/Legacy/CrySystem/Timer.h b/Code/Legacy/CrySystem/Timer.h index 93dffeec13..69fd2357e0 100644 --- a/Code/Legacy/CrySystem/Timer.h +++ b/Code/Legacy/CrySystem/Timer.h @@ -21,7 +21,7 @@ public: // constructor CTimer(); // destructor - ~CTimer() {}; + ~CTimer() = default; bool Init(); @@ -30,57 +30,57 @@ public: // TODO: Review m_time usage in System.cpp // if it wants Game Time / UI Time or a new Render Time? - virtual void ResetTimer(); - virtual void UpdateOnFrameStart(); - virtual float GetCurrTime(ETimer which = ETIMER_GAME) const; - virtual CTimeValue GetAsyncTime() const; - virtual float GetAsyncCurTime(); // retrieve the actual wall clock time passed since the game started, in seconds - virtual float GetFrameTime(ETimer which = ETIMER_GAME) const; - virtual float GetRealFrameTime() const; - virtual float GetTimeScale() const; - virtual float GetTimeScale(uint32 channel) const; - virtual void SetTimeScale(float scale, uint32 channel = 0); - virtual void ClearTimeScales(); - virtual void EnableTimer(bool bEnable); - virtual float GetFrameRate(); - virtual float GetProfileFrameBlending(float* pfBlendTime = 0, int* piBlendMode = 0); - virtual void Serialize(TSerialize ser); - virtual bool IsTimerEnabled() const; + void ResetTimer() override; + void UpdateOnFrameStart() override; + float GetCurrTime(ETimer which = ETIMER_GAME) const override; + CTimeValue GetAsyncTime() const override; + float GetAsyncCurTime() override; // retrieve the actual wall clock time passed since the game started, in seconds + float GetFrameTime(ETimer which = ETIMER_GAME) const override; + float GetRealFrameTime() const override; + float GetTimeScale() const override; + float GetTimeScale(uint32 channel) const override; + void SetTimeScale(float scale, uint32 channel = 0) override; + void ClearTimeScales() override; + void EnableTimer(bool bEnable) override; + float GetFrameRate() override; + float GetProfileFrameBlending(float* pfBlendTime = nullptr, int* piBlendMode = nullptr) override; + void Serialize(TSerialize ser) override; + bool IsTimerEnabled() const override; //! try to pause/unpause a timer // returns true if successfully paused/unpaused, false otherwise - virtual bool PauseTimer(ETimer which, bool bPause); + bool PauseTimer(ETimer which, bool bPause) override; //! determine if a timer is paused // returns true if paused, false otherwise - virtual bool IsTimerPaused(ETimer which); + bool IsTimerPaused(ETimer which) override; //! try to set a timer // return true if successful, false otherwise - virtual bool SetTimer(ETimer which, float timeInSeconds); + bool SetTimer(ETimer which, float timeInSeconds) override; //! make a tm struct from a time_t in UTC (like gmtime) - virtual void SecondsToDateUTC(time_t time, struct tm& outDateUTC); + void SecondsToDateUTC(time_t time, struct tm& outDateUTC) override; //! make a UTC time from a tm (like timegm, but not available on all platforms) - virtual time_t DateToSecondsUTC(struct tm& timePtr); + time_t DateToSecondsUTC(struct tm& timePtr) override; //! Convert from Tics to Seconds - virtual float TicksToSeconds(int64 ticks) + float TicksToSeconds(int64 ticks) override { return float((double)ticks * m_fSecsPerTick); } //! Get number of ticks per second - virtual int64 GetTicksPerSecond() + int64 GetTicksPerSecond() override { return m_lTicksPerSec; } - virtual const CTimeValue& GetFrameStartTime(ETimer which = ETIMER_GAME) const { return m_CurrTime[(int)which]; } - virtual ITimer* CreateNewTimer(); + const CTimeValue& GetFrameStartTime(ETimer which = ETIMER_GAME) const override { return m_CurrTime[(int)which]; } + ITimer* CreateNewTimer() override; - virtual void EnableFixedTimeMode(bool enable, float timeStep) override; + void EnableFixedTimeMode(bool enable, float timeStep) override; private: // --------------------------------------------------------------------- diff --git a/Code/Legacy/CrySystem/ViewSystem/View.h b/Code/Legacy/CrySystem/ViewSystem/View.h index 237a2d0fa6..001bf694fd 100644 --- a/Code/Legacy/CrySystem/ViewSystem/View.h +++ b/Code/Legacy/CrySystem/ViewSystem/View.h @@ -26,7 +26,7 @@ class CView public: CView(ISystem* pSystem); - virtual ~CView(); + ~CView() override; //shaking struct SShake @@ -85,24 +85,24 @@ public: // IView - virtual void Release(); - virtual void Update(float frameTime, bool isActive); + void Release() override; + void Update(float frameTime, bool isActive) override; virtual void ProcessShaking(float frameTime); virtual void ProcessShake(SShake* pShake, float frameTime); - virtual void ResetShaking(); - virtual void ResetBlending() { m_viewParams.ResetBlending(); } - virtual void LinkTo(AZ::Entity* follow); - virtual void Unlink(); - virtual AZ::EntityId GetLinkedId() {return m_linkedTo; }; - virtual void SetCurrentParams(SViewParams& params) { m_viewParams = params; }; - virtual const SViewParams* GetCurrentParams() {return &m_viewParams; } - virtual void SetViewShake(Ang3 shakeAngle, Vec3 shakeShift, float duration, float frequency, float randomness, int shakeID, bool bFlipVec = true, bool bUpdateOnly = false, bool bGroundOnly = false); - virtual void SetViewShakeEx(const SShakeParams& params); - virtual void StopShake(int shakeID); - virtual void SetFrameAdditiveCameraAngles(const Ang3& addFrameAngles); - virtual void SetScale(const float scale); - virtual void SetZoomedScale(const float scale); - virtual void SetActive(const bool bActive); + void ResetShaking() override; + void ResetBlending() override { m_viewParams.ResetBlending(); } + void LinkTo(AZ::Entity* follow) override; + void Unlink() override; + AZ::EntityId GetLinkedId() override {return m_linkedTo; }; + void SetCurrentParams(SViewParams& params) override { m_viewParams = params; }; + const SViewParams* GetCurrentParams() override {return &m_viewParams; } + void SetViewShake(Ang3 shakeAngle, Vec3 shakeShift, float duration, float frequency, float randomness, int shakeID, bool bFlipVec = true, bool bUpdateOnly = false, bool bGroundOnly = false) override; + void SetViewShakeEx(const SShakeParams& params) override; + void StopShake(int shakeID) override; + void SetFrameAdditiveCameraAngles(const Ang3& addFrameAngles) override; + void SetScale(const float scale) override; + void SetZoomedScale(const float scale) override; + void SetActive(const bool bActive) override; // ~IView void PostSerialize() override; diff --git a/Code/Legacy/CrySystem/ViewSystem/ViewSystem.h b/Code/Legacy/CrySystem/ViewSystem/ViewSystem.h index e0e4a67e9e..80d1faed15 100644 --- a/Code/Legacy/CrySystem/ViewSystem/ViewSystem.h +++ b/Code/Legacy/CrySystem/ViewSystem/ViewSystem.h @@ -29,60 +29,60 @@ class CViewSystem { private: - typedef std::map TViewMap; - typedef std::vector TViewIdVector; + using TViewMap = std::map; + using TViewIdVector = std::vector; public: //IViewSystem - virtual IView* CreateView(); - virtual unsigned int AddView(IView* pView) override; - virtual void RemoveView(IView* pView); - virtual void RemoveView(unsigned int viewId); + IView* CreateView() override; + unsigned int AddView(IView* pView) override; + void RemoveView(IView* pView) override; + void RemoveView(unsigned int viewId) override; - virtual void SetActiveView(IView* pView); - virtual void SetActiveView(unsigned int viewId); + void SetActiveView(IView* pView) override; + void SetActiveView(unsigned int viewId) override; //CameraSystemRequestBus AZ::EntityId GetActiveCamera() override { return m_activeViewId ? GetActiveView()->GetLinkedId() : AZ::EntityId(); } //utility functions - virtual IView* GetView(unsigned int viewId); - virtual IView* GetActiveView(); + IView* GetView(unsigned int viewId) override; + IView* GetActiveView() override; - virtual unsigned int GetViewId(IView* pView); - virtual unsigned int GetActiveViewId(); + unsigned int GetViewId(IView* pView) override; + unsigned int GetActiveViewId() override; - virtual void PostSerialize(); + void PostSerialize() override; - virtual IView* GetViewByEntityId(const AZ::EntityId& id, bool forceCreate); + IView* GetViewByEntityId(const AZ::EntityId& id, bool forceCreate) override; - virtual float GetDefaultZNear() { return m_fDefaultCameraNearZ; }; - virtual void SetBlendParams(float fBlendPosSpeed, float fBlendRotSpeed, bool performBlendOut) { m_fBlendInPosSpeed = fBlendPosSpeed; m_fBlendInRotSpeed = fBlendRotSpeed; m_bPerformBlendOut = performBlendOut; }; - virtual void SetOverrideCameraRotation(bool bOverride, Quat rotation); - virtual bool IsPlayingCutScene() const + float GetDefaultZNear() override { return m_fDefaultCameraNearZ; }; + void SetBlendParams(float fBlendPosSpeed, float fBlendRotSpeed, bool performBlendOut) override { m_fBlendInPosSpeed = fBlendPosSpeed; m_fBlendInRotSpeed = fBlendRotSpeed; m_bPerformBlendOut = performBlendOut; }; + void SetOverrideCameraRotation(bool bOverride, Quat rotation) override; + bool IsPlayingCutScene() const override { return m_cutsceneCount > 0; } - virtual void SetDeferredViewSystemUpdate(bool const bDeferred){ m_useDeferredViewSystemUpdate = bDeferred; } - virtual bool UseDeferredViewSystemUpdate() const { return m_useDeferredViewSystemUpdate; } - virtual void SetControlAudioListeners(bool const bActive); + void SetDeferredViewSystemUpdate(bool const bDeferred) override{ m_useDeferredViewSystemUpdate = bDeferred; } + bool UseDeferredViewSystemUpdate() const override { return m_useDeferredViewSystemUpdate; } + void SetControlAudioListeners(bool const bActive) override; //~IViewSystem //IMovieUser - virtual void SetActiveCamera(const SCameraParams& Params); - virtual void BeginCutScene(IAnimSequence* pSeq, unsigned long dwFlags, bool bResetFX); - virtual void EndCutScene(IAnimSequence* pSeq, unsigned long dwFlags); - virtual void SendGlobalEvent(const char* pszEvent); + void SetActiveCamera(const SCameraParams& Params) override; + void BeginCutScene(IAnimSequence* pSeq, unsigned long dwFlags, bool bResetFX) override; + void EndCutScene(IAnimSequence* pSeq, unsigned long dwFlags) override; + void SendGlobalEvent(const char* pszEvent) override; //~IMovieUser // ILevelSystemListener - virtual void OnLevelNotFound([[maybe_unused]] const char* levelName) {}; - virtual void OnLoadingStart([[maybe_unused]] const char* levelName); - virtual void OnLoadingComplete([[maybe_unused]] const char* levelName){}; - virtual void OnLoadingError([[maybe_unused]] const char* levelName, [[maybe_unused]] const char* error){}; - virtual void OnLoadingProgress([[maybe_unused]] const char* levelName, [[maybe_unused]] int progressAmount){}; - virtual void OnUnloadComplete([[maybe_unused]] const char* levelName); + void OnLevelNotFound([[maybe_unused]] const char* levelName) override {}; + void OnLoadingStart([[maybe_unused]] const char* levelName) override; + void OnLoadingComplete([[maybe_unused]] const char* levelName) override{}; + void OnLoadingError([[maybe_unused]] const char* levelName, [[maybe_unused]] const char* error) override{}; + void OnLoadingProgress([[maybe_unused]] const char* levelName, [[maybe_unused]] int progressAmount) override{}; + void OnUnloadComplete([[maybe_unused]] const char* levelName) override; //~ILevelSystemListener CViewSystem(ISystem* pSystem); @@ -91,16 +91,16 @@ public: void Release() override { delete this; }; void Update(float frameTime) override; - virtual void ForceUpdate(float elapsed) { Update(elapsed); } + void ForceUpdate(float elapsed) override { Update(elapsed); } //void RegisterViewClass(const char *name, IView *(*func)()); - bool AddListener(IViewSystemListener* pListener) + bool AddListener(IViewSystemListener* pListener) override { return stl::push_back_unique(m_listeners, pListener); } - bool RemoveListener(IViewSystemListener* pListener) + bool RemoveListener(IViewSystemListener* pListener) override { return stl::find_and_erase(m_listeners, pListener); } diff --git a/Code/Legacy/CrySystem/XConsole.h b/Code/Legacy/CrySystem/XConsole.h index 200ddd85b3..a10adda97b 100644 --- a/Code/Legacy/CrySystem/XConsole.h +++ b/Code/Legacy/CrySystem/XConsole.h @@ -52,7 +52,7 @@ struct CConsoleCommand ////////////////////////////////////////////////////////////////////////// CConsoleCommand() - : m_func(0) + : m_func(nullptr) , m_nFlags(0) {} size_t sizeofThis () const {return sizeof(*this) + m_sName.capacity() + 1 + m_sCommand.capacity() + 1; } }; @@ -66,18 +66,18 @@ struct CConsoleCommandArgs CConsoleCommandArgs(AZStd::string& line, std::vector& args) : m_line(line) , m_args(args) {}; - virtual int GetArgCount() const { return static_cast(m_args.size()); }; + int GetArgCount() const override { return static_cast(m_args.size()); }; // Get argument by index, nIndex must be in 0 <= nIndex < GetArgCount() - virtual const char* GetArg(int nIndex) const + const char* GetArg(int nIndex) const override { assert(nIndex >= 0 && nIndex < GetArgCount()); if (!(nIndex >= 0 && nIndex < GetArgCount())) { - return NULL; + return nullptr; } return m_args[nIndex].c_str(); } - virtual const char* GetCommandLine() const + const char* GetCommandLine() const override { return m_line.c_str(); } @@ -114,9 +114,9 @@ class CXConsole , public AzFramework::CommandRegistrationBus::Handler { public: - typedef std::deque ConsoleBuffer; - typedef ConsoleBuffer::iterator ConsoleBufferItor; - typedef ConsoleBuffer::reverse_iterator ConsoleBufferRItor; + using ConsoleBuffer = std::deque; + using ConsoleBufferItor = ConsoleBuffer::iterator; + using ConsoleBufferRItor = ConsoleBuffer::reverse_iterator; // constructor CXConsole(); @@ -216,12 +216,12 @@ public: ////////////////////////////////////////////////////////////////////////// void SetProcessingGroup(bool isGroup) { m_bIsProcessingGroup = isGroup; } - bool GetIsProcessingGroup(void) const { return m_bIsProcessingGroup; } + bool GetIsProcessingGroup() const { return m_bIsProcessingGroup; } protected: // ---------------------------------------------------------------------------------------- void DrawBuffer(int nScrollPos, const char* szEffect); - void RegisterVar(ICVar* pCVar, ConsoleVarFunc pChangeFunc = 0); + void RegisterVar(ICVar* pCVar, ConsoleVarFunc pChangeFunc = nullptr); bool ProcessInput(const AzFramework::InputChannel& inputChannel); void AddLine(const char* inputStr); @@ -272,7 +272,7 @@ private: // ---------------------------------------------------------- typedef std::map ConsoleVariablesMap; // key points into string stored in ICVar or in .exe/.dll typedef ConsoleVariablesMap::iterator ConsoleVariablesMapItor; - typedef std::vector > ConsoleVariablesVector; + using ConsoleVariablesVector = std::vector >; void LogChangeMessage(const char* name, const bool isConst, const bool isCheat, const bool isReadOnly, const bool isDeprecated, const char* oldValue, const char* newValue, const bool isProcessingGroup, const bool allowChange); @@ -308,9 +308,9 @@ private: // ---------------------------------------------------------- , silentMode(_silentMode) {} }; - typedef std::list TDeferredCommandList; + using TDeferredCommandList = std::list; - typedef std::list ConsoleVarSinks; + using ConsoleVarSinks = std::list; // -------------------------------------------------------------------------------- diff --git a/Code/Legacy/CrySystem/XConsoleVariable.h b/Code/Legacy/CrySystem/XConsoleVariable.h index cb8bdbb4ad..3ff71f9f39 100644 --- a/Code/Legacy/CrySystem/XConsoleVariable.h +++ b/Code/Legacy/CrySystem/XConsoleVariable.h @@ -26,19 +26,19 @@ public: // interface ICVar -------------------------------------------------------------------------------------- - virtual void ClearFlags(int flags); - virtual int GetFlags() const; - virtual int SetFlags(int flags); - virtual const char* GetName() const; - virtual const char* GetHelp(); - virtual void Release(); - virtual void ForceSet(const char* s); - virtual void SetOnChangeCallback(ConsoleVarFunc pChangeFunc); - virtual uint64 AddOnChangeFunctor(const AZStd::function& pChangeFunctor) override; - virtual ConsoleVarFunc GetOnChangeCallback() const; + void ClearFlags(int flags) override; + int GetFlags() const override; + int SetFlags(int flags) override; + const char* GetName() const override; + const char* GetHelp() override; + void Release() override; + void ForceSet(const char* s) override; + void SetOnChangeCallback(ConsoleVarFunc pChangeFunc) override; + uint64 AddOnChangeFunctor(const AZStd::function& pChangeFunctor) override; + ConsoleVarFunc GetOnChangeCallback() const override; - virtual bool ShouldReset() const { return (m_nFlags & VF_RESETTABLE) != 0; } - virtual void Reset() override + bool ShouldReset() const { return (m_nFlags & VF_RESETTABLE) != 0; } + void Reset() override { if (ShouldReset()) { @@ -48,19 +48,19 @@ public: virtual void ResetImpl() = 0; - virtual void SetLimits(float min, float max) override; - virtual void GetLimits(float& min, float& max) override; - virtual bool HasCustomLimits() override; + void SetLimits(float min, float max) override; + void GetLimits(float& min, float& max) override; + bool HasCustomLimits() override; - virtual int GetRealIVal() const { return GetIVal(); } - virtual bool IsConstCVar() const {return (m_nFlags & VF_CONST_CVAR) != 0; } - virtual void SetDataProbeString(const char* pDataProbeString) + int GetRealIVal() const override { return GetIVal(); } + bool IsConstCVar() const override {return (m_nFlags & VF_CONST_CVAR) != 0; } + void SetDataProbeString(const char* pDataProbeString) override { CRY_ASSERT(m_pDataProbeString == NULL); m_pDataProbeString = new char[ strlen(pDataProbeString) + 1 ]; azstrcpy(m_pDataProbeString, strlen(pDataProbeString) + 1, pDataProbeString); } - virtual const char* GetDataProbeString() const; + const char* GetDataProbeString() const override; protected: // ------------------------------------------------------------------------------------------ @@ -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,19 +169,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]; @@ -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 855ef8b348..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,104 +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). - 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); }; + using IXmlNode::setAttr; + 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: ////////////////////////////////////////////////////////////////////////// @@ -216,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/Legacy/CrySystem/XML/XmlUtils.cpp b/Code/Legacy/CrySystem/XML/XmlUtils.cpp index 0afa5e19db..111831ed41 100644 --- a/Code/Legacy/CrySystem/XML/XmlUtils.cpp +++ b/Code/Legacy/CrySystem/XML/XmlUtils.cpp @@ -85,10 +85,10 @@ class CXmlSerializer public: CXmlSerializer() : m_nRefCount(0) - , m_pReaderImpl(NULL) - , m_pReaderSer(NULL) - , m_pWriterSer(NULL) - , m_pWriterImpl(NULL) + , m_pReaderImpl(nullptr) + , m_pReaderSer(nullptr) + , m_pWriterSer(nullptr) + , m_pWriterImpl(nullptr) { } ~CXmlSerializer() @@ -104,8 +104,8 @@ public: } ////////////////////////////////////////////////////////////////////////// - virtual void AddRef() { ++m_nRefCount; } - virtual void Release() + void AddRef() override { ++m_nRefCount; } + void Release() override { if (--m_nRefCount <= 0) { @@ -113,14 +113,14 @@ public: } } - virtual ISerialize* GetWriter(XmlNodeRef& node) + ISerialize* GetWriter(XmlNodeRef& node) override { ClearAll(); m_pWriterImpl = new CSerializeXMLWriterImpl(node); m_pWriterSer = new CSimpleSerializeWithDefaults(*m_pWriterImpl); return m_pWriterSer; } - virtual ISerialize* GetReader(XmlNodeRef& node) + ISerialize* GetReader(XmlNodeRef& node) override { ClearAll(); m_pReaderImpl = new CSerializeXMLReaderImpl(node); @@ -165,7 +165,7 @@ public: return m_fileHandle != AZ::IO::InvalidHandle; } ; - virtual void Write(const void* pData, size_t size) + void Write(const void* pData, size_t size) override { if (m_fileHandle != AZ::IO::InvalidHandle) { @@ -184,12 +184,12 @@ public: CXmlTableReader(); ~CXmlTableReader() override; - virtual void Release(); + void Release() override; - virtual bool Begin(XmlNodeRef rootNode); - virtual int GetEstimatedRowCount(); - virtual bool ReadRow(int& rowIndex); - virtual bool ReadCell(int& columnIndex, const char*& pContent, size_t& contentSize); + bool Begin(XmlNodeRef rootNode) override; + int GetEstimatedRowCount() override; + bool ReadRow(int& rowIndex) override; + bool ReadCell(int& columnIndex, const char*& pContent, size_t& contentSize) override; private: bool m_bExcel; @@ -228,7 +228,7 @@ void CXmlTableReader::Release() ////////////////////////////////////////////////////////////////////////// bool CXmlTableReader::Begin(XmlNodeRef rootNode) { - m_tableNode = 0; + m_tableNode = nullptr; if (!rootNode) { @@ -247,11 +247,11 @@ bool CXmlTableReader::Begin(XmlNodeRef rootNode) m_tableNode = rootNode->findChild("Table"); } - m_rowNode = 0; + m_rowNode = nullptr; m_rowNodeIndex = -1; m_row = -1; - return (m_tableNode != 0); + return (m_tableNode != nullptr); } ////////////////////////////////////////////////////////////////////////// @@ -296,7 +296,7 @@ bool CXmlTableReader::ReadRow(int& rowIndex) if (!m_rowNode->isTag("Row")) { - m_rowNode = 0; + m_rowNode = nullptr; continue; } @@ -309,7 +309,7 @@ bool CXmlTableReader::ReadRow(int& rowIndex) if (index < m_row) { m_rowNodeIndex = rowNodeCount; - m_rowNode = 0; + m_rowNode = nullptr; return false; } m_row = index; @@ -351,7 +351,7 @@ bool CXmlTableReader::ReadRow(int& rowIndex) ////////////////////////////////////////////////////////////////////////// bool CXmlTableReader::ReadCell(int& columnIndex, const char*& pContent, size_t& contentSize) { - pContent = 0; + pContent = nullptr; contentSize = 0; if (!m_tableNode) diff --git a/Code/Legacy/CrySystem/XML/xml.h b/Code/Legacy/CrySystem/XML/xml.h index f4bf6b2969..0605142b9f 100644 --- a/Code/Legacy/CrySystem/XML/xml.h +++ b/Code/Legacy/CrySystem/XML/xml.h @@ -203,6 +203,7 @@ public: bool saveToFile(const char* fileName, size_t chunkSizeBytes, AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle); // save in small memory chunks //! Set new XML Node attribute (or override attribute with same key). + using IXmlNode::setAttr; void setAttr(const char* key, const char* value); void setAttr(const char* key, int value); void setAttr(const char* key, unsigned int value); diff --git a/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSLogSystemInterface.h b/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSLogSystemInterface.h index 85d780bf3d..4982d3efbd 100644 --- a/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSLogSystemInterface.h +++ b/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSLogSystemInterface.h @@ -57,14 +57,26 @@ namespace AWSNativeSDKInit /** * Does a printf style output to the output stream. Don't use this, it's unsafe. See LogStream */ +#if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) + void Log(Aws::Utils::Logging::LogLevel logLevel, const char* tag, const char* formatStr, ...) override; +#else void Log(Aws::Utils::Logging::LogLevel logLevel, const char* tag, const char* formatStr, ...); +#endif /** * Writes the stream to the output stream. */ - void LogStream(Aws::Utils::Logging::LogLevel logLevel, const char* tag, const Aws::OStringStream &messageStream); +#if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) + void LogStream(Aws::Utils::Logging::LogLevel logLevel, const char* tag, const Aws::OStringStream &messageStream) override; +#else + void LogStream(Aws::Utils::Logging::LogLevel logLevel, const char* tag, const Aws::OStringStream& messageStream); +#endif +#if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) + void Flush() override; +#else void Flush(); +#endif private: bool ShouldLog(Aws::Utils::Logging::LogLevel logLevel); diff --git a/Code/Tools/AssetProcessor/AssetBuilder/TraceMessageHook.h b/Code/Tools/AssetProcessor/AssetBuilder/TraceMessageHook.h index 7774816cb2..dcb186b81a 100644 --- a/Code/Tools/AssetProcessor/AssetBuilder/TraceMessageHook.h +++ b/Code/Tools/AssetProcessor/AssetBuilder/TraceMessageHook.h @@ -26,8 +26,8 @@ namespace AssetBuilder void EnableDebugMode(bool enable); bool OnAssert(const char* message) override; - bool OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message); - bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message); + bool OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) override; + bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override; bool OnException(const char* message) override; bool OnPrintf(const char* window, const char* message) override; bool OnOutput(const char* window, const char* message) override; diff --git a/Code/Tools/AssetProcessor/native/AssetManager/AssetCatalog.h b/Code/Tools/AssetProcessor/native/AssetManager/AssetCatalog.h index 6d25b654c5..84e96bcf3e 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/AssetCatalog.h +++ b/Code/Tools/AssetProcessor/native/AssetManager/AssetCatalog.h @@ -122,8 +122,8 @@ namespace AssetProcessor ////////////////////////////////////////////////////////////////////////// // AzToolsFramework::ToolsAssetSystemBus::Handler - void RegisterSourceAssetType(const AZ::Data::AssetType& assetType, const char* assetFileFilter); - void UnregisterSourceAssetType(const AZ::Data::AssetType& assetType); + void RegisterSourceAssetType(const AZ::Data::AssetType& assetType, const char* assetFileFilter) override; + void UnregisterSourceAssetType(const AZ::Data::AssetType& assetType) override; ////////////////////////////////////////////////////////////////////////// //! given some absolute path, please respond with its relative product path. For now, this will be a @@ -163,9 +163,9 @@ namespace AssetProcessor AZ::Outcome, AZStd::string> GetAllProductDependenciesFilter( const AZ::Data::AssetId& id, const AZStd::unordered_set& exclusionList, - const AZStd::vector& wildcardPatternExclusionList); + const AZStd::vector& wildcardPatternExclusionList) override; - bool DoesAssetIdMatchWildcardPattern(const AZ::Data::AssetId& assetId, const AZStd::string& wildcardPattern); + bool DoesAssetIdMatchWildcardPattern(const AZ::Data::AssetId& assetId, const AZStd::string& wildcardPattern) override; void AddAssetDependencies( const AZ::Data::AssetId& searchAssetId, diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/rcjoblistmodel.h b/Code/Tools/AssetProcessor/native/resourcecompiler/rcjoblistmodel.h index 97a59c90ea..5c055087a8 100644 --- a/Code/Tools/AssetProcessor/native/resourcecompiler/rcjoblistmodel.h +++ b/Code/Tools/AssetProcessor/native/resourcecompiler/rcjoblistmodel.h @@ -67,7 +67,7 @@ namespace AssetProcessor int columnCount(const QModelIndex& parent = QModelIndex()) const override; int rowCount(const QModelIndex& parent = QModelIndex()) const override; QVariant headerData(int section, Qt::Orientation orientation, int role) const override; - QVariant data(const QModelIndex& index, int role) const; + QVariant data(const QModelIndex& index, int role) const override; void markAsProcessing(RCJob* rcJob); void markAsStarted(RCJob* rcJob); diff --git a/Code/Tools/AssetProcessor/native/tests/assetBuilderSDK/SerializationDependenciesTests.cpp b/Code/Tools/AssetProcessor/native/tests/assetBuilderSDK/SerializationDependenciesTests.cpp index cb7b1b5c4d..86c363075d 100644 --- a/Code/Tools/AssetProcessor/native/tests/assetBuilderSDK/SerializationDependenciesTests.cpp +++ b/Code/Tools/AssetProcessor/native/tests/assetBuilderSDK/SerializationDependenciesTests.cpp @@ -95,7 +95,7 @@ namespace SerializationDependencyTests // Use an arbitrary ID for the asset type. return AZ::Data::AssetType("{03FD33E2-DA2F-4021-A266-0DC9714FF84D}"); } - virtual const char* GetFileFilter() const + const char* GetFileFilter() const override { return nullptr; } diff --git a/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCBuilderTest.h b/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCBuilderTest.h index 32230be23a..5a6efb2622 100644 --- a/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCBuilderTest.h +++ b/Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCBuilderTest.h @@ -81,6 +81,8 @@ public: struct MockRecognizerConfiguration : public RecognizerConfiguration { + virtual ~MockRecognizerConfiguration() = default; + const RecognizerContainer& GetAssetRecognizerContainer() const override { return m_recognizerContainer; diff --git a/Code/Tools/AssetProcessor/native/unittests/AssetRequestHandlerUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/AssetRequestHandlerUnitTests.cpp index 010d1cc069..8b0ee56c32 100644 --- a/Code/Tools/AssetProcessor/native/unittests/AssetRequestHandlerUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/AssetRequestHandlerUnitTests.cpp @@ -49,13 +49,13 @@ namespace bool m_deleteFenceFileResult = false; protected: - virtual QString CreateFenceFile(unsigned int fenceId) + QString CreateFenceFile(unsigned int fenceId) override { m_numTimesCreateFenceFileCalled++; m_fenceId = fenceId; return m_fenceFileName; } - virtual bool DeleteFenceFile(QString fenceFileName) + bool DeleteFenceFile(QString fenceFileName) override { m_numTimesDeleteFenceFileCalled++; return m_deleteFenceFileResult; diff --git a/Code/Tools/AssetProcessor/native/unittests/MockApplicationManager.cpp b/Code/Tools/AssetProcessor/native/unittests/MockApplicationManager.cpp index bd03e3b225..696ecc710a 100644 --- a/Code/Tools/AssetProcessor/native/unittests/MockApplicationManager.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/MockApplicationManager.cpp @@ -22,6 +22,8 @@ namespace AssetProcessor struct MockRecognizerConfiguration : public RecognizerConfiguration { + virtual ~MockRecognizerConfiguration() = default; + const RecognizerContainer& GetAssetRecognizerContainer() const override { return m_container; diff --git a/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp index bbeafda342..9f2d855811 100644 --- a/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/UtilitiesUnitTests.cpp @@ -543,7 +543,7 @@ public: Q_EMIT UnitTestPassed(); } - bool OnPreAssert(const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) + bool OnPreAssert(const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) override { m_assertTriggered = true; return true; diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h index 7e6347b4d1..886880df3a 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h @@ -114,7 +114,7 @@ public: void Rescan(); - bool IsAssetProcessorManagerIdle() const; + bool IsAssetProcessorManagerIdle() const override; bool CheckFullIdle(); Q_SIGNALS: void CheckAssetProcessorManagerIdleState(); diff --git a/Code/Tools/AssetProcessor/native/utilities/AssetServerHandler.h b/Code/Tools/AssetProcessor/native/utilities/AssetServerHandler.h index 840c3e6f5b..04f00e6dff 100644 --- a/Code/Tools/AssetProcessor/native/utilities/AssetServerHandler.h +++ b/Code/Tools/AssetProcessor/native/utilities/AssetServerHandler.h @@ -22,7 +22,7 @@ namespace AssetProcessor virtual ~AssetServerHandler(); ////////////////////////////////////////////////////////////////////////// // AssetServerBus::Handler overrides - bool IsServerAddressValid(); + bool IsServerAddressValid() override; //! StoreJobResult will store all the files in the the temp folder provided by AP to a zip file on the network drive //! whose file name will be based on the server key bool StoreJobResult(const AssetProcessor::BuilderParams& builderParams, AZStd::vector& sourceFileList) override; diff --git a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp index a1bc508899..52df8e901d 100644 --- a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp @@ -84,6 +84,8 @@ namespace AssetProcessor return !m_platformIdentifierStack.empty() ? AZ::SettingsRegistryInterface::VisitResponse::Continue : AZ::SettingsRegistryInterface::VisitResponse::Skip; } + + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit([[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override { if (m_platformIdentifierStack.empty()) @@ -114,6 +116,7 @@ namespace AssetProcessor struct MetaDataTypesVisitor : AZ::SettingsRegistryInterface::Visitor { + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit([[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override { m_metaDataTypes.push_back({ AZ::IO::PathView(valueName, AZ::IO::PosixPathSeparator).LexicallyNormal().String(), value }); diff --git a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h index 2c3615c4fc..2c04ca1fad 100644 --- a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h +++ b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h @@ -49,6 +49,7 @@ namespace AssetProcessor { } + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override; AZ::SettingsRegistryInterface* m_settingsRegistry; @@ -129,6 +130,8 @@ namespace AssetProcessor { AZ::SettingsRegistryInterface::VisitResponse Traverse(AZStd::string_view jsonPath, AZStd::string_view valueName, AZ::SettingsRegistryInterface::VisitAction action, AZ::SettingsRegistryInterface::Type) override; + + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZ::s64 value) override; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override; @@ -152,6 +155,8 @@ namespace AssetProcessor { AZ::SettingsRegistryInterface::VisitResponse Traverse(AZStd::string_view jsonPath, AZStd::string_view valueName, AZ::SettingsRegistryInterface::VisitAction action, AZ::SettingsRegistryInterface::Type) override; + + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override; AZStd::vector m_excludeAssetRecognizers; @@ -169,6 +174,8 @@ namespace AssetProcessor } AZ::SettingsRegistryInterface::VisitResponse Traverse(AZStd::string_view jsonPath, AZStd::string_view valueName, AZ::SettingsRegistryInterface::VisitAction action, AZ::SettingsRegistryInterface::Type) override; + + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, bool value) override; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZ::s64 value) override; void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override; diff --git a/Code/Tools/DeltaCataloger/Tests/tests_main.cpp b/Code/Tools/DeltaCataloger/Tests/tests_main.cpp index 34dd6dbddb..1a3b86d34b 100644 --- a/Code/Tools/DeltaCataloger/Tests/tests_main.cpp +++ b/Code/Tools/DeltaCataloger/Tests/tests_main.cpp @@ -84,7 +84,7 @@ protected: } - bool OnPreError([[maybe_unused]] const char* window, [[maybe_unused]] const char* fileName, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* message) + bool OnPreError([[maybe_unused]] const char* window, [[maybe_unused]] const char* fileName, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* message) override { return true; } 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/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneGraphTests.cpp b/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneGraphTests.cpp index 87e2cbdbde..f51304c000 100644 --- a/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneGraphTests.cpp +++ b/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneGraphTests.cpp @@ -108,7 +108,7 @@ namespace AZ BusDisconnect(); } - bool OnPreAssert(const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) + bool OnPreAssert(const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) override { m_assertTriggered = true; return true; diff --git a/Code/Tools/SceneAPI/SceneData/Groups/AnimationGroup.h b/Code/Tools/SceneAPI/SceneData/Groups/AnimationGroup.h index c26dc7563e..f5d9239865 100644 --- a/Code/Tools/SceneAPI/SceneData/Groups/AnimationGroup.h +++ b/Code/Tools/SceneAPI/SceneData/Groups/AnimationGroup.h @@ -38,7 +38,7 @@ namespace AZ void OverrideId(const Uuid& id); Containers::RuleContainer& GetRuleContainer() override; - const Containers::RuleContainer& GetRuleContainerConst() const; + const Containers::RuleContainer& GetRuleContainerConst() const override; const AZStd::string& GetSelectedRootBone() const override; uint32_t GetStartFrame() const override; diff --git a/Code/Tools/SceneAPI/SceneData/Groups/SkeletonGroup.h b/Code/Tools/SceneAPI/SceneData/Groups/SkeletonGroup.h index 7c6ed2dc57..3318f89b8d 100644 --- a/Code/Tools/SceneAPI/SceneData/Groups/SkeletonGroup.h +++ b/Code/Tools/SceneAPI/SceneData/Groups/SkeletonGroup.h @@ -39,8 +39,8 @@ namespace AZ const Uuid& GetId() const override; void OverrideId(const Uuid& id); - Containers::RuleContainer& GetRuleContainer(); - const Containers::RuleContainer& GetRuleContainerConst() const; + Containers::RuleContainer& GetRuleContainer() override; + const Containers::RuleContainer& GetRuleContainerConst() const override; const AZStd::string& GetSelectedRootBone() const override; void SetSelectedRootBone(const AZStd::string& selectedRootBone) override; diff --git a/Code/Tools/SceneAPI/SceneData/Groups/SkinGroup.h b/Code/Tools/SceneAPI/SceneData/Groups/SkinGroup.h index 6708654463..010091e3eb 100644 --- a/Code/Tools/SceneAPI/SceneData/Groups/SkinGroup.h +++ b/Code/Tools/SceneAPI/SceneData/Groups/SkinGroup.h @@ -46,8 +46,8 @@ namespace AZ const Uuid& GetId() const override; void OverrideId(const Uuid& id); - Containers::RuleContainer& GetRuleContainer(); - const Containers::RuleContainer& GetRuleContainerConst() const; + Containers::RuleContainer& GetRuleContainer() override; + const Containers::RuleContainer& GetRuleContainerConst() const override; DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList() override; const DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList() const override; diff --git a/Code/Tools/SceneAPI/SceneUI/RowWidgets/ManifestNameHandler.h b/Code/Tools/SceneAPI/SceneUI/RowWidgets/ManifestNameHandler.h index 8c73b5fe17..fbfd553caa 100644 --- a/Code/Tools/SceneAPI/SceneUI/RowWidgets/ManifestNameHandler.h +++ b/Code/Tools/SceneAPI/SceneUI/RowWidgets/ManifestNameHandler.h @@ -34,7 +34,7 @@ namespace AZ QWidget* CreateGUI(QWidget* parent) override; u32 GetHandlerName() const override; - bool AutoDelete() const; + bool AutoDelete() const override; void ConsumeAttribute(ManifestNameWidget* widget, u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override; diff --git a/Code/Tools/SceneAPI/SceneUI/RowWidgets/NodeListSelectionHandler.h b/Code/Tools/SceneAPI/SceneUI/RowWidgets/NodeListSelectionHandler.h index 3b8f028be8..8717e23ac4 100644 --- a/Code/Tools/SceneAPI/SceneUI/RowWidgets/NodeListSelectionHandler.h +++ b/Code/Tools/SceneAPI/SceneUI/RowWidgets/NodeListSelectionHandler.h @@ -57,7 +57,7 @@ namespace AZ QWidget* CreateGUI(QWidget* parent) override; u32 GetHandlerName() const override; - bool AutoDelete() const; + bool AutoDelete() const override; void ConsumeAttribute(NodeListSelectionWidget* widget, u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override; diff --git a/Code/Tools/SceneAPI/SceneUI/RowWidgets/TransformRowHandler.h b/Code/Tools/SceneAPI/SceneUI/RowWidgets/TransformRowHandler.h index 664fea9f85..0fd9aede88 100644 --- a/Code/Tools/SceneAPI/SceneUI/RowWidgets/TransformRowHandler.h +++ b/Code/Tools/SceneAPI/SceneUI/RowWidgets/TransformRowHandler.h @@ -33,7 +33,7 @@ namespace AZ QWidget* CreateGUI(QWidget* parent) override; u32 GetHandlerName() const override; - bool AutoDelete() const; + bool AutoDelete() const override; bool IsDefaultHandler() const override; diff --git a/Code/Tools/SerializeContextTools/Converter.cpp b/Code/Tools/SerializeContextTools/Converter.cpp index eff5f140d5..6a8bebdbfc 100644 --- a/Code/Tools/SerializeContextTools/Converter.cpp +++ b/Code/Tools/SerializeContextTools/Converter.cpp @@ -494,6 +494,7 @@ namespace AZ return AZ::SettingsRegistryInterface::VisitResponse::Continue; } + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view, [[maybe_unused]] AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override { if (m_processingSourcePathKey) @@ -656,6 +657,7 @@ namespace AZ return AZ::SettingsRegistryInterface::VisitResponse::Continue; } + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view valueName, [[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override { diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.h b/Code/Tools/Standalone/Source/LUA/LUAEditorContext.h index fc0e78089d..f844eaf395 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.h +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorContext.h @@ -84,22 +84,22 @@ namespace LUAEditor ////////////////////////////////////////////////////////////////////////// // AZ::Component - virtual void Init(); - virtual void Activate(); - virtual void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; ////////////////////////////////////////////////////////////////////////// static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); ////////////////////////////////////////////////////////////////////////// // EditorFramework::CoreMessageBus::Handler - virtual void RunAsAnotherInstance(); + void RunAsAnotherInstance() override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // AzToolsFramework::AssetSystemInfoBus::Handler - virtual void AssetCompilationSuccess(const AZStd::string& assetPath) override; - virtual void AssetCompilationFailed(const AZStd::string& assetPath) override; + void AssetCompilationSuccess(const AZStd::string& assetPath) override; + void AssetCompilationFailed(const AZStd::string& assetPath) override; ////////////////////////////////////////////////////////////////////////// @@ -111,110 +111,110 @@ namespace LUAEditor ////////////////////////////////////////////////////////////////////////// // ContextInterface Messages // it is an error to call GetDocumentData when the data is not yet ready. - virtual void ShowLUAEditorView(); + void ShowLUAEditorView() override; // this occurs from time to time, generally triggered when some external event occurs // that makes it suspect that its document statuses might be invalid: ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //Context_DocumentManagement Messages - virtual void OnNewDocument(const AZStd::string& assetId); - virtual void OnLoadDocument(const AZStd::string& assetId, bool errorOnNotFound); - virtual void OnCloseDocument(const AZStd::string& assetId); - virtual void OnSaveDocument(const AZStd::string& assetId, bool bCloseAfterSaved, bool bSaveAs); - virtual bool OnSaveDocumentAs(const AZStd::string& assetId, bool bCloseAfterSaved); - virtual void NotifyDocumentModified(const AZStd::string& assetId, bool modified); - virtual void DocumentCheckOutRequested(const AZStd::string& assetId); - virtual void RefreshAllDocumentPerforceStat(); - virtual void OnReloadDocument(const AZStd::string assetId); + void OnNewDocument(const AZStd::string& assetId) override; + void OnLoadDocument(const AZStd::string& assetId, bool errorOnNotFound) override; + void OnCloseDocument(const AZStd::string& assetId) override; + void OnSaveDocument(const AZStd::string& assetId, bool bCloseAfterSaved, bool bSaveAs) override; + bool OnSaveDocumentAs(const AZStd::string& assetId, bool bCloseAfterSaved) override; + void NotifyDocumentModified(const AZStd::string& assetId, bool modified) override; + void DocumentCheckOutRequested(const AZStd::string& assetId) override; + void RefreshAllDocumentPerforceStat() override; + void OnReloadDocument(const AZStd::string assetId) override; - virtual void UpdateDocumentData(const AZStd::string& assetId, const char* dataPtr, const AZStd::size_t dataLength); - virtual void GetDocumentData(const AZStd::string& assetId, const char** dataPtr, AZStd::size_t& dataLength); + void UpdateDocumentData(const AZStd::string& assetId, const char* dataPtr, const AZStd::size_t dataLength) override; + void GetDocumentData(const AZStd::string& assetId, const char** dataPtr, AZStd::size_t& dataLength) override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Target Manager ////////////////////////////////////////////////////////////////////////// - virtual void DesiredTargetConnected(bool connected); - virtual void DesiredTargetChanged(AZ::u32 newTargetID, AZ::u32 oldTargetID); + void DesiredTargetConnected(bool connected) override; + void DesiredTargetChanged(AZ::u32 newTargetID, AZ::u32 oldTargetID) override; ////////////////////////////////////////////////////////////////////////// //Context_DebuggerManagement Messages ////////////////////////////////////////////////////////////////////////// - void ExecuteScriptBlob(const AZStd::string& fromAssetId, bool executeLocal); - virtual void SynchronizeBreakpoints(); - virtual void CreateBreakpoint(const AZStd::string& fromAssetId, int lineNumber); - virtual void MoveBreakpoint(const AZ::Uuid& breakpointUID, int lineNumber); - virtual void DeleteBreakpoint(const AZ::Uuid& breakpointUID); - virtual void CleanUpBreakpoints(); + void ExecuteScriptBlob(const AZStd::string& fromAssetId, bool executeLocal) override; + void SynchronizeBreakpoints() override; + void CreateBreakpoint(const AZStd::string& fromAssetId, int lineNumber) override; + void MoveBreakpoint(const AZ::Uuid& breakpointUID, int lineNumber) override; + void DeleteBreakpoint(const AZ::Uuid& breakpointUID) override; + void CleanUpBreakpoints() override; // These come from the VM - virtual void OnDebuggerAttached(); - virtual void OnDebuggerRefused(); - virtual void OnDebuggerDetached(); - virtual void OnBreakpointHit(const AZStd::string& assetIdString, int lineNumber); - virtual void OnBreakpointAdded(const AZStd::string& assetIdString, int lineNumber); - virtual void OnBreakpointRemoved(const AZStd::string& assetIdString, int lineNumber); - virtual void OnReceivedAvailableContexts(const AZStd::vector& contexts); - virtual void OnReceivedRegisteredClasses(const AzFramework::ScriptUserClassList& classes); - virtual void OnReceivedRegisteredEBuses(const AzFramework::ScriptUserEBusList& ebuses); - virtual void OnReceivedRegisteredGlobals(const AzFramework::ScriptUserMethodList& methods, const AzFramework::ScriptUserPropertyList& properties); - virtual void OnReceivedLocalVariables(const AZStd::vector& vars); - virtual void OnReceivedCallstack(const AZStd::vector& callstack); - virtual void OnReceivedValueState(const AZ::ScriptContextDebug::DebugValue& value); - virtual void OnSetValueResult(const AZStd::string& name, bool success); - virtual void OnExecutionResumed(); - virtual void OnExecuteScriptResult(bool success); + void OnDebuggerAttached() override; + void OnDebuggerRefused() override; + void OnDebuggerDetached() override; + void OnBreakpointHit(const AZStd::string& assetIdString, int lineNumber) override; + void OnBreakpointAdded(const AZStd::string& assetIdString, int lineNumber) override; + void OnBreakpointRemoved(const AZStd::string& assetIdString, int lineNumber) override; + void OnReceivedAvailableContexts(const AZStd::vector& contexts) override; + void OnReceivedRegisteredClasses(const AzFramework::ScriptUserClassList& classes) override; + void OnReceivedRegisteredEBuses(const AzFramework::ScriptUserEBusList& ebuses) override; + void OnReceivedRegisteredGlobals(const AzFramework::ScriptUserMethodList& methods, const AzFramework::ScriptUserPropertyList& properties) override; + void OnReceivedLocalVariables(const AZStd::vector& vars) override; + void OnReceivedCallstack(const AZStd::vector& callstack) override; + void OnReceivedValueState(const AZ::ScriptContextDebug::DebugValue& value) override; + void OnSetValueResult(const AZStd::string& name, bool success) override; + void OnExecutionResumed() override; + void OnExecuteScriptResult(bool success) override; ////////////////////////////////////////////////////////////////////////// //BreakpointTracker Messages ////////////////////////////////////////////////////////////////////////// - virtual const BreakpointMap* RequestBreakpoints(); - virtual void RequestEditorFocus(const AZStd::string& assetIdString, int lineNumber); - virtual void RequestDeleteBreakpoint(const AZStd::string& assetIdString, int lineNumber); + const BreakpointMap* RequestBreakpoints() override; + void RequestEditorFocus(const AZStd::string& assetIdString, int lineNumber) override; + void RequestDeleteBreakpoint(const AZStd::string& assetIdString, int lineNumber) override; ////////////////////////////////////////////////////////////////////////// //StackTracker Messages ////////////////////////////////////////////////////////////////////////// - virtual void RequestStackClicked(const AZStd::string& stackString, int lineNumber); + void RequestStackClicked(const AZStd::string& stackString, int lineNumber) override; ////////////////////////////////////////////////////////////////////////// //TargetContextTracker Messages ////////////////////////////////////////////////////////////////////////// - virtual const AZStd::vector RequestTargetContexts(); - virtual const AZStd::string RequestCurrentTargetContext(); - virtual void SetCurrentTargetContext(AZStd::string& contextName); + virtual const AZStd::vector RequestTargetContexts() override; + const AZStd::string RequestCurrentTargetContext() override; + void SetCurrentTargetContext(AZStd::string& contextName) override; ////////////////////////////////////////////////////////////////////////// //Watch window messages ////////////////////////////////////////////////////////////////////////// - virtual void RequestWatchedVariable(const AZStd::string& varName); + void RequestWatchedVariable(const AZStd::string& varName) override; ////////////////////////////////////////////////////////////////////////// //Debug Request messages ////////////////////////////////////////////////////////////////////////// - virtual void RequestDetachDebugger(); - virtual void RequestAttachDebugger(); + void RequestDetachDebugger() override; + void RequestAttachDebugger() override; ////////////////////////////////////////////////////////////////////////// // AzToolsFramework CoreMessages - virtual void OnRestoreState(); // sent when everything is registered up and ready to go, this is what bootstraps stuff to get going. - virtual bool OnGetPermissionToShutDown(); - virtual bool CheckOkayToShutDown(); - virtual void OnSaveState(); // sent to everything when the app is about to shut down - do what you need to do. - virtual void OnDestroyState(); - virtual void ApplicationDeactivated(); - virtual void ApplicationActivated(); - virtual void ApplicationShow(AZ::Uuid id); - virtual void ApplicationHide(AZ::Uuid id); - virtual void ApplicationCensus(); + void OnRestoreState() override; // sent when everything is registered up and ready to go, this is what bootstraps stuff to get going. + bool OnGetPermissionToShutDown() override; + bool CheckOkayToShutDown() override; + void OnSaveState() override; // sent to everything when the app is about to shut down - do what you need to do. + void OnDestroyState() override; + void ApplicationDeactivated() override; + void ApplicationActivated() override; + void ApplicationShow(AZ::Uuid id) override; + void ApplicationHide(AZ::Uuid id) override; + void ApplicationCensus() override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // HighlightedWords - virtual const HighlightedWords::LUAKeywordsType* GetLUAKeywords() { return &m_LUAKeywords; } - virtual const HighlightedWords::LUAKeywordsType* GetLUALibraryFunctions() { return &m_LUALibraryFunctions; } + const HighlightedWords::LUAKeywordsType* GetLUAKeywords() override { return &m_LUAKeywords; } + const HighlightedWords::LUAKeywordsType* GetLUALibraryFunctions() override { return &m_LUALibraryFunctions; } // internal data structure for the LUA debugger class/member/property reference panel // this is what we serialize and work with diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.hxx b/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.hxx index c01893909b..1b23504fed 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.hxx +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.hxx @@ -86,14 +86,14 @@ namespace LUAEditor public: AZ_CLASS_ALLOCATOR(LUAEditorMainWindow,AZ::SystemAllocator,0); LUAEditorMainWindow(QStandardItemModel* dataModel, bool connectedState, QWidget* parent = NULL, Qt::WindowFlags flags = Qt::WindowFlags()); - virtual ~LUAEditorMainWindow(void); + virtual ~LUAEditorMainWindow(); bool OnGetPermissionToShutDown(); ////////////////////////////////////////////////////////////////////////// // Qt Events private: - virtual void closeEvent(QCloseEvent* event); + void closeEvent(QCloseEvent* event) override; Ui::LUAEditorMainWindow* m_gui; AzToolsFramework::TargetSelectorButtonAction* m_pTargetButton; @@ -204,7 +204,7 @@ namespace LUAEditor AZStd::string m_lastOpenFilePath; AZStd::vector m_dProcessFindListClicked; - void OnDataLoadedAndSet(const DocumentInfo& info, LUAViewWidget* pLUAViewWidget); + void OnDataLoadedAndSet(const DocumentInfo& info, LUAViewWidget* pLUAViewWidget) override; AzToolsFramework::AssetBrowser::AssetBrowserFilterModel* m_filterModel; QSharedPointer CreateFilter(); @@ -243,18 +243,18 @@ namespace LUAEditor // LUAEditorMainWindow Messages. public: virtual void OnCloseView(const AZStd::string& assetId); - virtual void OnFocusInEvent(const AZStd::string& assetId); - virtual void OnFocusOutEvent(const AZStd::string& assetId); - virtual void OnRequestCheckOut(const AZStd::string& assetId); - virtual void OnConnectedToTarget(); - virtual void OnDisconnectedFromTarget(); - virtual void OnConnectedToDebugger(); - virtual void OnDisconnectedFromDebugger(); + void OnFocusInEvent(const AZStd::string& assetId) override; + void OnFocusOutEvent(const AZStd::string& assetId) override; + void OnRequestCheckOut(const AZStd::string& assetId) override; + void OnConnectedToTarget() override; + void OnDisconnectedFromTarget() override; + void OnConnectedToDebugger() override; + void OnDisconnectedFromDebugger() override; void Repaint() override; ////////////////////////////////////////////////////////////////////////// - virtual void dragEnterEvent(QDragEnterEvent *pEvent); - virtual void dropEvent(QDropEvent *pEvent); + void dragEnterEvent(QDragEnterEvent *pEvent) override; + void dropEvent(QDropEvent *pEvent) override; void IgnoreFocusEvents(bool ignore) { m_bIgnoreFocusRequests = ignore; } @@ -327,7 +327,7 @@ namespace LUAEditor // support for windows-ish Ctrl+Tab cycling through documents via the above Tab actions typedef AZStd::list TrackedLUACtrlTabOrder; TrackedLUACtrlTabOrder m_CtrlTabOrder; - bool eventFilter(QObject *obj, QEvent *event); + bool eventFilter(QObject *obj, QEvent *event) override; AZStd::string m_StoredTabAssetId; bool m_bIgnoreFocusRequests; @@ -338,10 +338,10 @@ namespace LUAEditor ////////////////////////////////////////////////////////////////////////// //Debugger Messages, from the LUAEditor::LUABreakpointTrackerMessages::Bus - virtual void BreakpointsUpdate(const LUAEditor::BreakpointMap& uniqueBreakpoints); - virtual void BreakpointHit(const LUAEditor::Breakpoint& breakpoint); - virtual void BreakpointResume(); - virtual void OnExecuteScriptResult(bool success); + void BreakpointsUpdate(const LUAEditor::BreakpointMap& uniqueBreakpoints) override; + void BreakpointHit(const LUAEditor::Breakpoint& breakpoint) override; + void BreakpointResume() override; + void OnExecuteScriptResult(bool success) override; ////////////////////////////////////////////////////////////////////////// // track activity and synchronize the appropriate widgets' states to match @@ -433,7 +433,7 @@ namespace LUAEditor bool m_bAutoReloadUnmodifiedFiles = false; LUAEditorMainWindowSavedState() {} - void Init(const QByteArray& windowState,const QByteArray& windowGeom) + void Init(const QByteArray& windowState,const QByteArray& windowGeom) override { AzToolsFramework::MainWindowSavedState::Init(windowState, windowGeom); } diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorView.hxx b/Code/Tools/Standalone/Source/LUA/LUAEditorView.hxx index 70e4ba625f..ada99929aa 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorView.hxx +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorView.hxx @@ -73,7 +73,7 @@ namespace LUAEditor LUADockWidget* luaDockWidget(){ return m_pLUADockWidget;} void SetLuaDockWidget(LUADockWidget* pLUADockWidget){m_pLUADockWidget = pLUADockWidget;} - virtual void dropEvent(QDropEvent *e); + void dropEvent(QDropEvent *e) override; // point a little arrow at this line. -1 means remove it. void UpdateCurrentExecutingLine(int lineNumber); @@ -83,9 +83,9 @@ namespace LUAEditor ////////////////////////////////////////////////////////////////////////// //Debugger Messages, from the LUAEditor::LUABreakpointTrackerMessages::Bus - virtual void BreakpointsUpdate(const LUAEditor::BreakpointMap& uniqueBreakpoints); - virtual void BreakpointHit(const LUAEditor::Breakpoint& breakpoint); - virtual void BreakpointResume(); + void BreakpointsUpdate(const LUAEditor::BreakpointMap& uniqueBreakpoints) override; + void BreakpointHit(const LUAEditor::Breakpoint& breakpoint) override; + void BreakpointResume() override; void BreakpointToggle(int line); @@ -153,7 +153,7 @@ namespace LUAEditor void RegainFocus(); private: - virtual void keyPressEvent(QKeyEvent *ev); + void keyPressEvent(QKeyEvent *ev) override; int CalcDocPosition(int line, int column); template //callabe must take a const QTextCursor& as a parameter void UpdateCursor(Callable callable); diff --git a/Code/Tools/Standalone/Source/StandaloneToolsApplication.h b/Code/Tools/Standalone/Source/StandaloneToolsApplication.h index 82028d7b9f..4ca45b8669 100644 --- a/Code/Tools/Standalone/Source/StandaloneToolsApplication.h +++ b/Code/Tools/Standalone/Source/StandaloneToolsApplication.h @@ -42,7 +42,7 @@ namespace StandaloneTools bool LaunchDiscoveryService(); // AZ::UserSettingsFileLocatorBus::Handler - AZStd::string ResolveFilePath(AZ::u32 /*providerId*/); + AZStd::string ResolveFilePath(AZ::u32 /*providerId*/) override; ////////////////////////////////////////////////////////////////////////// }; } diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.h b/Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.h index a715466cdb..f924908ea2 100644 --- a/Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.h +++ b/Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.h @@ -26,8 +26,8 @@ namespace Telemetry ////////////////// // AZ::Component - void Activate(); - void Deactivate(); + void Activate() override; + void Deactivate() override; static void Reflect(AZ::ReflectContext* context); ////////////////// 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/AWSCore/Code/Source/Framework/JsonObjectHandler.cpp b/Gems/AWSCore/Code/Source/Framework/JsonObjectHandler.cpp index d041a97428..07df7806a9 100644 --- a/Gems/AWSCore/Code/Source/Framework/JsonObjectHandler.cpp +++ b/Gems/AWSCore/Code/Source/Framework/JsonObjectHandler.cpp @@ -19,6 +19,7 @@ namespace AWSCore { public: + virtual ~JsonReaderHandler() = default; using Ch = char; using SizeType = rapidjson::SizeType; diff --git a/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSAttributionServiceApiTest.cpp b/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSAttributionServiceApiTest.cpp index 9b90d5ca8d..4290713e5c 100644 --- a/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSAttributionServiceApiTest.cpp +++ b/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSAttributionServiceApiTest.cpp @@ -21,6 +21,8 @@ namespace AWSCoreUnitTest : public AWSCore::JsonReader { public: + virtual ~JsonReaderMock() = default; + MOCK_METHOD0(Ignore, bool()); MOCK_METHOD1(Accept, bool(bool& target)); MOCK_METHOD1(Accept, bool(AZStd::string& target)); diff --git a/Gems/AWSMetrics/Code/Tests/AWSMetricsServiceApiTest.cpp b/Gems/AWSMetrics/Code/Tests/AWSMetricsServiceApiTest.cpp index bbfc206ab0..8844e727b6 100644 --- a/Gems/AWSMetrics/Code/Tests/AWSMetricsServiceApiTest.cpp +++ b/Gems/AWSMetrics/Code/Tests/AWSMetricsServiceApiTest.cpp @@ -19,6 +19,8 @@ namespace AWSMetrics : public AWSCore::JsonReader { public: + virtual ~JsonReaderMock() = default; + MOCK_METHOD0(Ignore, bool()); MOCK_METHOD1(Accept, bool(bool& target)); MOCK_METHOD1(Accept, bool(AZStd::string& target)); diff --git a/Gems/Achievements/Code/Source/AchievementsSystemComponent.h b/Gems/Achievements/Code/Source/AchievementsSystemComponent.h index 840974a2dc..25b28ae690 100644 --- a/Gems/Achievements/Code/Source/AchievementsSystemComponent.h +++ b/Gems/Achievements/Code/Source/AchievementsSystemComponent.h @@ -42,7 +42,7 @@ namespace Achievements //////////////////////////////////////////////////////////////////////////////////////// // AchievementsRequestBus interface implementation void UnlockAchievement(const UnlockAchievementParams& params) override; - void QueryAchievementDetails(const QueryAchievementParams& params); + void QueryAchievementDetails(const QueryAchievementParams& params) override; public: //////////////////////////////////////////////////////////////////////////////////////// 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/Asset/ImageProcessingAtom/Code/Source/Editor/MipmapSettingWidget.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/MipmapSettingWidget.h index 9ea7f9c6ae..27efdb084b 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/MipmapSettingWidget.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/MipmapSettingWidget.h @@ -47,7 +47,7 @@ namespace ImageProcessingAtomEditor protected: //////////////////////////////////////////////////////////////////////// //EditorInternalNotificationBus - void OnEditorSettingsChanged(bool needRefresh, const AZStd::string& platform); + void OnEditorSettingsChanged(bool needRefresh, const AZStd::string& platform) override; //////////////////////////////////////////////////////////////////////// private: diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePreviewWidget.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePreviewWidget.h index db3c95c142..d97698cc63 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePreviewWidget.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePreviewWidget.h @@ -70,7 +70,7 @@ namespace ImageProcessingAtomEditor protected: //////////////////////////////////////////////////////////////////////// //EditorInternalNotificationBus - void OnEditorSettingsChanged(bool needRefresh, const AZStd::string& platform); + void OnEditorSettingsChanged(bool needRefresh, const AZStd::string& platform) override; //////////////////////////////////////////////////////////////////////// void resizeEvent(QResizeEvent* event) override; bool eventFilter(QObject* obj, QEvent* event) override; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePropertyEditor.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePropertyEditor.h index 988561f3ce..83bcec9c83 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePropertyEditor.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePropertyEditor.h @@ -52,7 +52,7 @@ namespace ImageProcessingAtomEditor //////////////////////////////////////////////////////////////////////// //EditorInternalNotificationBus - void OnEditorSettingsChanged(bool needRefresh, const AZStd::string& platform); + void OnEditorSettingsChanged(bool needRefresh, const AZStd::string& platform) override; //////////////////////////////////////////////////////////////////////// bool event(QEvent* event) override; diff --git a/Gems/Atom/Feature/Common/Assets/Passes/HDRColorGrading.pass b/Gems/Atom/Feature/Common/Assets/Passes/HDRColorGrading.pass new file mode 100644 index 0000000000..f1e8304b30 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Passes/HDRColorGrading.pass @@ -0,0 +1,215 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "PassAsset", + "ClassData": { + "PassTemplate": { + "Name": "HDRColorGradingTemplate", + "PassClass": "FullScreenTriangle", + "Slots": [ + { + "Name": "Input", + "SlotType": "Input", + "ShaderInputName": "m_framebuffer", + "ScopeAttachmentUsage": "Shader" + }, + { + "Name": "Output", + "SlotType": "Output", + "ScopeAttachmentUsage": "RenderTarget", + "LoadStoreAction": { + "LoadAction": "DontCare" + } + } + ], + "ImageAttachments": [ + { + "Name": "ColorGradingOutput", + "SizeSource": { + "Source": { + "Pass": "This", + "Attachment": "Input" + } + }, + "FormatSource": { + "Pass": "This", + "Attachment": "Input" + } + } + ], + "Connections": [ + { + "LocalSlot": "Output", + "AttachmentRef": { + "Pass": "This", + "Attachment": "ColorGradingOutput" + } + } + ], + "FallbackConnections": [ + { + "Input": "Input", + "Output": "Output" + } + ], + "PassData": { + "$type": "FullscreenTrianglePassData", + "ShaderAsset": { + "FilePath": "Shaders/PostProcessing/HDRColorGrading.shader" + }, + "ShaderDataMappings": { + "FloatMappings": [ + { + "Name": "m_colorGradingExposure", + "Value": 0.0 // unconstrained, log2 stops + }, + { + "Name": "m_colorGradingContrast", + "Value": 0.0 // -100 ... 100 + }, + { + "Name": "m_colorGradingHueShift", + "Value": 0.0 // 0 ... 1, can wrap + }, + { + "Name": "m_colorGradingPreSaturation", + "Value": 1.0 // -100 ... 100 + }, + { + "Name": "m_colorFilterIntensity", + "Value": 1.0 // unconstrained, log2 stops + }, + { + "Name": "m_colorFilterMultiply", + "Value": 0.0 // modulate, 0 ... 1 + }, + { + "Name": "m_whiteBalanceKelvin", + "Value": 6500.0 // 1000.0f ... 40000.0f kelvin + }, + { + "Name": "m_whiteBalanceTint", + "Value": 0.0 // -100 ... 100 + }, + { + "Name": "m_splitToneBalance", + "Value": 0.0 // -1 ... 1 + }, + { + "Name": "m_splitToneMix", + "Value": 0.0 // 0 ... 1 + }, + { + "Name": "m_colorGradingPostSaturation", + "Value": 1.0 // -100 ... 100 + }, + { + "Name": "m_smhShadowsStart", + "Value": 0.0 // 0 ... 1 + }, + { + "Name": "m_smhShadowsEnd", + "Value": 0.3 // 0 ... 1 + }, + { + "Name": "m_smhHighlightsStart", + "Value": 0.55 // 0 ... 1 + }, + { + "Name": "m_smhHighlightsEnd", + "Value": 1.0 // 0 ... 1 + }, + { + "Name": "m_smhMix", + "Value": 0.0 // 0 ... 1 + } + ], + // The colors defined here are expected to be in linear rgb color space. + // These are converted to ACEScg color space within the HDRColorGrading.azsl shader + "ColorMappings": [ + { + "Name": "m_colorFilterSwatch", + "Value": [ + 1.0, + 0.5, + 0.5, + 1.0 + ] + }, + { + "Name": "m_splitToneShadowsColor", + "Value": [ + 1.0, + 0.1, + 0.1, + 1.0 + ] + }, + { + "Name": "m_splitToneHighlightsColor", + "Value": [ + 0.1, + 1.0, + 0.1, + 1.0 + ] + }, + { + "Name": "m_smhShadowsColor", + "Value": [ + 1.0, + 0.25, + 0.25, + 1.0 + ] + }, + { + "Name": "m_smhMidtonesColor", + "Value": [ + 0.1, + 0.1, + 1.0, + 1.0 + ] + }, + { + "Name": "m_smhHighlightsColor", + "Value": [ + 1.0, + 0.0, + 1.0, + 1.0 + ] + } + ], + "Float3Mappings": [ + { + "Name": "m_channelMixingRed", + "Value": [ + 1.0, + 0.0, + 0.0 + ] + }, + { + "Name": "m_channelMixingGreen", + "Value": [ + 0.0, + 1.0, + 0.0 + ] + }, + { + "Name": "m_channelMixingBlue", + "Value": [ + 0.0, + 0.0, + 1.0 + ] + } + ] + } + } + } + } +} diff --git a/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset b/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset index 8b7d6a8438..4e38717d31 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset +++ b/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset @@ -499,7 +499,11 @@ { "Name": "KawaseShadowBlurTemplate", "Path": "Passes/KawaseShadowBlur.pass" - } + }, + { + "Name": "HDRColorGradingTemplate", + "Path": "Passes/HDRColorGrading.pass" + } ] } } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/KelvinToRgb.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/KelvinToRgb.azsli new file mode 100644 index 0000000000..aa57f0f4a1 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/KelvinToRgb.azsli @@ -0,0 +1,75 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: (Apache-2.0 OR MIT) AND Creative Commons 3.0 + * + */ + +// Ref: https://www.shadertoy.com/view/lsSXW1 +// ported by Renaud Bédard (@renaudbedard) from original code from Tanner Helland +// http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/ + +// color space functions translated from HLSL versions on Chilli Ant (by Ian Taylor) +// http://www.chilliant.com/rgb2hsv.html + +// licensed and released under Creative Commons 3.0 Attribution +// https://creativecommons.org/licenses/by/3.0/ + +float3 HueToRgb(float hue) +{ + return saturate(float3(abs(hue * 6.0f - 3.0f) - 1.0f, + 2.0f - abs(hue * 6.0f - 2.0f), + 2.0f - abs(hue * 6.0f - 4.0f))); +} + +float3 RgbToHcv(float3 rgb) +{ + // Based on work by Sam Hocevar and Emil Persson + const float4 p = (rgb.g < rgb.b) ? float4(rgb.bg, -1.0f, 2.0f/3.0f) : float4(rgb.gb, 0.0f, -1.0f/3.0f); + const float4 q1 = (rgb.r < p.x) ? float4(p.xyw, rgb.r) : float4(rgb.r, p.yzx); + const float c = q1.x - min(q1.w, q1.y); + const float h = abs((q1.w - q1.y) / (6.0f * c + 0.000001f ) + q1.z); + return float3(h, c, q1.x); +} + +float3 RgbToHsl(float3 rgb) +{ + rgb.xyz = max(rgb.xyz, 0.000001f); + const float3 hcv = RgbToHcv(rgb); + const float L = hcv.z - hcv.y * 0.5f; + const float S = hcv.y / (1.0f - abs(L * 2.0f - 1.0f) + 0.000001f); + return float3(hcv.x, S, L); +} + +float3 HslToRgb(float3 hsl) +{ + const float3 rgb = HueToRgb(hsl.x); + const float c = (1.0f - abs(2.0f * hsl.z - 1.0f)) * hsl.y; + return (rgb - 0.5f) * c + hsl.z; +} + +// Color temperature +float3 KelvinToRgb(float kelvin) +{ + float3 ret; + kelvin = clamp(kelvin, 1000.0f, 40000.0f) / 100.0f; + if(kelvin <= 66.0f) + { + ret.r = 1.0f; + ret.g = saturate(0.39008157876901960784f * log(kelvin) - 0.63184144378862745098f); + } + else + { + float t = max(kelvin - 60.0f, 0.0f); + ret.r = saturate(1.29293618606274509804f * pow(t, -0.1332047592f)); + ret.g = saturate(1.12989086089529411765f * pow(t, -0.0755148492f)); + } + if(kelvin >= 66.0f) + ret.b = 1.0f; + else if(kelvin < 19.0f) + ret.b = 0.0f; + else + ret.b = saturate(0.54320678911019607843f * log(kelvin - 10.0f) - 1.19625408914f); + return ret; +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/PSstyleColorBlends_NonSeparable.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/PSstyleColorBlends_NonSeparable.azsli new file mode 100644 index 0000000000..9c2a5bc306 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/PSstyleColorBlends_NonSeparable.azsli @@ -0,0 +1,177 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +/* +------------------------------------------------------------------------------ + Public Domain +------------------------------------------------------------------------------ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + +Source: https://www.ryanjuckett.com/photoshop-blend-modes-in-hlsl/ +*/ +//****************************************************************************** +//****************************************************************************** +float Color_GetLuminosity(float3 c) +{ + return 0.3*c.r + 0.59*c.g + 0.11*c.b; +} + +//****************************************************************************** +//****************************************************************************** +float3 Color_SetLuminosity(float3 c, float lum) +{ + float d = lum - Color_GetLuminosity(c); + c.rgb += float3(d,d,d); + + // clip back into legal range + lum = Color_GetLuminosity(c); + float cMin = min(c.r, min(c.g, c.b)); + float cMax = max(c.r, max(c.g, c.b)); + + if(cMin < 0) + c = lerp(float3(lum,lum,lum), c, lum / (lum - cMin)); + + if(cMax > 1) + c = lerp(float3(lum,lum,lum), c, (1 - lum) / (cMax - lum)); + + return c; +} + +//****************************************************************************** +//****************************************************************************** +float Color_GetSaturation(float3 c) +{ + return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b)); +} + +//****************************************************************************** +// Set saturation if color components are sorted in ascending order. +//****************************************************************************** +float3 Color_SetSaturation_MinMidMax(float3 cSorted, float s) +{ + if(cSorted.z > cSorted.x) + { + cSorted.y = (((cSorted.y - cSorted.x) * s) / (cSorted.z - cSorted.x)); + cSorted.z = s; + } + else + { + cSorted.y = 0; + cSorted.z = 0; + } + + cSorted.x = 0; + + return cSorted; +} + +//****************************************************************************** +//****************************************************************************** +float3 Color_SetSaturation(float3 c, float s) +{ + if (c.r <= c.g && c.r <= c.b) + { + if (c.g <= c.b) + c.rgb = Color_SetSaturation_MinMidMax(c.rgb, s); + else + c.rbg = Color_SetSaturation_MinMidMax(c.rbg, s); + } + else if (c.g <= c.r && c.g <= c.b) + { + if (c.r <= c.b) + c.grb = Color_SetSaturation_MinMidMax(c.grb, s); + else + c.gbr = Color_SetSaturation_MinMidMax(c.gbr, s); + } + else + { + if (c.r <= c.g) + c.brg = Color_SetSaturation_MinMidMax(c.brg, s); + else + c.bgr = Color_SetSaturation_MinMidMax(c.bgr, s); + } + + return c; +} + +//****************************************************************************** +// Creates a color with the hue of the blend color and the saturation and +// luminosity of the base color. +//****************************************************************************** +float3 BlendMode_Hue(float3 base, float3 blend) +{ + return Color_SetLuminosity(Color_SetSaturation(blend, Color_GetSaturation(base)), Color_GetLuminosity(base)); +} + +//****************************************************************************** +// Creates a color with the saturation of the blend color and the hue and +// luminosity of the base color. +//****************************************************************************** +float3 BlendMode_Saturation(float3 base, float3 blend) +{ + return Color_SetLuminosity(Color_SetSaturation(base, Color_GetSaturation(blend)), Color_GetLuminosity(base)); +} + +//****************************************************************************** +// Creates a color with the hue and saturation of the blend color and the +// luminosity of the base color. +//****************************************************************************** +float3 BlendMode_Color(float3 base, float3 blend) +{ + return Color_SetLuminosity(blend, Color_GetLuminosity(base)); +} + +//****************************************************************************** +// Creates a color with the luminosity of the blend color and the hue and +// saturation of the base color. +//****************************************************************************** +float3 BlendMode_Luminosity(float3 base, float3 blend) +{ + return Color_SetLuminosity(base, Color_GetLuminosity(blend)); +} + +//****************************************************************************** +// Compares the total of all channel values for the blend and base color and +// displays the lower value color. +//****************************************************************************** +float3 BlendMode_DarkerColor(float3 base, float3 blend) +{ + return Color_GetLuminosity(base) <= Color_GetLuminosity(blend) ? base : blend; +} + +//****************************************************************************** +// Compares the total of all channel values for the blend and base color and +// displays the higher value color. +//****************************************************************************** +float3 BlendMode_LighterColor(float3 base, float3 blend) +{ + return Color_GetLuminosity(base) > Color_GetLuminosity(blend) ? base : blend; +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/PSstyleColorBlends_Separable.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/PSstyleColorBlends_Separable.azsli new file mode 100644 index 0000000000..f64df30231 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/3rdParty/Features/PostProcessing/PSstyleColorBlends_Separable.azsli @@ -0,0 +1,306 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +/* +------------------------------------------------------------------------------ + Public Domain +------------------------------------------------------------------------------ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + +Source: https://www.ryanjuckett.com/photoshop-blend-modes-in-hlsl/ +*/ +//****************************************************************************** +// Selects the blend color, ignoring the base. +//****************************************************************************** +float3 BlendMode_Normal(float3 base, float3 blend) +{ + return blend; +} + +//****************************************************************************** +// Looks at the color information in each channel and selects the base or blend +// color—whichever is darker—as the result color. +//****************************************************************************** +float3 BlendMode_Darken(float3 base, float3 blend) +{ + return min(base, blend); +} + +//****************************************************************************** +// Looks at the color information in each channel and multiplies the base color +// by the blend color. +//****************************************************************************** +float3 BlendMode_Multiply(float3 base, float3 blend) +{ + return base*blend; +} + +//****************************************************************************** +// Looks at the color information in each channel and darkens the base color to +// reflect the blend color by increasing the contrast between the two. +//****************************************************************************** +float BlendMode_ColorBurn(float base, float blend) +{ + return blend > 0 ? 1 - min(1, (1-base) / blend) : 0; +} + +float3 BlendMode_ColorBurn(float3 base, float3 blend) +{ + return float3( BlendMode_ColorBurn(base.r, blend.r), + BlendMode_ColorBurn(base.g, blend.g), + BlendMode_ColorBurn(base.b, blend.b) ); +} + +//****************************************************************************** +// Looks at the color information in each channel and darkens the base color to +// reflect the blend color by decreasing the brightness. +//****************************************************************************** +float BlendMode_LinearBurn(float base, float blend) +{ + return max(0, base + blend - 1); +} + +float3 BlendMode_LinearBurn(float3 base, float3 blend) +{ + return float3( BlendMode_LinearBurn(base.r, blend.r), + BlendMode_LinearBurn(base.g, blend.g), + BlendMode_LinearBurn(base.b, blend.b) ); +} + +//****************************************************************************** +// Looks at the color information in each channel and selects the base or blend +// color—whichever is lighter—as the result color. +//****************************************************************************** +float3 BlendMode_Lighten(float3 base, float3 blend) +{ + return max(base, blend); +} + +//****************************************************************************** +// Looks at each channel’s color information and multiplies the inverse of the +// blend and base colors. +//****************************************************************************** +float3 BlendMode_Screen(float3 base, float3 blend) +{ + return base + blend - base*blend; +} + +//****************************************************************************** +// Looks at the color information in each channel and brightens the base color +// to reflect the blend color by decreasing contrast between the two. +//****************************************************************************** +float BlendMode_ColorDodge(float base, float blend) +{ + return blend < 1 ? min(1, base / (1-blend)) : 1; +} + +float3 BlendMode_ColorDodge(float3 base, float3 blend) +{ + return float3( BlendMode_ColorDodge(base.r, blend.r), + BlendMode_ColorDodge(base.g, blend.g), + BlendMode_ColorDodge(base.b, blend.b) ); +} + +//****************************************************************************** +// Looks at the color information in each channel and brightens the base color +// to reflect the blend color by decreasing contrast between the two. +//****************************************************************************** +float BlendMode_LinearDodge(float base, float blend) +{ + return min(1, base + blend); +} + +float3 BlendMode_LinearDodge(float3 base, float3 blend) +{ + return float3( BlendMode_LinearDodge(base.r, blend.r), + BlendMode_LinearDodge(base.g, blend.g), + BlendMode_LinearDodge(base.b, blend.b) ); +} + +//****************************************************************************** +// Multiplies or screens the colors, depending on the base color. +//****************************************************************************** +float BlendMode_Overlay(float base, float blend) +{ + return (base <= 0.5) ? 2*base*blend : 1 - 2*(1-base)*(1-blend); +} + +float3 BlendMode_Overlay(float3 base, float3 blend) +{ + return float3( BlendMode_Overlay(base.r, blend.r), + BlendMode_Overlay(base.g, blend.g), + BlendMode_Overlay(base.b, blend.b) ); +} + +//****************************************************************************** +// Darkens or lightens the colors, depending on the blend color. +//****************************************************************************** +float BlendMode_SoftLight(float base, float blend) +{ + if (blend <= 0.5) + { + return base - (1-2*blend)*base*(1-base); + } + else + { + float d = (base <= 0.25) ? ((16*base-12)*base+4)*base : sqrt(base); + return base + (2*blend-1)*(d-base); + } +} + +float3 BlendMode_SoftLight(float3 base, float3 blend) +{ + return float3( BlendMode_SoftLight(base.r, blend.r), + BlendMode_SoftLight(base.g, blend.g), + BlendMode_SoftLight(base.b, blend.b) ); +} + +//****************************************************************************** +// Multiplies or screens the colors, depending on the blend color. +//****************************************************************************** +float BlendMode_HardLight(float base, float blend) +{ + return (blend <= 0.5) ? 2*base*blend : 1 - 2*(1-base)*(1-blend); +} + +float3 BlendMode_HardLight(float3 base, float3 blend) +{ + return float3( BlendMode_HardLight(base.r, blend.r), + BlendMode_HardLight(base.g, blend.g), + BlendMode_HardLight(base.b, blend.b) ); +} + +//****************************************************************************** +// Burns or dodges the colors by increasing or decreasing the contrast, +// depending on the blend color. +//****************************************************************************** +float BlendMode_VividLight(float base, float blend) +{ + return (blend <= 0.5) ? BlendMode_ColorBurn(base,2*blend) : BlendMode_ColorDodge(base,2*(blend-0.5)); +} + +float3 BlendMode_VividLight(float3 base, float3 blend) +{ + return float3( BlendMode_VividLight(base.r, blend.r), + BlendMode_VividLight(base.g, blend.g), + BlendMode_VividLight(base.b, blend.b) ); +} + +//****************************************************************************** +// Burns or dodges the colors by decreasing or increasing the brightness, +// depending on the blend color. +//****************************************************************************** +float BlendMode_LinearLight(float base, float blend) +{ + return (blend <= 0.5) ? BlendMode_LinearBurn(base,2*blend) : BlendMode_LinearDodge(base,2*(blend-0.5)); +} + +float3 BlendMode_LinearLight(float3 base, float3 blend) +{ + return float3( BlendMode_LinearLight(base.r, blend.r), + BlendMode_LinearLight(base.g, blend.g), + BlendMode_LinearLight(base.b, blend.b) ); +} + +//****************************************************************************** +// Replaces the colors, depending on the blend color. +//****************************************************************************** +float BlendMode_PinLight(float base, float blend) +{ + return (blend <= 0.5) ? min(base,2*blend) : max(base,2*(blend-0.5)); +} + +float3 BlendMode_PinLight(float3 base, float3 blend) +{ + return float3( BlendMode_PinLight(base.r, blend.r), + BlendMode_PinLight(base.g, blend.g), + BlendMode_PinLight(base.b, blend.b) ); +} + +//****************************************************************************** +// Adds the red, green and blue channel values of the blend color to the RGB +// values of the base color. If the resulting sum for a channel is 255 or +// greater, it receives a value of 255; if less than 255, a value of 0. +//****************************************************************************** +float BlendMode_HardMix(float base, float blend) +{ + return (base + blend >= 1.0) ? 1.0 : 0.0; +} + +float3 BlendMode_HardMix(float3 base, float3 blend) +{ + return float3( BlendMode_HardMix(base.r, blend.r), + BlendMode_HardMix(base.g, blend.g), + BlendMode_HardMix(base.b, blend.b) ); +} + +//****************************************************************************** +// Looks at the color information in each channel and subtracts either the +// blend color from the base color or the base color from the blend color, +// depending on which has the greater brightness value. +//****************************************************************************** +float3 BlendMode_Difference(float3 base, float3 blend) +{ + return abs(base-blend); +} + +//****************************************************************************** +// Creates an effect similar to but lower in contrast than the Difference mode. +//****************************************************************************** +float3 BlendMode_Exclusion(float3 base, float3 blend) +{ + return base + blend - 2*base*blend; +} + +//****************************************************************************** +// Looks at the color information in each channel and subtracts the blend color +// from the base color. +//****************************************************************************** +float3 BlendMode_Subtract(float3 base, float3 blend) +{ + return max(0, base - blend); +} + +//****************************************************************************** +// Looks at the color information in each channel and divides the blend color +// from the base color. +//****************************************************************************** +float BlendMode_Divide(float base, float blend) +{ + return blend > 0 ? min(1, base / blend) : 1; +} + +float3 BlendMode_Divide(float3 base, float3 blend) +{ + return float3( BlendMode_Divide(base.r, blend.r), + BlendMode_Divide(base.g, blend.g), + BlendMode_Divide(base.b, blend.b) ); +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/AcesCcToAcesCg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/AcesCcToAcesCg.azsli new file mode 100644 index 0000000000..e84b18c550 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/AcesCcToAcesCg.azsli @@ -0,0 +1,80 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: (MIT OR Apache-2.0) AND LicenseRef-ACES + * + */ + +/* +License Terms for Academy Color Encoding System Components + +Academy Color Encoding System (ACES) software and tools are provided by the + Academy under the following terms and conditions: A worldwide, royalty-free, + non-exclusive right to copy, modify, create derivatives, and use, in source and + binary forms, is hereby granted, subject to acceptance of this license. + +Copyright © 2015 Academy of Motion Picture Arts and Sciences (A.M.P.A.S.). +Portions contributed by others as indicated. All rights reserved. + +Performance of any of the aforementioned acts indicates acceptance to be bound + by the following terms and conditions: + +* Copies of source code, in whole or in part, must retain the above copyright + notice, this list of conditions and the Disclaimer of Warranty. +* Use in binary form must retain the above copyright notice, this list of + conditions and the Disclaimer of Warranty in the documentation and/or other + materials provided with the distribution. +* Nothing in this license shall be deemed to grant any rights to trademarks, + copyrights, patents, trade secrets or any other intellectual property of + A.M.P.A.S. or any contributors, except as expressly stated herein. +* Neither the name "A.M.P.A.S." nor the name of any other contributors to this + software may be used to endorse or promote products derivative of or based on + this software without express prior written permission of A.M.P.A.S. or the + contributors, as appropriate. + +This license shall be construed pursuant to the laws of the State of California, +and any disputes related thereto shall be subject to the jurisdiction of the + courts therein. + +Disclaimer of Warranty: THIS SOFTWARE IS PROVIDED BY A.M.P.A.S. AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, +AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL A.M.P.A.S., OR ANY +CONTRIBUTORS OR DISTRIBUTORS, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, RESITUTIONARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//////////////////////////////////////////////////////////////////////////////// +WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE ACADEMY SPECIFICALLY +DISCLAIMS ANY REPRESENTATIONS OR WARRANTIES WHATSOEVER RELATED TO PATENT OR +OTHER INTELLECTUAL PROPERTY RIGHTS IN THE ACADEMY COLOR ENCODING SYSTEM, OR +APPLICATIONS THEREOF, HELD BY PARTIES OTHER THAN A.M.P.A.S.,WHETHER DISCLOSED OR +UNDISCLOSED. +*/ + +#pragma once + +static const float HALF_MAX = 65504.0f; + +float AcesCcToLinear(float value) +{ + if (value < -0.3013698630) // (9.72-15)/17.52 + return (pow( 2., value*17.52-9.72) - pow( 2.,-16.))*2.0; + else if (value < (log2(HALF_MAX)+9.72)/17.52) + return pow( 2., value*17.52-9.72); + else // (value >= (log2(HALF_MAX)+9.72)/17.52) + return HALF_MAX; +} + +float3 AcesCcToAcesCg(float3 color) +{ + return float3( + AcesCcToLinear(color.r), + AcesCcToLinear(color.g), + AcesCcToLinear(color.b)); +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/AcesCgToAcesCc.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/AcesCgToAcesCc.azsli new file mode 100644 index 0000000000..f784a76990 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/AcesCgToAcesCc.azsli @@ -0,0 +1,79 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: (MIT OR Apache-2.0) AND LicenseRef-ACES + * + */ + +/* +License Terms for Academy Color Encoding System Components + +Academy Color Encoding System (ACES) software and tools are provided by the + Academy under the following terms and conditions: A worldwide, royalty-free, + non-exclusive right to copy, modify, create derivatives, and use, in source and + binary forms, is hereby granted, subject to acceptance of this license. + +Copyright © 2015 Academy of Motion Picture Arts and Sciences (A.M.P.A.S.). +Portions contributed by others as indicated. All rights reserved. + +Performance of any of the aforementioned acts indicates acceptance to be bound + by the following terms and conditions: + +* Copies of source code, in whole or in part, must retain the above copyright + notice, this list of conditions and the Disclaimer of Warranty. +* Use in binary form must retain the above copyright notice, this list of + conditions and the Disclaimer of Warranty in the documentation and/or other + materials provided with the distribution. +* Nothing in this license shall be deemed to grant any rights to trademarks, + copyrights, patents, trade secrets or any other intellectual property of + A.M.P.A.S. or any contributors, except as expressly stated herein. +* Neither the name "A.M.P.A.S." nor the name of any other contributors to this + software may be used to endorse or promote products derivative of or based on + this software without express prior written permission of A.M.P.A.S. or the + contributors, as appropriate. + +This license shall be construed pursuant to the laws of the State of California, +and any disputes related thereto shall be subject to the jurisdiction of the + courts therein. + +Disclaimer of Warranty: THIS SOFTWARE IS PROVIDED BY A.M.P.A.S. AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, +AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL A.M.P.A.S., OR ANY +CONTRIBUTORS OR DISTRIBUTORS, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, RESITUTIONARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//////////////////////////////////////////////////////////////////////////////// +WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE ACADEMY SPECIFICALLY +DISCLAIMS ANY REPRESENTATIONS OR WARRANTIES WHATSOEVER RELATED TO PATENT OR +OTHER INTELLECTUAL PROPERTY RIGHTS IN THE ACADEMY COLOR ENCODING SYSTEM, OR +APPLICATIONS THEREOF, HELD BY PARTIES OTHER THAN A.M.P.A.S.,WHETHER DISCLOSED OR +UNDISCLOSED. +*/ + +#pragma once + +float LinearToAcesCc(float value) +{ + if (value <= 0) + return -0.3584474886; // =(log2( pow(2.,-16.))+9.72)/17.52 + else if (value < pow(2.,-15.)) + return (log2( pow(2.,-16.) + value * 0.5) + 9.72) / 17.52; + else // (value >= pow(2.,-15)) + return (log2(value) + 9.72) / 17.52; +} + +float3 AcesCgToAcesCc(float3 color) +{ + return float3( + LinearToAcesCc(color.r), + LinearToAcesCc(color.g), + LinearToAcesCc(color.b) + ); +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/TransformColor.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/TransformColor.azsli index e298445c7c..c9d1b7d979 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/TransformColor.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/ColorManagement/TransformColor.azsli @@ -8,11 +8,14 @@ #pragma once +#include #include "GeneratedTransforms/LinearSrgb_To_AcesCg.azsli" #include "GeneratedTransforms/AcesCg_To_LinearSrgb.azsli" #include "GeneratedTransforms/LinearSrgb_To_Srgb.azsli" #include "GeneratedTransforms/Srgb_To_LinearSrgb.azsli" #include "GeneratedTransforms/Aces_To_AcesCg.azsli" +#include "GeneratedTransforms/AcesCcToAcesCg.azsli" +#include "GeneratedTransforms/AcesCgToAcesCc.azsli" #include "GeneratedTransforms/CalculateLuminance_LinearSrgb.azsli" #include "GeneratedTransforms/CalculateLuminance_AcesCg.azsli" @@ -20,6 +23,7 @@ enum class ColorSpaceId { SRGB = 0, LinearSRGB, + ACEScc, ACEScg, ACES2065, XYZ, @@ -51,15 +55,27 @@ float3 TransformColor(in float3 color, ColorSpaceId fromColorSpace, ColorSpaceId color = AcesCg_To_LinearSrgb(color); color = LinearSrgb_To_Srgb(color); } + else if (fromColorSpace == ColorSpaceId::ACEScg && toColorSpace == ColorSpaceId::LinearSRGB) + { + color = AcesCg_To_LinearSrgb(color); + } + else if (fromColorSpace == ColorSpaceId::ACEScg && toColorSpace == ColorSpaceId::ACEScc) + { + color = AcesCgToAcesCc(color); + } else if (fromColorSpace == ColorSpaceId::ACES2065 && toColorSpace == ColorSpaceId::ACEScg) { color = Aces_To_AcesCg(color); } + else if (fromColorSpace == ColorSpaceId::ACEScc && toColorSpace == ColorSpaceId::ACEScg) + { + color = AcesCcToAcesCg(color); + } else { color = float3(1, 0, 1); } - + return color; } @@ -75,6 +91,7 @@ float CalculateLuminance(in float3 color, ColorSpaceId colorSpace) luminance = CalculateLuminance_AcesCg(color); break; case ColorSpaceId::SRGB: + case ColorSpaceId::ACEScc: case ColorSpaceId::ACES2065: case ColorSpaceId::XYZ: case ColorSpaceId::Invalid: @@ -83,3 +100,29 @@ float CalculateLuminance(in float3 color, ColorSpaceId colorSpace) return luminance; } + +float RotateHue(float hue, float low, float hi) +{ + return (hue < low) + ? hue + hi + : (hue > hi) + ? hue - hi + : hue; +} + +float3 RgbToHsv(float3 color) +{ + const float4 k = float4(0.0f, -1.0f / 3.0f, 2.0f / 3.0f, -1.0f); + const float4 p = lerp(float4(color.bg, k.wz), float4(color.gb, k.xy), step(color.b, color.g)); + const float4 q = lerp(float4(p.xyw, color.r), float4(color.r, p.yzx), step(p.x, color.r)); + const float d = q.x - min(q.w, q.y); + const float e = EPSILON; + return float3(abs(q.z + (q.w - q.y) / (6.0f * d + e)), d / (q.x + e), q.x); +} + +float3 HsvToRgb(float3 color) +{ + const float4 k = float4(1.0f, 2.0f / 3.0f, 1.0f / 3.0f, 3.0f); + const float3 p = abs(frac(color.xxx + k.xyz) * 6.0f - k.www); + return color.z * lerp(k.xxx, saturate(p - k.xxx), color.y); +} diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/HDRColorGrading.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/HDRColorGrading.azsl new file mode 100644 index 0000000000..9ae4a2bd68 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/HDRColorGrading.azsl @@ -0,0 +1,206 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include + +#include +#include + +#include +#include +#include <3rdParty/Features/PostProcessing/PSstyleColorBlends_Separable.azsli> +#include <3rdParty/Features/PostProcessing/PSstyleColorBlends_NonSeparable.azsli> +#include <3rdParty/Features/PostProcessing/KelvinToRgb.azsli> + +static const float FloatEpsilon = 1.192092896e-07; // 1.0 + FloatEpsilon != 1.0, smallest positive float +static const float FloatMin = FLOAT_32_MIN; // Min float number that is positive +static const float FloatMax = FLOAT_32_MAX; // Max float number representable + +static const float AcesCcMidGrey = 0.4135884; + +ShaderResourceGroup PassSrg : SRG_PerPass_WithFallback +{ + // get the framebuffer + Texture2D m_framebuffer; + + // framebuffer sampler + Sampler LinearSampler + { + MinFilter = Linear; + MagFilter = Linear; + MipFilter = Linear; + AddressU = Clamp; + AddressV = Clamp; + AddressW = Clamp; + }; + + float m_colorGradingExposure; + float m_colorGradingContrast; + float m_colorGradingHueShift; + float m_colorGradingPreSaturation; + float m_colorFilterIntensity; + float m_colorFilterMultiply; + float m_whiteBalanceKelvin; + float m_whiteBalanceTint; + float m_splitToneBalance; + float m_splitToneMix; + float m_colorGradingPostSaturation; + float m_smhShadowsStart; + float m_smhShadowsEnd; + float m_smhHighlightsStart; + float m_smhHighlightsEnd; + float m_smhMix; + + float3 m_channelMixingRed; + float3 m_channelMixingGreen; + float3 m_channelMixingBlue; + + float4 m_colorFilterSwatch; + float4 m_splitToneShadowsColor; + float4 m_splitToneHighlightsColor; + + float4 m_smhShadowsColor; + float4 m_smhMidtonesColor; + float4 m_smhHighlightsColor; + + // my color grading output + float4 m_color; +} + +float SaturateWithEpsilon(float value) +{ + return clamp(value, FloatEpsilon, 1.0f); +} + +// Below are the color grading functions. These expect the frame color to be in ACEScg space. +// Note that some functions may have some quirks in their implementation and is subject to change. +float3 ColorGradePostExposure (float3 frameColor, float exposure) +{ + frameColor *= pow(2.0f, exposure); + return frameColor; +} + +// The contrast equation is performed in ACEScc (logarithmic) color space. +float3 ColorGradingContrast (float3 frameColor, float midgrey, float amount) +{ + const float contrastAdjustment = amount * 0.01f + 1.0f; + frameColor = TransformColor(frameColor.rgb, ColorSpaceId::ACEScg, ColorSpaceId::ACEScc); + frameColor = (frameColor - midgrey) * contrastAdjustment + midgrey; + return frameColor = TransformColor(frameColor.rgb, ColorSpaceId::ACEScc, ColorSpaceId::ACEScg); +} + +// The swatchColor param expects a linear RGB value. +float3 ColorGradeColorFilter (float3 frameColor, float3 swatchColor, float alpha) +{ + swatchColor = TransformColor(swatchColor, ColorSpaceId::LinearSRGB, ColorSpaceId::ACEScg); + swatchColor *= pow(2.0f, PassSrg::m_colorFilterIntensity); + const float3 frameAdjust = frameColor * swatchColor; + return frameColor = lerp(frameColor, frameAdjust, alpha); +} + +float3 ColorGradeHueShift (float3 frameColor, float amount) +{ + float3 frameHsv = RgbToHsv(frameColor); + const float hue = frameHsv.x + amount; + frameHsv.x = RotateHue(hue, 0.0, 1.0); + return HsvToRgb(frameHsv); +} + +float3 ColorGradeSaturation (float3 frameColor, float control) +{ + const float vLuminance = CalculateLuminance(frameColor, ColorSpaceId::ACEScg); + return (frameColor - vLuminance) * control + vLuminance; +} + +float3 ColorGradeKelvinColorTemp(float3 frameColor, float kelvin) +{ + const float3 kColor = TransformColor(KelvinToRgb(kelvin), ColorSpaceId::LinearSRGB, ColorSpaceId::ACEScg); + const float luminance = CalculateLuminance(frameColor, ColorSpaceId::ACEScg); + const float3 resHsl = RgbToHsl(frameColor.rgb * kColor.rgb); // Apply Kelvin color and convert to HSL + return HslToRgb(float3(resHsl.xy, luminance)); // Preserve luminance +} + +// pow(f, e) won't work if f is negative, or may cause inf/NAN. +float3 NoNanPow(float3 base, float3 power) +{ + return pow(max(abs(base), float3(FloatEpsilon, FloatEpsilon, FloatEpsilon)), power); +} + +float3 ColorGradeSplitTone (float3 frameColor, float balance, float mix) +{ + float3 frameSplitTone = NoNanPow(frameColor, 1.0 / 2.2); + const float t = SaturateWithEpsilon(CalculateLuminance(SaturateWithEpsilon(frameSplitTone), ColorSpaceId::ACEScg) + balance); + const float3 shadows = lerp(0.5, PassSrg::m_splitToneShadowsColor.rgb, 1.0 - t); + const float3 highlights = lerp(0.5, PassSrg::m_splitToneHighlightsColor.rgb, t); + frameSplitTone = BlendMode_SoftLight(frameSplitTone, shadows); + frameSplitTone = BlendMode_SoftLight(frameSplitTone, highlights); + frameSplitTone = NoNanPow(frameSplitTone, 2.2); + return lerp(frameColor.rgb, frameSplitTone.rgb, mix); +} + +float3 ColorGradeChannelMixer (float3 frameColor) +{ + return mul(float3x3(PassSrg::m_channelMixingRed.rgb, + PassSrg::m_channelMixingGreen.rgb, + PassSrg::m_channelMixingBlue.rgb), + frameColor); +} + +float3 ColorGradeShadowsMidtonesHighlights (float3 frameColor, float shadowsStart, float shadowsEnd, + float highlightsStart, float highlightsEnd, float mix, + float4 shadowsColor, float4 midtonesColor, float4 highlightsColor) +{ + const float3 shadowsColorACEScg = TransformColor(shadowsColor.rgb, ColorSpaceId::LinearSRGB, ColorSpaceId::ACEScg); + const float3 midtonesColorACEScg = TransformColor(midtonesColor.rgb, ColorSpaceId::LinearSRGB, ColorSpaceId::ACEScg); + const float3 highlightsColorACEScg = TransformColor(highlightsColor.rgb, ColorSpaceId::LinearSRGB, ColorSpaceId::ACEScg); + + const float cLuminance = CalculateLuminance(frameColor, ColorSpaceId::ACEScg); + const float shadowsWeight = 1.0 - smoothstep(shadowsStart, shadowsEnd, cLuminance); + const float highlightsWeight = smoothstep(highlightsStart, highlightsEnd, cLuminance); + const float midtonesWeight = 1.0 - shadowsWeight - highlightsWeight; + + const float3 frameSmh = frameColor * shadowsColorACEScg * shadowsWeight + + frameColor * midtonesColorACEScg * midtonesWeight + + frameColor * highlightsColorACEScg * highlightsWeight; + return lerp(frameColor.rgb, frameSmh.rgb, mix); +} + +float3 ColorGrade (float3 frameColor) +{ + frameColor = ColorGradePostExposure(frameColor, PassSrg::m_colorGradingExposure); + frameColor = ColorGradeKelvinColorTemp(frameColor, PassSrg::m_whiteBalanceKelvin); + frameColor = ColorGradingContrast(frameColor, AcesCcMidGrey, PassSrg::m_colorGradingContrast); + frameColor = ColorGradeColorFilter(frameColor, PassSrg::m_colorFilterSwatch.rgb, + PassSrg::m_colorFilterMultiply); + frameColor = max(frameColor, 0.0); + frameColor = ColorGradeSaturation(frameColor, PassSrg::m_colorGradingPreSaturation); + frameColor = ColorGradeSplitTone(frameColor, PassSrg::m_splitToneBalance, PassSrg::m_splitToneMix); + frameColor = ColorGradeChannelMixer(frameColor); + frameColor = max(frameColor, 0.0); + frameColor = ColorGradeShadowsMidtonesHighlights(frameColor, PassSrg::m_smhShadowsStart, PassSrg::m_smhShadowsEnd, + PassSrg::m_smhHighlightsStart, PassSrg::m_smhHighlightsEnd, PassSrg::m_smhMix, + PassSrg::m_smhShadowsColor, PassSrg::m_smhMidtonesColor, PassSrg::m_smhHighlightsColor); + frameColor = ColorGradeHueShift(frameColor, PassSrg::m_colorGradingHueShift); + frameColor = ColorGradeSaturation(frameColor, PassSrg::m_colorGradingPostSaturation); + return frameColor.rgb; +} + +PSOutput MainPS(VSOutput IN) +{ + PSOutput OUT; + + // Fetch the pixel color from the input texture + float3 frameColor = PassSrg::m_framebuffer.Sample(PassSrg::LinearSampler, IN.m_texCoord).rgb; + + OUT.m_color.rgb = ColorGrade(frameColor); + OUT.m_color.w = 1; + + return OUT; +} diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/HDRColorGrading.shader b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/HDRColorGrading.shader new file mode 100644 index 0000000000..f76f6708b7 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/HDRColorGrading.shader @@ -0,0 +1,22 @@ +{ + "Source" : "HDRColorGrading", + + "DepthStencilState" : { + "Depth" : { "Enable" : false } + }, + + "ProgramSettings": + { + "EntryPoints": + [ + { + "name": "MainVS", + "type": "Vertex" + }, + { + "name": "MainPS", + "type": "Fragment" + } + ] + } +} diff --git a/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake b/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake index 8435625833..c8f99cdb24 100644 --- a/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake +++ b/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake @@ -86,6 +86,7 @@ set(FILES Passes/CascadedShadowmaps.pass Passes/CheckerboardResolveColor.pass Passes/CheckerboardResolveDepth.pass + Passes/HDRColorGrading.pass Passes/ContrastAdaptiveSharpening.pass Passes/ConvertToAcescg.pass Passes/DebugOverlayParent.pass @@ -221,6 +222,8 @@ set(FILES ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/LinearSrgb_To_AcesCg.azsli ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/LinearSrgb_To_Srgb.azsli ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/Srgb_To_LinearSrgb.azsli + ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/AcesCcToAcesCg.azsli + ShaderLib/Atom/Features/ColorManagement/GeneratedTransforms/AcesCgToAcesCc.azsli ShaderLib/Atom/Features/CoreLights/PhotometricValue.azsli ShaderLib/Atom/Features/Decals/DecalTextureUtil.azsli ShaderLib/Atom/Features/LightCulling/LightCullingShared.azsli @@ -286,6 +289,9 @@ set(FILES ShaderLib/Atom/Features/Shadow/Shadow.azsli ShaderLib/Atom/Features/Shadow/ShadowmapAtlasLib.azsli ShaderLib/Atom/Features/Vertex/VertexHelper.azsli + ShaderLib/3rdParty/Features/PostProcessing/KelvinToRgb.azsli + ShaderLib/3rdParty/Features/PostProcessing/PSstyleColorBlends_NonSeparable.azsli + ShaderLib/3rdParty/Features/PostProcessing/PSstyleColorBlends_Separable.azsli ShaderResourceGroups/SceneSrg.azsli ShaderResourceGroups/SceneSrgAll.azsli ShaderResourceGroups/ViewSrg.azsli @@ -392,6 +398,8 @@ set(FILES Shaders/PostProcessing/FastDepthAwareBlurVer.shader Shaders/PostProcessing/FullscreenCopy.azsl Shaders/PostProcessing/FullscreenCopy.shader + Shaders/PostProcessing/HDRColorGrading.azsl + Shaders/PostProcessing/HDRColorGrading.shader Shaders/PostProcessing/LookModificationTransform.azsl Shaders/PostProcessing/LookModificationTransform.shader Shaders/PostProcessing/LuminanceHeatmap.azsl diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ParamMacros/StartParamFunctionsOverrideImpl.inl b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ParamMacros/StartParamFunctionsOverrideImpl.inl new file mode 100644 index 0000000000..37a853c94c --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ParamMacros/StartParamFunctionsOverrideImpl.inl @@ -0,0 +1,19 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +// Auto-generates override function declarations for getters and setters of specified parameters and overrides + +#define AZ_GFX_COMMON_PARAM(ValueType, Name, MemberName, DefaultValue) \ + ValueType Get##Name() const override { return MemberName; } \ + void Set##Name(ValueType val) override { MemberName = val; } \ + +#define AZ_GFX_COMMON_OVERRIDE(ValueType, Name, MemberName, OverrideValueType) \ + OverrideValueType Get##Name##Override() const override { return MemberName##Override; } \ + void Set##Name##Override(OverrideValueType val) override { MemberName##Override = val; } \ + +#include diff --git a/Gems/Atom/Feature/Common/Code/Source/Checkerboard/CheckerboardPass.h b/Gems/Atom/Feature/Common/Code/Source/Checkerboard/CheckerboardPass.h index 3ef4e5f851..5db9a7e487 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Checkerboard/CheckerboardPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/Checkerboard/CheckerboardPass.h @@ -35,7 +35,7 @@ namespace AZ protected: // Pass overrides... - void FrameBeginInternal(FramePrepareParams params); + void FrameBeginInternal(FramePrepareParams params) override; void BuildInternal() override; void FrameEndInternal() override; diff --git a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h index 0bde3edb4f..018d2d46b7 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h @@ -77,7 +77,7 @@ namespace AZ void RenderImguiDrawData(const ImDrawData& drawData); // TickBus::Handler overrides... - void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint); + void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; // AzFramework::InputTextEventListener overrides... bool OnInputTextEventFiltered(const AZStd::string& textUTF8) override; diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/DrawListFunctor.h b/Gems/Atom/Feature/Common/Code/Source/Material/DrawListFunctor.h index eb4bb0ab00..a21fb963e9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/DrawListFunctor.h +++ b/Gems/Atom/Feature/Common/Code/Source/Material/DrawListFunctor.h @@ -26,6 +26,7 @@ namespace AZ static void Reflect(ReflectContext* context); + using RPI::MaterialFunctor::Process; void Process(RuntimeContext& context) override; private: diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/DrawListFunctorSourceData.h b/Gems/Atom/Feature/Common/Code/Source/Material/DrawListFunctorSourceData.h index 58df14a812..ba5e174101 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/DrawListFunctorSourceData.h +++ b/Gems/Atom/Feature/Common/Code/Source/Material/DrawListFunctorSourceData.h @@ -27,6 +27,7 @@ namespace AZ static void Reflect(ReflectContext* context); + using RPI::MaterialFunctorSourceData::CreateFunctor; FunctorResult CreateFunctor(const RuntimeContext& context) const override; private: diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/SubsurfaceTransmissionParameterFunctor.h b/Gems/Atom/Feature/Common/Code/Source/Material/SubsurfaceTransmissionParameterFunctor.h index 10be4a0c47..e412687947 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/SubsurfaceTransmissionParameterFunctor.h +++ b/Gems/Atom/Feature/Common/Code/Source/Material/SubsurfaceTransmissionParameterFunctor.h @@ -26,6 +26,7 @@ namespace AZ static void Reflect(ReflectContext* context); + using RPI::MaterialFunctor::Process; void Process(RuntimeContext& context) override; private: diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/SubsurfaceTransmissionParameterFunctorSourceData.h b/Gems/Atom/Feature/Common/Code/Source/Material/SubsurfaceTransmissionParameterFunctorSourceData.h index c4f07c549d..9d074551c3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/SubsurfaceTransmissionParameterFunctorSourceData.h +++ b/Gems/Atom/Feature/Common/Code/Source/Material/SubsurfaceTransmissionParameterFunctorSourceData.h @@ -25,6 +25,7 @@ namespace AZ static void Reflect(AZ::ReflectContext* context); + using AZ::RPI::MaterialFunctorSourceData::CreateFunctor; FunctorResult CreateFunctor(const RuntimeContext& context) const override; private: diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/Transform2DFunctor.h b/Gems/Atom/Feature/Common/Code/Source/Material/Transform2DFunctor.h index bee24d90b7..2ef5af6913 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/Transform2DFunctor.h +++ b/Gems/Atom/Feature/Common/Code/Source/Material/Transform2DFunctor.h @@ -34,6 +34,7 @@ namespace AZ static void Reflect(ReflectContext* context); + using RPI::MaterialFunctor::Process; void Process(RuntimeContext& context) override; private: diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/Transform2DFunctorSourceData.h b/Gems/Atom/Feature/Common/Code/Source/Material/Transform2DFunctorSourceData.h index ecac071f94..db7e65fedc 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/Transform2DFunctorSourceData.h +++ b/Gems/Atom/Feature/Common/Code/Source/Material/Transform2DFunctorSourceData.h @@ -25,6 +25,7 @@ namespace AZ static void Reflect(AZ::ReflectContext* context); + using AZ::RPI::MaterialFunctorSourceData::CreateFunctor; FunctorResult CreateFunctor(const RuntimeContext& context) const override; private: diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.h b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.h index 1c245732aa..a433305d92 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.h +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.h @@ -47,7 +47,7 @@ namespace AZ void ApplySettingsTo(BloomSettings* target, float alpha) const; // Generate getters and setters. -#include +#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessSettings.h b/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessSettings.h index 2bb1eee277..515326e357 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessSettings.h +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessSettings.h @@ -52,7 +52,7 @@ namespace AZ #undef POST_PROCESS_MEMBER // Auto-gen getter and setter functions for post process members... -#include +#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.h b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.h index f49b8151b1..4b3eb6e535 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.h +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.h @@ -47,7 +47,7 @@ namespace AZ void ApplySettingsTo(SsaoSettings* target, float alpha) const; // Generate getters and setters. -#include +#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.h b/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.h index 57d1dd24b5..85ced5496b 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.h +++ b/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.h @@ -56,7 +56,7 @@ namespace AZ ~DeferredFogSettings() = default; // DeferredFogSettingsInterface overrides... - void OnSettingsChanged(); + void OnSettingsChanged() override; bool GetSettingsNeedUpdate() { return m_needUpdate; @@ -66,35 +66,35 @@ namespace AZ m_needUpdate = needUpdate; } - void SetEnabled(bool value); - virtual bool GetEnabled() const override + void SetEnabled(bool value) override; + bool GetEnabled() const override { return m_enabled; } - virtual void SetInitialized(bool isInitialized) override + void SetInitialized(bool isInitialized) override { m_isInitialized = isInitialized; } - virtual bool IsInitialized() override + bool IsInitialized() override { return m_isInitialized; } - virtual void SetUseNoiseTextureShaderOption(bool value) override + void SetUseNoiseTextureShaderOption(bool value) override { m_useNoiseTextureShaderOption = value; } - virtual bool GetUseNoiseTextureShaderOption() override + bool GetUseNoiseTextureShaderOption() override { return m_useNoiseTextureShaderOption; } - virtual void SetEnableFogLayerShaderOption(bool value) override + void SetEnableFogLayerShaderOption(bool value) override { m_enableFogLayerShaderOption = value; } - virtual bool GetEnableFogLayerShaderOption() override + bool GetEnableFogLayerShaderOption() override { return m_enableFogLayerShaderOption; } diff --git a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h index f4c6cad7bf..0b266b9a40 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h @@ -48,13 +48,14 @@ namespace AZ::Render void SetFieldOfViewY(ShadowId id, float fieldOfViewYRadians) override; void SetShadowmapMaxResolution(ShadowId id, ShadowmapSize size) override; void SetShadowBias(ShadowId id, float bias) override; - void SetEsmExponent(ShadowId id, float exponent); void SetShadowFilterMethod(ShadowId id, ShadowFilterMethod method) override; void SetSofteningBoundaryWidthAngle(ShadowId id, float boundaryWidthRadians) override; void SetFilteringSampleCount(ShadowId id, uint16_t count) override; void SetShadowProperties(ShadowId id, const ProjectedShadowDescriptor& descriptor) override; const ProjectedShadowDescriptor& GetShadowProperties(ShadowId id) override; + void SetEsmExponent(ShadowId id, float exponent); + private: // GPU data stored in m_projectedShadows. diff --git a/Gems/Atom/Feature/Common/Code/atom_feature_common_public_files.cmake b/Gems/Atom/Feature/Common/Code/atom_feature_common_public_files.cmake index 886a9f0f22..89febbcf3d 100644 --- a/Gems/Atom/Feature/Common/Code/atom_feature_common_public_files.cmake +++ b/Gems/Atom/Feature/Common/Code/atom_feature_common_public_files.cmake @@ -39,6 +39,7 @@ set(FILES Include/Atom/Feature/ParamMacros/StartParamCopySettingsTo.inl Include/Atom/Feature/ParamMacros/StartParamFunctions.inl Include/Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl + Include/Atom/Feature/ParamMacros/StartParamFunctionsOverrideImpl.inl Include/Atom/Feature/ParamMacros/StartParamFunctionsVirtual.inl Include/Atom/Feature/ParamMacros/StartParamMembers.inl Include/Atom/Feature/ParamMacros/StartParamSerializeContext.inl diff --git a/Gems/Atom/RHI/Code/CMakeLists.txt b/Gems/Atom/RHI/Code/CMakeLists.txt index 843eeb6364..5238985feb 100644 --- a/Gems/Atom/RHI/Code/CMakeLists.txt +++ b/Gems/Atom/RHI/Code/CMakeLists.txt @@ -56,9 +56,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/Code/Include/Atom/RHI/FreeListAllocator.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/FreeListAllocator.h index 49d5cc9345..ee1cb7c7f4 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/FreeListAllocator.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/FreeListAllocator.h @@ -51,7 +51,7 @@ namespace AZ VirtualAddress Allocate(size_t byteCount, size_t byteAlignment) override; void DeAllocate(VirtualAddress allocation) override; void GarbageCollect() override; - void GarbageCollectForce(); + void GarbageCollectForce() override; size_t GetAllocationCount() const override; size_t GetAllocatedByteCount() const override; const Descriptor& GetDescriptor() const override; diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/PipelineStateDescriptor.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/PipelineStateDescriptor.h index 63f0cb3822..83ab3cb584 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/PipelineStateDescriptor.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/PipelineStateDescriptor.h @@ -44,7 +44,7 @@ namespace AZ /// Returns the hash of the pipeline state descriptor contents. virtual HashValue64 GetHash() const = 0; - virtual bool operator == (const PipelineStateDescriptor& rhs) const; + bool operator == (const PipelineStateDescriptor& rhs) const; /// The pipeline layout describing the shader resource bindings. ConstPtr m_pipelineLayoutDescriptor = nullptr; @@ -77,8 +77,7 @@ namespace AZ /// Computes the hash value for this descriptor. HashValue64 GetHash() const override; - - virtual bool operator == (const PipelineStateDescriptorForDispatch& rhs) const; + bool operator == (const PipelineStateDescriptorForDispatch& rhs) const; /// The compute function containing byte code to compile. ConstPtr m_computeFunction; @@ -102,7 +101,7 @@ namespace AZ /// Computes the hash value for this descriptor. HashValue64 GetHash() const override; - virtual bool operator == (const PipelineStateDescriptorForDraw& rhs) const; + bool operator == (const PipelineStateDescriptorForDraw& rhs) const; /// [Required] The vertex function to compile. ConstPtr m_vertexFunction; @@ -135,7 +134,7 @@ namespace AZ //! Computes the hash value for this descriptor. HashValue64 GetHash() const override; - virtual bool operator == (const PipelineStateDescriptorForRayTracing& rhs) const; + bool operator == (const PipelineStateDescriptorForRayTracing& rhs) const; // The ray tracing shader byte code ConstPtr m_rayTracingFunction; diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/PoolAllocator.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/PoolAllocator.h index 1392d1a59d..70a9937b1c 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/PoolAllocator.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/PoolAllocator.h @@ -51,7 +51,7 @@ namespace AZ VirtualAddress Allocate(size_t byteCount, size_t byteAlignment) override; void DeAllocate(VirtualAddress allocation) override; void GarbageCollect() override; - void GarbageCollectForce(); + void GarbageCollectForce() override; size_t GetAllocationCount() const override; size_t GetAllocatedByteCount() const override; const Descriptor& GetDescriptor() const override; diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/ShaderResourceGroupPool.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/ShaderResourceGroupPool.h index 44bf80a980..a8775f8625 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/ShaderResourceGroupPool.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/ShaderResourceGroupPool.h @@ -38,7 +38,7 @@ namespace AZ ResultCode InitGroup(ShaderResourceGroup& srg); //! Returns the descriptor passed at initialization time. - const ShaderResourceGroupPoolDescriptor& GetDescriptor() const; + const ShaderResourceGroupPoolDescriptor& GetDescriptor() const override; //! Returns the SRG layout used when initializing the pool. const ShaderResourceGroupLayout* GetLayout() const; diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h index 85b782aa6b..2eef783932 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h @@ -16,7 +16,10 @@ #include #include + +AZ_PUSH_DISABLE_WARNING(4265, "-Wunknown-warning-option") // class has virtual functions, but its non-trivial destructor is not virtual; #include +AZ_POP_DISABLE_WARNING #include #include diff --git a/Gems/Atom/RHI/Null/Code/Source/RHI.Builders/ShaderPlatformInterface.h b/Gems/Atom/RHI/Null/Code/Source/RHI.Builders/ShaderPlatformInterface.h index 0a03211ca6..a9176ac750 100644 --- a/Gems/Atom/RHI/Null/Code/Source/RHI.Builders/ShaderPlatformInterface.h +++ b/Gems/Atom/RHI/Null/Code/Source/RHI.Builders/ShaderPlatformInterface.h @@ -34,7 +34,7 @@ namespace AZ const AssetBuilderSDK::PlatformInfo& platform, const AZStd::string& shaderSourcePath, const AZStd::string& functionName, RHI::ShaderHardwareStage shaderStage, const AZStd::string& tempFolderPath, StageDescriptor& outputDescriptor, const RHI::ShaderCompilerArguments& shaderCompilerArguments) const override; - AZStd::string GetAzslCompilerWarningParameters(const RHI::ShaderCompilerArguments& shaderCompilerArguments) const; + AZStd::string GetAzslCompilerWarningParameters(const RHI::ShaderCompilerArguments& shaderCompilerArguments) const override; bool BuildHasDebugInfo(const RHI::ShaderCompilerArguments& shaderCompilerArguments) const override; const char* GetAzslHeader(const AssetBuilderSDK::PlatformInfo& platform) const override; bool BuildPipelineLayoutDescriptor( 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/Include/Atom/RPI.Public/Pass/PassFilter.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassFilter.h index 5429dc13c0..c31f353adb 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassFilter.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassFilter.h @@ -53,6 +53,8 @@ namespace AZ //! Construct filter with only pass name. PassHierarchyFilter(const Name& passName); + virtual ~PassHierarchyFilter() = default; + //! Construct filter with pass name and its parents' names in the order of the hierarchy //! This means k-th element is always an ancestor of the (k-1)-th element. //! And the last element is the pass name. 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/Atom/RPI/Code/Tests/Common/RHI/Stubs.h b/Gems/Atom/RPI/Code/Tests/Common/RHI/Stubs.h index c3768c1ce6..2ed2875cad 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/RHI/Stubs.h +++ b/Gems/Atom/RPI/Code/Tests/Common/RHI/Stubs.h @@ -69,8 +69,8 @@ namespace UnitTest void FillFormatsCapabilitiesInternal([[maybe_unused]] FormatCapabilitiesList& formatsCapabilities) override {} AZ::RHI::ResultCode InitializeLimits() override { return AZ::RHI::ResultCode::Success; } void PreShutdown() override {} - AZ::RHI::ResourceMemoryRequirements GetResourceMemoryRequirements([[maybe_unused]] const AZ::RHI::ImageDescriptor& descriptor) { return AZ::RHI::ResourceMemoryRequirements{}; }; - AZ::RHI::ResourceMemoryRequirements GetResourceMemoryRequirements([[maybe_unused]] const AZ::RHI::BufferDescriptor& descriptor) { return AZ::RHI::ResourceMemoryRequirements{}; }; + AZ::RHI::ResourceMemoryRequirements GetResourceMemoryRequirements([[maybe_unused]] const AZ::RHI::ImageDescriptor& descriptor) override { return AZ::RHI::ResourceMemoryRequirements{}; }; + AZ::RHI::ResourceMemoryRequirements GetResourceMemoryRequirements([[maybe_unused]] const AZ::RHI::BufferDescriptor& descriptor) override { return AZ::RHI::ResourceMemoryRequirements{}; }; void ObjectCollectionNotify(AZ::RHI::ObjectCollectorNotifyFunction notifyFunction) override {} }; @@ -228,12 +228,12 @@ namespace UnitTest AZ_CLASS_ALLOCATOR(Fence, AZ::SystemAllocator, 0); private: - virtual AZ::RHI::ResultCode InitInternal(AZ::RHI::Device&, AZ::RHI::FenceState) override { return AZ::RHI::ResultCode::Success; } - virtual void ShutdownInternal() override {} - virtual void SignalOnCpuInternal() override {} - virtual void WaitOnCpuInternal() const override {}; - virtual void ResetInternal() override {} - virtual AZ::RHI::FenceState GetFenceStateInternal() const override { return AZ::RHI::FenceState::Reset; } + AZ::RHI::ResultCode InitInternal(AZ::RHI::Device&, AZ::RHI::FenceState) override { return AZ::RHI::ResultCode::Success; } + void ShutdownInternal() override {} + void SignalOnCpuInternal() override {} + void WaitOnCpuInternal() const override {}; + void ResetInternal() override {} + AZ::RHI::FenceState GetFenceStateInternal() const override { return AZ::RHI::FenceState::Reset; } }; class ShaderResourceGroupPool @@ -276,7 +276,7 @@ namespace UnitTest AZ_CLASS_ALLOCATOR(ShaderStageFunction, AZ::SystemAllocator, 0); private: - virtual AZ::RHI::ResultCode FinalizeInternal() { return AZ::RHI::ResultCode::Success; } + AZ::RHI::ResultCode FinalizeInternal() override { return AZ::RHI::ResultCode::Success; } }; class PipelineState diff --git a/Gems/Atom/RPI/Code/Tests/Common/SerializeTester.h b/Gems/Atom/RPI/Code/Tests/Common/SerializeTester.h index 8422756837..df21d13fc0 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/SerializeTester.h +++ b/Gems/Atom/RPI/Code/Tests/Common/SerializeTester.h @@ -23,6 +23,7 @@ namespace UnitTest : m_serializeContext{serializeContext} , m_outStream{&m_buffer} {} + virtual ~SerializeTester() = default; // Serializes an object out to a the internal stream. Resets the stream with each call. virtual void SerializeOut(T* object, AZ::DataStream::StreamType streamType = AZ::DataStream::ST_XML); @@ -76,7 +77,7 @@ namespace UnitTest m_assetHandler = AZ::Data::AssetManager::Instance().GetHandler(AssetDataT::RTTI_Type()); } - ~AssetTester() = default; + virtual ~AssetTester() = default; void SerializeOut(AZ::Data::Asset assetToSave) { diff --git a/Gems/Atom/RPI/Code/Tests/Image/StreamingImageTests.cpp b/Gems/Atom/RPI/Code/Tests/Image/StreamingImageTests.cpp index 345637bfe5..f7476c0bc4 100644 --- a/Gems/Atom/RPI/Code/Tests/Image/StreamingImageTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Image/StreamingImageTests.cpp @@ -40,10 +40,9 @@ namespace AZ : public UnitTest::AssetTester { public: - StreamingImageAssetTester() - { + StreamingImageAssetTester() = default; + ~StreamingImageAssetTester() override = default; - } void SetAssetReady(Data::Asset& asset) override { asset->SetReady(); @@ -54,7 +53,8 @@ namespace AZ : public UnitTest::AssetTester { public: - ImageMipChainAssetTester() {} + ImageMipChainAssetTester() = default; + ~ImageMipChainAssetTester() override = default; void SetAssetReady(Data::Asset& asset) override { diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialFunctorTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialFunctorTests.cpp index 0c84484508..e1e8c91944 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialFunctorTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialFunctorTests.cpp @@ -41,6 +41,7 @@ namespace UnitTest { } + using MaterialFunctor::Process; void Process(MaterialFunctor::RuntimeContext& context) override { m_processResult = context.SetShaderOptionValue(0, m_shaderOptionIndex, m_shaderOptionValue); @@ -65,6 +66,7 @@ namespace UnitTest public: MOCK_METHOD0(ProcessCalled, void()); + using MaterialFunctor::Process; void Process(RuntimeContext& context) override { ProcessCalled(); @@ -87,6 +89,7 @@ namespace UnitTest : public MaterialFunctorSourceData { public: + using MaterialFunctorSourceData::CreateFunctor; FunctorResult CreateFunctor(const RuntimeContext& context) const override { Ptr functor = aznew PropertyDependencyTestFunctor; diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertySerializerTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertySerializerTests.cpp index 5386af1cfa..ce842d385d 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertySerializerTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertySerializerTests.cpp @@ -21,14 +21,14 @@ namespace JsonSerializationTests public JsonSerializerConformityTestDescriptor { public: - void Reflect(AZStd::unique_ptr& context) + void Reflect(AZStd::unique_ptr& context) override { AZ::RPI::MaterialTypeSourceData::Reflect(context.get()); AZ::RPI::MaterialPropertyDescriptor::Reflect(context.get()); AZ::RPI::ReflectMaterialDynamicMetadata(context.get()); } - void Reflect(AZStd::unique_ptr& context) + void Reflect(AZStd::unique_ptr& context) override { AZ::RPI::MaterialTypeSourceData::Reflect(context.get()); } diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertyValueSourceDataTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertyValueSourceDataTests.cpp index 231558bb99..5dde21ece1 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertyValueSourceDataTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertyValueSourceDataTests.cpp @@ -142,6 +142,7 @@ namespace UnitTest AZStd::string m_propertyName; MaterialPropertyValueSourceData m_propertyValue; + using MaterialFunctorSourceData::CreateFunctor; FunctorResult CreateFunctor(const RuntimeContext& context) const override { Ptr functor = aznew ValueFunctor; diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeAssetTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeAssetTests.cpp index e11a049af2..b9774c84d9 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeAssetTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeAssetTests.cpp @@ -47,6 +47,7 @@ namespace UnitTest ; } + using AZ::RPI::MaterialFunctor::Process; void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override { // This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like. @@ -74,6 +75,7 @@ namespace UnitTest ; } + using AZ::RPI::MaterialFunctor::Process; void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override { // This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like. diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp index 5edf09b67d..179dc7c966 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp @@ -70,6 +70,7 @@ namespace UnitTest } } + using AZ::RPI::MaterialFunctor::Process; void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override { // This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like. @@ -110,6 +111,7 @@ namespace UnitTest AZStd::string m_floatPropertyInputId; AZStd::string m_float3ShaderSettingOutputId; + using MaterialFunctorSourceData::CreateFunctor; FunctorResult CreateFunctor(const RuntimeContext& context) const override { Ptr functor = aznew Splat3Functor; @@ -138,6 +140,7 @@ namespace UnitTest } } + using AZ::RPI::MaterialFunctor::Process; void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override { // This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like. @@ -174,6 +177,7 @@ namespace UnitTest m_shaderIndex{shaderIndex} {} + using MaterialFunctorSourceData::CreateFunctor; FunctorResult CreateFunctor(const RuntimeContext& context) const override { Ptr functor = aznew EnableShaderFunctor; @@ -200,6 +204,7 @@ namespace UnitTest } } + using AZ::RPI::MaterialFunctor::Process; void Process(AZ::RPI::MaterialFunctor::RuntimeContext& context) override { // This code isn't actually called in the unit test, but we include it here just to demonstrate what a real functor might look like. @@ -232,6 +237,7 @@ namespace UnitTest return options; } + using MaterialFunctorSourceData::CreateFunctor; FunctorResult CreateFunctor([[maybe_unused]] const RuntimeContext& context) const override { Ptr functor = aznew SetShaderOptionFunctor; diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h index 60ddf33cf7..1b718f7710 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h @@ -118,7 +118,7 @@ namespace AtomToolsFramework void ToggleFullScreenState() override; float GetDpiScaleFactor() const override; uint32_t GetSyncInterval() const override; - uint32_t GetDisplayRefreshRate() const; + uint32_t GetDisplayRefreshRate() const override; protected: // AzFramework::InputChannelEventListener ... diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h b/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h index 8862462093..b1a91b5aa5 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h +++ b/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h @@ -82,7 +82,7 @@ namespace AZ FontFamilyPtr LoadFontFamily(const char* fontFamilyName) override; FontFamilyPtr GetFontFamily(const char* fontFamilyName) override; void AddCharsToFontTextures(FontFamilyPtr fontFamily, const char* chars, int glyphSizeX = ICryFont::defaultGlyphSizeX, int glyphSizeY = ICryFont::defaultGlyphSizeY) override; - AZStd::string GetLoadedFontNames() const; + AZStd::string GetLoadedFontNames() const override; void OnLanguageChanged() override; void ReloadAllFonts() override; ////////////////////////////////////////////////////////////////////////////////// diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFontSystemComponent.h b/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFontSystemComponent.h index 02290e0fed..59f057ddaf 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFontSystemComponent.h +++ b/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFontSystemComponent.h @@ -38,7 +38,7 @@ namespace AZ //////////////////////////////////////////////////////////////////////// // CrySystemEventBus - void OnCrySystemInitialized(ISystem& system, const SSystemInitParams& initParams); + void OnCrySystemInitialized(ISystem& system, const SSystemInitParams& initParams) override; //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.h index 3e8feb2182..bd7c52c851 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.h @@ -75,7 +75,7 @@ namespace AZ //////////////////////////////////////////////////////////////////////// // AttachmentComponentRequests - void Reattach(bool detachFirst); + void Reattach(bool detachFirst) override; void Attach(AZ::EntityId targetId, const char* targetBoneName, const AZ::Transform& offset) override; void Detach() override; void SetAttachmentOffset(const AZ::Transform& offset) override; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SimplePointLightDelegate.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SimplePointLightDelegate.h index ef6c0b9da8..c239055be8 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SimplePointLightDelegate.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SimplePointLightDelegate.h @@ -31,8 +31,7 @@ namespace AZ float GetEffectiveSolidAngle() const override { return PhotometricValue::OmnidirectionalSteradians; } private: - virtual void HandleShapeChanged(); - + void HandleShapeChanged() override; }; } // namespace Render diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SimpleSpotLightDelegate.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SimpleSpotLightDelegate.h index 6b2b9bf4bb..7f9c4abc0f 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SimpleSpotLightDelegate.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SimpleSpotLightDelegate.h @@ -34,7 +34,7 @@ namespace AZ void SetShutterAngles(float innerAngleDegrees, float outerAngleDegrees) override; private: - virtual void HandleShapeChanged(); + void HandleShapeChanged() override; }; } // namespace Render diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.h index 2c7cc78979..6b0731fbf7 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.h @@ -30,9 +30,6 @@ namespace AZ { namespace Render { - - - //! A configuration structure for the MeshComponentController class MeshComponentConfig final : public AZ::ComponentConfig @@ -107,14 +104,14 @@ namespace AZ void SetLodType(RPI::Cullable::LodType lodType) override; RPI::Cullable::LodType GetLodType() const override; - virtual void SetLodOverride(RPI::Cullable::LodOverride lodOverride); - virtual RPI::Cullable::LodOverride GetLodOverride() const; + void SetLodOverride(RPI::Cullable::LodOverride lodOverride) override; + RPI::Cullable::LodOverride GetLodOverride() const override; - virtual void SetMinimumScreenCoverage(float minimumScreenCoverage); - virtual float GetMinimumScreenCoverage() const; + void SetMinimumScreenCoverage(float minimumScreenCoverage) override; + float GetMinimumScreenCoverage() const override; - virtual void SetQualityDecayRate(float qualityDecayRate); - virtual float GetQualityDecayRate() const; + void SetQualityDecayRate(float qualityDecayRate) override; + float GetQualityDecayRate() const override; void SetVisibility(bool visible) override; bool GetVisibility() const override; @@ -130,7 +127,7 @@ namespace AZ void OnTransformChanged(const AZ::Transform& local, const AZ::Transform& world) override; // MaterialReceiverRequestBus::Handler overrides ... - virtual MaterialAssignmentId FindMaterialAssignmentId( + MaterialAssignmentId FindMaterialAssignmentId( const MaterialAssignmentLodIndex lod, const AZStd::string& label) const override; RPI::ModelMaterialSlotMap GetModelMaterialSlots() const override; MaterialAssignmentMap GetMaterialAssignments() const override; diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.h index a74cc46e65..5ddab8bc61 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.h @@ -88,7 +88,7 @@ namespace AZ void UpdateBounds() override; void DebugDraw(const DebugOptions& debugOptions) override; void SetMaterials(const EMotionFX::Integration::ActorAsset::MaterialList& materialPerLOD) override { AZ_UNUSED(materialPerLOD); }; - void SetSkinningMethod(EMotionFX::Integration::SkinningMethod emfxSkinningMethod); + void SetSkinningMethod(EMotionFX::Integration::SkinningMethod emfxSkinningMethod) override; SkinningMethod GetAtomSkinningMethod() const; void SetIsVisible(bool isVisible) override; @@ -120,7 +120,7 @@ namespace AZ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// // MaterialReceiverRequestBus::Handler overrides... - virtual MaterialAssignmentId FindMaterialAssignmentId( + MaterialAssignmentId FindMaterialAssignmentId( const MaterialAssignmentLodIndex lod, const AZStd::string& label) const override; RPI::ModelMaterialSlotMap GetModelMaterialSlots() const override; MaterialAssignmentMap GetMaterialAssignments() const override; diff --git a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.h b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.h index 1bb6cef3de..3942a6b18a 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.h +++ b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.h @@ -73,11 +73,11 @@ namespace AudioControls void HandleExternalDropEvent(QDropEvent* pDropEvent); // ------------- IATLControlModelListener ---------------- - virtual void OnControlAdded(CATLControl* pControl) override; + void OnControlAdded(CATLControl* pControl) override; // ------------------------------------------------------- // ------------------ QWidget ---------------------------- - bool eventFilter(QObject* pObject, QEvent* pEvent); + bool eventFilter(QObject* pObject, QEvent* pEvent) override; // ------------------------------------------------------- private slots: diff --git a/Gems/AudioSystem/Code/Source/Editor/ATLControlsResourceDialog.h b/Gems/AudioSystem/Code/Source/Editor/ATLControlsResourceDialog.h index 10186f9c74..daa8c195c3 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ATLControlsResourceDialog.h +++ b/Gems/AudioSystem/Code/Source/Editor/ATLControlsResourceDialog.h @@ -63,7 +63,7 @@ namespace AudioControls QString GetWindowTitle(EACEControlType type) const; // ------------------ QWidget ---------------------------- - bool eventFilter(QObject* pObject, QEvent* pEvent); + bool eventFilter(QObject* pObject, QEvent* pEvent) override; // ------------------------------------------------------- // Filtering diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.h b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.h index bfa08828ac..abe5fd4511 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.h +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.h @@ -63,8 +63,8 @@ namespace AudioControls void Update(); protected: - void keyPressEvent(QKeyEvent* pEvent); - void closeEvent(QCloseEvent* pEvent); + void keyPressEvent(QKeyEvent* pEvent) override; + void closeEvent(QCloseEvent* pEvent) override; private: void UpdateAudioSystemData(); 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/BarrierInput/Code/Source/BarrierInputKeyboard.h b/Gems/BarrierInput/Code/Source/BarrierInputKeyboard.h index d7321faaec..946d0df11a 100644 --- a/Gems/BarrierInput/Code/Source/BarrierInputKeyboard.h +++ b/Gems/BarrierInput/Code/Source/BarrierInputKeyboard.h @@ -64,15 +64,15 @@ namespace BarrierInput //////////////////////////////////////////////////////////////////////////////////////////// //! \ref RawInputNotificationsBarrier::OnRawKeyboardKeyDownEvent - virtual void OnRawKeyboardKeyDownEvent(uint32_t scanCode, ModifierMask activeModifiers); + void OnRawKeyboardKeyDownEvent(uint32_t scanCode, ModifierMask activeModifiers) override; //////////////////////////////////////////////////////////////////////////////////////////// //! \ref RawInputNotificationsBarrier::OnRawKeyboardKeyUpEvent - virtual void OnRawKeyboardKeyUpEvent(uint32_t scanCode, ModifierMask activeModifiers); + void OnRawKeyboardKeyUpEvent(uint32_t scanCode, ModifierMask activeModifiers) override; //////////////////////////////////////////////////////////////////////////////////////////// //! \ref RawInputNotificationsBarrier::OnRawKeyboardKeyRepeatEvent - virtual void OnRawKeyboardKeyRepeatEvent(uint32_t scanCode, ModifierMask activeModifiers); + void OnRawKeyboardKeyRepeatEvent(uint32_t scanCode, ModifierMask activeModifiers) override; //////////////////////////////////////////////////////////////////////////////////////////// //! Thread safe method to queue raw key events to be processed in the main thread update 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/EMotionFX/Source/AnimGraphHubNode.h b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphHubNode.h index 6db908cf33..99ad6ced7d 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphHubNode.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphHubNode.h @@ -61,7 +61,7 @@ namespace EMotionFX bool GetSupportsVisualization() const override { return true; } AnimGraphPose* GetMainOutputPose(AnimGraphInstance* animGraphInstance) const override { return GetOutputPose(animGraphInstance, OUTPUTPORT_RESULT)->GetValue(); } bool GetHasOutputPose() const override { return true; } - bool GetCanBeEntryNode() const { return true; } + bool GetCanBeEntryNode() const override { return true; } bool GetCanBeInsideStateMachineOnly() const override { return true; } bool GetHasVisualOutputPorts() const override { return false; } bool GetCanHaveOnlyOneInsideParent() const override { return false; } diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.h b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.h index db4dc0ea3e..db1d6e1279 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.h @@ -82,8 +82,8 @@ namespace EMotionFX AnimGraphReferenceNode(); ~AnimGraphReferenceNode(); - void Reinit(); - void RecursiveReinit(); + void Reinit() override; + void RecursiveReinit() override; bool InitAfterLoading(AnimGraph* animGraph) override; AnimGraphObjectData* CreateUniqueData(AnimGraphInstance* animGraphInstance) override { return aznew UniqueData(this, animGraphInstance); } diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h index 318838b2b1..a11f11c6a8 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.h @@ -290,7 +290,7 @@ namespace EMStudio /// CommandManagerCallback implementation void OnPreExecuteCommand(MCore::CommandGroup* group, MCore::Command* command, const MCore::CommandLine& commandLine) override; void OnPostExecuteCommand(MCore::CommandGroup* /*group*/, MCore::Command* /*command*/, const MCore::CommandLine& /*commandLine*/, bool /*wasSuccess*/, const AZStd::string& /*outResult*/) override { } - void OnPreUndoCommand(MCore::Command* command, const MCore::CommandLine& commandLine); + void OnPreUndoCommand(MCore::Command* command, const MCore::CommandLine& commandLine) override; void OnPreExecuteCommandGroup(MCore::CommandGroup* /*group*/, bool /*undo*/) override { } void OnPostExecuteCommandGroup(MCore::CommandGroup* /*group*/, bool /*wasSuccess*/) override { } void OnAddCommandToHistory(size_t /*historyIndex*/, MCore::CommandGroup* /*group*/, MCore::Command* /*command*/, const MCore::CommandLine& /*commandLine*/) override { } diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ManipulatorCallbacks.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ManipulatorCallbacks.h index 902354931a..2f9201ffa9 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ManipulatorCallbacks.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ManipulatorCallbacks.h @@ -42,6 +42,7 @@ namespace EMStudio /** * update the actor instance. */ + using MCommon::ManipulatorCallback::Update; void Update(const AZ::Vector3& value) override; /** @@ -85,6 +86,7 @@ namespace EMStudio /** * update the actor instance. */ + using MCommon::ManipulatorCallback::Update; void Update(const AZ::Quaternion& value) override; /** @@ -125,6 +127,7 @@ namespace EMStudio /** * update the actor instance. */ + using MCommon::ManipulatorCallback::Update; void Update(const AZ::Vector3& value) override; /** diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.h index 01678e024d..6e4a68fa6f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.h @@ -95,7 +95,7 @@ namespace EMStudio virtual bool CreateEMStudioActor(EMotionFX::Actor* actor) = 0; // SkeletonOutlinerNotificationBus - void ZoomToJoints(EMotionFX::ActorInstance* actorInstance, const AZStd::vector& joints); + void ZoomToJoints(EMotionFX::ActorInstance* actorInstance, const AZStd::vector& joints) override; // ActorNotificationBus void OnActorReady(EMotionFX::Actor* actor) override; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderWidget.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderWidget.h index d4906355da..01644362de 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderWidget.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderWidget.h @@ -81,8 +81,8 @@ namespace EMStudio // overloaded const AZStd::vector GetHandledEventTypes() const override { return { EMotionFX::EVENT_TYPE_ON_DRAW_LINE, EMotionFX::EVENT_TYPE_ON_DRAW_TRIANGLE, EMotionFX::EVENT_TYPE_ON_DRAW_TRIANGLES }; } - MCORE_INLINE void OnDrawTriangle(const AZ::Vector3& posA, const AZ::Vector3& posB, const AZ::Vector3& posC, const AZ::Vector3& normalA, const AZ::Vector3& normalB, const AZ::Vector3& normalC, uint32 color) { m_widget->AddTriangle(posA, posB, posC, normalA, normalB, normalC, color); } - MCORE_INLINE void OnDrawTriangles() { m_widget->RenderTriangles(); } + MCORE_INLINE void OnDrawTriangle(const AZ::Vector3& posA, const AZ::Vector3& posB, const AZ::Vector3& posC, const AZ::Vector3& normalA, const AZ::Vector3& normalB, const AZ::Vector3& normalC, uint32 color) override { m_widget->AddTriangle(posA, posB, posC, normalA, normalB, normalC, color); } + MCORE_INLINE void OnDrawTriangles() override { m_widget->RenderTriangles(); } private: RenderWidget* m_widget; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/GLWidget.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/GLWidget.h index 685ff4ef88..f821a7710e 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/GLWidget.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/GLWidget.h @@ -53,7 +53,7 @@ namespace EMStudio void initializeGL() override; void paintGL() override; - void resizeGL(int width, int height); + void resizeGL(int width, int height) override; private slots: void CloneSelectedActorInstances() { CommandSystem::CloneSelectedActorInstances(); } @@ -64,16 +64,16 @@ namespace EMStudio void ResetToBindPose() { CommandSystem::ResetToBindPose(); } protected: - void mouseMoveEvent(QMouseEvent* event) { RenderWidget::OnMouseMoveEvent(this, event); } - void mousePressEvent(QMouseEvent* event) { RenderWidget::OnMousePressEvent(this, event); } - void mouseReleaseEvent(QMouseEvent* event) { RenderWidget::OnMouseReleaseEvent(this, event); } - void wheelEvent(QWheelEvent* event) { RenderWidget::OnWheelEvent(this, event); } + void mouseMoveEvent(QMouseEvent* event) override { RenderWidget::OnMouseMoveEvent(this, event); } + void mousePressEvent(QMouseEvent* event) override { RenderWidget::OnMousePressEvent(this, event); } + void mouseReleaseEvent(QMouseEvent* event) override { RenderWidget::OnMouseReleaseEvent(this, event); } + void wheelEvent(QWheelEvent* event) override { RenderWidget::OnWheelEvent(this, event); } - void focusInEvent(QFocusEvent* event); - void focusOutEvent(QFocusEvent* event); + void focusInEvent(QFocusEvent* event) override; + void focusOutEvent(QFocusEvent* event) override; - void Render(); - void Update() { update(); } + void Render() override; + void Update() override { update(); } void RenderBorder(const MCore::RGBAColor& color); RenderGL::GBuffer m_gBuffer; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/OpenGLRenderPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/OpenGLRenderPlugin.h index 1203d7e381..ba2bb0f462 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/OpenGLRenderPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/OpenGLRenderPlugin.h @@ -43,8 +43,8 @@ namespace EMStudio bool GetIsVertical() const override { return false; } // overloaded main init function - bool Init(); - EMStudioPlugin* Clone() { return new OpenGLRenderPlugin(); } + bool Init() override; + EMStudioPlugin* Clone() override { return new OpenGLRenderPlugin(); } // overloaded functions void CreateRenderWidget(RenderViewWidget* renderViewWidget, RenderWidget** outRenderWidget, QWidget** outWidget) override; @@ -57,7 +57,7 @@ namespace EMStudio RenderGL::GraphicsManager* m_graphicsManager; // shared OpenGL engine object // overloaded emstudio actor create function which creates an OpenGL render actor internally - bool CreateEMStudioActor(EMotionFX::Actor* actor); + bool CreateEMStudioActor(EMotionFX::Actor* actor) override; void RenderActorInstance(EMotionFX::ActorInstance* actorInstance, float timePassedInSeconds) override; }; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphItemDelegate.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphItemDelegate.h index 4066601cf5..c2c7499727 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphItemDelegate.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphItemDelegate.h @@ -28,7 +28,7 @@ namespace EMStudio void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override; - void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; + void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override; signals: void linkActivated(const QString& link); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AttributesWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AttributesWindow.h index 38bceb4426..b19304b898 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AttributesWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AttributesWindow.h @@ -152,7 +152,7 @@ namespace EMStudio void OnDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles); private: AddConditionButton* m_addConditionButton = nullptr; - void contextMenuEvent(QContextMenuEvent* event); + void contextMenuEvent(QContextMenuEvent* event) override; void PasteTransition(bool pasteTransitionProperties, bool pasteConditions); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendTreeVisualNode.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendTreeVisualNode.h index a72985cae6..ef87fc9a00 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendTreeVisualNode.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendTreeVisualNode.h @@ -34,11 +34,11 @@ namespace EMStudio ~BlendTreeVisualNode(); void Sync() override; - uint32 GetType() const { return BlendTreeVisualNode::TYPE_ID; } + uint32 GetType() const override { return BlendTreeVisualNode::TYPE_ID; } void Render(QPainter& painter, QPen* pen, bool renderShadow) override; - int32 CalcRequiredHeight() const; + int32 CalcRequiredHeight() const override; private: QColor GetPortColor(const EMotionFX::AnimGraphNode::Port& port) const; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterEditor/RotationParameterEditor.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterEditor/RotationParameterEditor.cpp index 805ef16b7d..18727f67d2 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterEditor/RotationParameterEditor.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterEditor/RotationParameterEditor.cpp @@ -142,6 +142,7 @@ namespace EMStudio , m_manipulatorCallback(manipulatorCallback) {} + using MCommon::ManipulatorCallback::Update; void Update(const AZ::Quaternion& value) override { // call the base class update function diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterEditor/Vector3GizmoParameterEditor.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterEditor/Vector3GizmoParameterEditor.cpp index cc97f9d979..7a24ece95a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterEditor/Vector3GizmoParameterEditor.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/ParameterEditor/Vector3GizmoParameterEditor.cpp @@ -152,6 +152,7 @@ namespace EMStudio , m_manipulatorCallback(manipulatorCallback) {} + using MCommon::ManipulatorCallback::Update; void Update(const AZ::Vector3& value) override { // call the base class update function diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackHeaderWidget.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackHeaderWidget.h index b794f248f6..2839e52e11 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackHeaderWidget.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackHeaderWidget.h @@ -70,8 +70,8 @@ namespace EMStudio void NameEdited(const QString& text); void EnabledCheckBoxChanged(int state); - void keyPressEvent(QKeyEvent* event); - void keyReleaseEvent(QKeyEvent* event); + void keyPressEvent(QKeyEvent* event) override; + void keyReleaseEvent(QKeyEvent* event) 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/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp index b5a252e293..56c22bb1ff 100644 --- a/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp @@ -115,7 +115,7 @@ namespace EMotionFX public: AZ_CLASS_ALLOCATOR(EMotionFXEventHandler, EMotionFXAllocator, 0); - const AZStd::vector GetHandledEventTypes() const + const AZStd::vector GetHandledEventTypes() const override { return { EVENT_TYPE_ON_EVENT, diff --git a/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.h b/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.h index 7d0c3f4725..a716f0aa9b 100644 --- a/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.h +++ b/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.h @@ -110,7 +110,7 @@ namespace EMotionFX #if defined (EMOTIONFXANIMATION_EDITOR) void UpdateAnimationEditorPlugins(float delta); void NotifyRegisterViews() override; - bool IsSystemActive(EditorAnimationSystemRequests::AnimationSystem systemType); + bool IsSystemActive(EditorAnimationSystemRequests::AnimationSystem systemType) override; ////////////////////////////////////////////////////////////////////////////////////// // AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphTransitionCommandTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphTransitionCommandTests.cpp index 49d53f1f91..bb13744b46 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphTransitionCommandTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphTransitionCommandTests.cpp @@ -62,14 +62,14 @@ namespace EMotionFX m_motionNodeAnimGraph->InitAfterLoading(); } - void SetUp() + void SetUp() override { AnimGraphFixture::SetUp(); m_animGraphInstance->Destroy(); m_animGraphInstance = m_motionNodeAnimGraph->GetAnimGraphInstance(m_actorInstance, m_motionSet); } - void TearDown() + void TearDown() override { AnimGraphFixture::TearDown(); } diff --git a/Gems/EMotionFX/Code/Tests/Mocks/AnimGraphInstance.h b/Gems/EMotionFX/Code/Tests/Mocks/AnimGraphInstance.h index e04f19fa95..b2375180e6 100644 --- a/Gems/EMotionFX/Code/Tests/Mocks/AnimGraphInstance.h +++ b/Gems/EMotionFX/Code/Tests/Mocks/AnimGraphInstance.h @@ -11,6 +11,8 @@ namespace EMotionFX class AnimGraphInstance { public: + virtual ~AnimGraphInstance() = default; + //void Output(Pose* outputPose); //void Start(); //void Stop(); diff --git a/Gems/EMotionFX/Code/Tests/Mocks/AnimGraphNode.h b/Gems/EMotionFX/Code/Tests/Mocks/AnimGraphNode.h index 9c73694d2a..065be187c8 100644 --- a/Gems/EMotionFX/Code/Tests/Mocks/AnimGraphNode.h +++ b/Gems/EMotionFX/Code/Tests/Mocks/AnimGraphNode.h @@ -14,6 +14,8 @@ namespace EMotionFX public: AZ_RTTI(AnimGraphNode, "{7F1C0E1D-4D32-4A6D-963C-20193EA28F95}", AnimGraphObject) + virtual ~AnimGraphNode() = default; + MOCK_CONST_METHOD1(CollectOutgoingConnections, void(AZStd::vector>& outConnections)); MOCK_CONST_METHOD2(CollectOutgoingConnections, void(AZStd::vector>& outConnections, const size_t portIndex)); diff --git a/Gems/EMotionFX/Code/Tests/Mocks/CommandManager.h b/Gems/EMotionFX/Code/Tests/Mocks/CommandManager.h index 0146086f06..50a465f5da 100644 --- a/Gems/EMotionFX/Code/Tests/Mocks/CommandManager.h +++ b/Gems/EMotionFX/Code/Tests/Mocks/CommandManager.h @@ -11,7 +11,7 @@ namespace MCore class CommandManager { public: - //virtual ~CommandManager(); + virtual ~CommandManager() = default; //bool ExecuteCommand(const char* command, AZStd::string& outCommandResult, bool addToHistory = true, Command** outExecutedCommand = nullptr, CommandLine* outExecutedParamters = nullptr, bool callFromCommandGroup = false, bool clearErrors = true, bool handleErrors = true); //bool ExecuteCommand(const AZStd::string& command, AZStd::string& outCommandResult, bool addToHistory = true, Command** outExecutedCommand = nullptr, CommandLine* outExecutedParamters = nullptr, bool callFromCommandGroup = false, bool clearErrors = true, bool handleErrors = true); diff --git a/Gems/EMotionFX/Code/Tests/Mocks/CommandSystemCommandManager.h b/Gems/EMotionFX/Code/Tests/Mocks/CommandSystemCommandManager.h index adef6392bb..b50e9bf8d5 100644 --- a/Gems/EMotionFX/Code/Tests/Mocks/CommandSystemCommandManager.h +++ b/Gems/EMotionFX/Code/Tests/Mocks/CommandSystemCommandManager.h @@ -12,6 +12,8 @@ namespace CommandSystem : public MCore::CommandManager { public: + virtual ~CommandManager() = default; + MOCK_METHOD0(GetCurrentSelection, SelectionList&()); MOCK_METHOD1(SetCurrentSelection, void(SelectionList& selection)); MOCK_CONST_METHOD0(GetLockSelection, bool()); diff --git a/Gems/EMotionFX/Code/Tests/MotionEventTrackTests.cpp b/Gems/EMotionFX/Code/Tests/MotionEventTrackTests.cpp index 30ab36e35a..08d67b8bee 100644 --- a/Gems/EMotionFX/Code/Tests/MotionEventTrackTests.cpp +++ b/Gems/EMotionFX/Code/Tests/MotionEventTrackTests.cpp @@ -122,7 +122,7 @@ namespace EMotionFX { } - virtual const AZStd::vector GetHandledEventTypes() const + const AZStd::vector GetHandledEventTypes() const override { return { EVENT_TYPE_ON_EVENT }; } diff --git a/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp b/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp index 139337ef00..cecbf15c5a 100644 --- a/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp +++ b/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp @@ -512,6 +512,8 @@ namespace EditorPythonBindings GetGemSourcePathsVisitor(AZ::SettingsRegistryInterface& settingsRegistry) : m_settingsRegistry(settingsRegistry) {} + + using AZ::SettingsRegistryInterface::Visitor::Visit; void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override { diff --git a/Gems/EditorPythonBindings/Code/Tests/PythonAssetTypesTests.cpp b/Gems/EditorPythonBindings/Code/Tests/PythonAssetTypesTests.cpp index 78ac2a0a45..9940a01b7a 100644 --- a/Gems/EditorPythonBindings/Code/Tests/PythonAssetTypesTests.cpp +++ b/Gems/EditorPythonBindings/Code/Tests/PythonAssetTypesTests.cpp @@ -116,7 +116,7 @@ namespace UnitTest return AZ::Data::AssetType("{7FD86523-3903-4037-BCD1-542027BFC553}"); } - virtual const char* GetFileFilter() const + const char* GetFileFilter() const override { return nullptr; } 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/GameStateSamples/Code/Source/GameStateSamplesModule.cpp b/Gems/GameStateSamples/Code/Source/GameStateSamplesModule.cpp index f175619bf4..a83a5abdd1 100644 --- a/Gems/GameStateSamples/Code/Source/GameStateSamplesModule.cpp +++ b/Gems/GameStateSamples/Code/Source/GameStateSamplesModule.cpp @@ -84,7 +84,7 @@ namespace GameStateSamples } protected: - void OnCrySystemInitialized(ISystem& system, const SSystemInitParams& systemInitParams) + void OnCrySystemInitialized(ISystem& system, const SSystemInitParams& systemInitParams) override { CryHooksModule::OnCrySystemInitialized(system, systemInitParams); diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/Editor/EditorGradientComponentBase.h b/Gems/GradientSignal/Code/Include/GradientSignal/Editor/EditorGradientComponentBase.h index 1eac48a109..2083837934 100644 --- a/Gems/GradientSignal/Code/Include/GradientSignal/Editor/EditorGradientComponentBase.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Editor/EditorGradientComponentBase.h @@ -92,7 +92,7 @@ namespace GradientSignal using BaseClassType::m_component; using BaseClassType::m_configuration; - virtual AZ::u32 ConfigurationChanged(); + AZ::u32 ConfigurationChanged() override; // This is used by the preview so we can pass an invalid entity Id if our component is disabled AZ::EntityId GetGradientEntityId() const; diff --git a/Gems/GradientSignal/Code/Source/UI/GradientPreviewDataWidget.h b/Gems/GradientSignal/Code/Source/UI/GradientPreviewDataWidget.h index 3aa5987924..7fc3a53463 100644 --- a/Gems/GradientSignal/Code/Source/UI/GradientPreviewDataWidget.h +++ b/Gems/GradientSignal/Code/Source/UI/GradientPreviewDataWidget.h @@ -66,7 +66,7 @@ namespace GradientSignal AZ::u32 GetHandlerName() const override; bool ReadValueIntoGUI(size_t index, GradientPreviewDataWidget* GUI, void* value, const AZ::Uuid& propertyType) override; - void ConsumeAttribute(GradientPreviewDataWidget* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName); + void ConsumeAttribute(GradientPreviewDataWidget* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override; QWidget* CreateGUI(QWidget* pParent) override; void PreventRefresh(QWidget* widget, bool shouldPrevent) override; diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.h b/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.h index cf3843ce4a..9c0d8be588 100644 --- a/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.h +++ b/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.h @@ -174,8 +174,8 @@ namespace UnitTest } AZ::EntityId GetPreviewEntity() const override { return m_id; } - virtual AZ::Aabb GetPreviewBounds() const { return m_previewBounds; } - virtual bool GetConstrainToShape() const { return m_constrainToShape; } + AZ::Aabb GetPreviewBounds() const override { return m_previewBounds; } + bool GetConstrainToShape() const override { return m_constrainToShape; } protected: AZ::EntityId m_id; diff --git a/Gems/GraphCanvas/Code/Include/GraphCanvas/Widgets/RootGraphicsItem.h b/Gems/GraphCanvas/Code/Include/GraphCanvas/Widgets/RootGraphicsItem.h index cd7283c53c..e7c884da92 100644 --- a/Gems/GraphCanvas/Code/Include/GraphCanvas/Widgets/RootGraphicsItem.h +++ b/Gems/GraphCanvas/Code/Include/GraphCanvas/Widgets/RootGraphicsItem.h @@ -163,14 +163,14 @@ namespace GraphCanvas } // StateController - void OnStateChanged([[maybe_unused]] const RootGraphicsItemDisplayState& displayState) + void OnStateChanged([[maybe_unused]] const RootGraphicsItemDisplayState& displayState) override { UpdateActualDisplayState(); } //// // TickBus - void OnTick(float delta, AZ::ScriptTimePoint) + void OnTick(float delta, AZ::ScriptTimePoint) override { m_currentAnimationTime += delta; @@ -191,7 +191,7 @@ namespace GraphCanvas //// // RootGraphicsItemRequestBus - void AnimatePositionTo(const QPointF& scenePoint, const AZStd::chrono::milliseconds& duration) + void AnimatePositionTo(const QPointF& scenePoint, const AZStd::chrono::milliseconds& duration) override { if (!IsAnimating()) { @@ -231,7 +231,7 @@ namespace GraphCanvas GeometryRequestBus::Event(GetEntityId(), &GeometryRequests::SetAnimationTarget, m_targetPoint); } - void CancelAnimation() + void CancelAnimation() override { m_currentAnimationTime = m_animationDuration; CleanUpAnimation(); @@ -315,7 +315,7 @@ namespace GraphCanvas } } - RootGraphicsItemEnabledState GetEnabledState() const + RootGraphicsItemEnabledState GetEnabledState() const override { return m_enabledState; } diff --git a/Gems/GraphCanvas/Code/Source/Components/BookmarkAnchor/BookmarkAnchorVisualComponent.h b/Gems/GraphCanvas/Code/Source/Components/BookmarkAnchor/BookmarkAnchorVisualComponent.h index 2e2d9b9ab0..7e7ac6489f 100644 --- a/Gems/GraphCanvas/Code/Source/Components/BookmarkAnchor/BookmarkAnchorVisualComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/BookmarkAnchor/BookmarkAnchorVisualComponent.h @@ -57,7 +57,7 @@ namespace GraphCanvas //// // StyleNotificationBus - void OnStyleChanged(); + void OnStyleChanged() override; //// // GeometryNotificationBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Connections/ConnectionLayerControllerComponent.h b/Gems/GraphCanvas/Code/Source/Components/Connections/ConnectionLayerControllerComponent.h index f991409b17..2532492d64 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Connections/ConnectionLayerControllerComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Connections/ConnectionLayerControllerComponent.h @@ -39,7 +39,7 @@ namespace GraphCanvas //// // LayerControllerNotificationBus - void OnOffsetsChanged(int selectionOffset, int groupOffset); + void OnOffsetsChanged(int selectionOffset, int groupOffset) override; //// private: diff --git a/Gems/GraphCanvas/Code/Source/Components/GeometryComponent.h b/Gems/GraphCanvas/Code/Source/Components/GeometryComponent.h index 1c7bf39445..61b66bcbf9 100644 --- a/Gems/GraphCanvas/Code/Source/Components/GeometryComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/GeometryComponent.h @@ -69,7 +69,7 @@ namespace GraphCanvas void SetIsPositionAnimating(bool animating) override; - void SetAnimationTarget(const AZ::Vector2& targetPoint); + void SetAnimationTarget(const AZ::Vector2& targetPoint) override; //// // VisualNotificationBus diff --git a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/StringNodePropertyDisplay.h b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/StringNodePropertyDisplay.h index ac179832d3..1e50262194 100644 --- a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/StringNodePropertyDisplay.h +++ b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/StringNodePropertyDisplay.h @@ -81,7 +81,7 @@ namespace GraphCanvas //// // AZ::SystemTickBus::Handler - void OnSystemTick(); + void OnSystemTick() override; //// private: diff --git a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/VectorNodePropertyDisplay.h b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/VectorNodePropertyDisplay.h index e0c50821a8..9c12dae08e 100644 --- a/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/VectorNodePropertyDisplay.h +++ b/Gems/GraphCanvas/Code/Source/Components/NodePropertyDisplays/VectorNodePropertyDisplay.h @@ -95,7 +95,7 @@ namespace GraphCanvas //// // DataSlotNotifications - void OnDragDropStateStateChanged(const DragDropState& dragState); + void OnDragDropStateStateChanged(const DragDropState& dragState) override; //// private: diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeFrameComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeFrameComponent.h index 0c85f366ed..9baeccb78f 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeFrameComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeFrameComponent.h @@ -65,7 +65,7 @@ namespace GraphCanvas //// // NodeNotifications - void OnNodeActivated(); + void OnNodeActivated() override; //// private: diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeLayoutComponent.h index 057261743f..8e2692ce0e 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeLayoutComponent.h @@ -50,9 +50,9 @@ namespace GraphCanvas required.push_back(AZ_CRC("GraphCanvas_StyledGraphicItemService", 0xeae4cdf4)); } - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // EntityBus @@ -64,7 +64,7 @@ namespace GraphCanvas //// // NodeNotification - void OnNodeActivated(); + void OnNodeActivated() override; //// protected: diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeTextComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeTextComponent.h index 36ddfeafe5..fa047d56a2 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeTextComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentNodeTextComponent.h @@ -82,7 +82,7 @@ namespace GraphCanvas //// // NodeNotification - void OnAddedToScene(const AZ::EntityId&); + void OnAddedToScene(const AZ::EntityId&) override; //// // CommentRequestBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentTextGraphicsWidget.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentTextGraphicsWidget.h index 1f6a4ce9a7..390fb1ef9e 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentTextGraphicsWidget.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Comment/CommentTextGraphicsWidget.h @@ -163,7 +163,7 @@ namespace GraphCanvas void SubmitValue(); void UpdateSizePolicies(); - bool sceneEventFilter(QGraphicsItem*, QEvent* event); + bool sceneEventFilter(QGraphicsItem*, QEvent* event) override; const AZ::EntityId& GetEntityId() const { return m_entityId; } void SetupProxyWidget(); diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeFrameComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeFrameComponent.h index f38157e82e..123f21f13d 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeFrameComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeFrameComponent.h @@ -68,7 +68,7 @@ namespace GraphCanvas //// // NodeNotifications - void OnNodeActivated(); + void OnNodeActivated() override; void OnNodeWrapped(const AZ::EntityId& wrappingNode) override; void OnNodeUnwrapped(const AZ::EntityId& wrappingNode) override; diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralSlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralSlotLayoutComponent.h index c9290021c9..397aea5a38 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralSlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralSlotLayoutComponent.h @@ -158,7 +158,7 @@ namespace GraphCanvas //// // SceneMemberNotificationBus - void OnSceneSet(const AZ::EntityId& sceneId); + void OnSceneSet(const AZ::EntityId& sceneId) override; //// // SlotLayoutRequestBus @@ -168,7 +168,7 @@ namespace GraphCanvas bool IsSlotGroupVisible(SlotGroup group) const override; void SetSlotGroupVisible(SlotGroup group, bool visible) override; - void ClearSlotGroup(SlotGroup group); + void ClearSlotGroup(SlotGroup group) override; //// // StyleNotificationBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/CollapsedNodeGroupComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/CollapsedNodeGroupComponent.h index 17ef858b52..fd9706f7ea 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/CollapsedNodeGroupComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/CollapsedNodeGroupComponent.h @@ -94,7 +94,7 @@ namespace GraphCanvas //// // GeometryNotifications - void OnBoundsChanged(); + void OnBoundsChanged() override; void OnPositionChanged(const AZ::EntityId& targetEntity, const AZ::Vector2& position) override; //// @@ -117,7 +117,7 @@ namespace GraphCanvas AZ::EntityId GetSourceGroup() const override; - AZStd::vector< Endpoint > GetRedirectedEndpoints() const; + AZStd::vector< Endpoint > GetRedirectedEndpoints() const override; void ForceEndpointRedirection(const AZStd::vector< Endpoint >& endpoints) override; //// diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupFrameComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupFrameComponent.h index 4f791d913d..cc54866ccb 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupFrameComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupFrameComponent.h @@ -239,7 +239,7 @@ namespace GraphCanvas //// // SystemTickBus - void OnSystemTick(); + void OnSystemTick() override; //// // VisualNotificationBus @@ -446,13 +446,13 @@ namespace GraphCanvas //// // CommentNotificationBus - void OnEditBegin(); - void OnEditEnd(); + void OnEditBegin() override; + void OnEditEnd() override; void OnCommentSizeChanged(const QSizeF& oldSize, const QSizeF& newSize) override; - void OnCommentFontReloadBegin(); - void OnCommentFontReloadEnd(); + void OnCommentFontReloadBegin() override; + void OnCommentFontReloadEnd() override; //// // QGraphicsItem diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupLayoutComponent.h index ec3bbdda28..5685702051 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/NodeGroupLayoutComponent.h @@ -61,13 +61,13 @@ namespace GraphCanvas //// // AZ::Component - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // NodeNotification - void OnNodeActivated(); + void OnNodeActivated() override; //// void UpdateLayoutParameters(); diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.h index 996ba2e8c9..4e2052555f 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.h @@ -109,7 +109,7 @@ namespace GraphCanvas void SetTranslationKeyedTooltip(const TranslationKeyedString& tooltip) override; const AZStd::string GetTooltip() const override { return m_configuration.GetTooltip(); } - void SetShowInOutliner(bool showInOutliner) { m_configuration.SetShowInOutliner(showInOutliner); } + void SetShowInOutliner(bool showInOutliner) override { m_configuration.SetShowInOutliner(showInOutliner); } bool ShowInOutliner() const override { return m_configuration.GetShowInOutliner(); } void AddSlot(const AZ::EntityId& slotId) override; diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Wrapper/WrapperNodeLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/Wrapper/WrapperNodeLayoutComponent.h index 4fa98dbadd..0423f061f6 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Wrapper/WrapperNodeLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Wrapper/WrapperNodeLayoutComponent.h @@ -155,9 +155,9 @@ namespace GraphCanvas required.push_back(AZ_CRC("GraphCanvas_StyledGraphicItemService", 0xeae4cdf4)); } - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // WrapperNodeRequestBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotComponent.h index d6c6b71771..fb76c2c80e 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotComponent.h @@ -29,9 +29,9 @@ namespace GraphCanvas ~DataSlotComponent(); // Component - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // SlotRequestBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Default/DefaultSlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Default/DefaultSlotLayoutComponent.h index 7d963af0bf..c1b6b5b0ac 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Default/DefaultSlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Default/DefaultSlotLayoutComponent.h @@ -43,7 +43,7 @@ namespace GraphCanvas //// // StyleNotificationBus - void OnStyleChanged(); + void OnStyleChanged() override; //// private: diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.h index 812bef7187..5df2b9f68c 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.h @@ -51,7 +51,7 @@ namespace GraphCanvas //// // StyleNotificationBus - void OnStyleChanged(); + void OnStyleChanged() override; //// private: @@ -88,9 +88,9 @@ namespace GraphCanvas ExecutionSlotLayoutComponent(); ~ExecutionSlotLayoutComponent() override = default; - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; private: ExecutionSlotLayout* m_layout; diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotComponent.h index 5ca93d5c26..b37704156d 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotComponent.h @@ -40,9 +40,9 @@ namespace GraphCanvas ~ExtenderSlotComponent(); // Component - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // SceneMemberNotifications diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.h index de8e95d7ff..ed477d40cf 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.h @@ -53,7 +53,7 @@ namespace GraphCanvas //// // StyleNotificationBus - void OnStyleChanged(); + void OnStyleChanged() override; //// private: @@ -82,9 +82,9 @@ namespace GraphCanvas ExtenderSlotLayoutComponent(); ~ExtenderSlotLayoutComponent() override = default; - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; private: diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotComponent.h index 309e4bb762..65e537458b 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotComponent.h @@ -27,9 +27,9 @@ namespace GraphCanvas ~PropertySlotComponent(); // Component - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // Slot RequestBus @@ -38,7 +38,7 @@ namespace GraphCanvas //// // PropertySlotBus - const AZ::Crc32& GetPropertyId() const; + const AZ::Crc32& GetPropertyId() const override; //// private: diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.h index 9b63882ec8..0891f51f06 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.h @@ -49,7 +49,7 @@ namespace GraphCanvas // SlotNotificationBus void OnRegisteredToNode(const AZ::EntityId& nodeId) override; - void OnTooltipChanged(const TranslationKeyedString& tooltip); + void OnTooltipChanged(const TranslationKeyedString& tooltip) override; //// // StyleNotificationBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.h index 319ffd7216..5afa3fbc14 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.h @@ -72,7 +72,7 @@ namespace GraphCanvas const AZ::EntityId& GetNode() const override; void SetNode(const AZ::EntityId&) override; - Endpoint GetEndpoint() const; + Endpoint GetEndpoint() const override; const AZStd::string GetName() const override { return m_slotConfiguration.m_name.GetDisplayString(); } void SetName(const AZStd::string& name) override; diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotLayoutComponent.h index 87917cbe29..d73018f40b 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotLayoutComponent.h @@ -52,16 +52,16 @@ namespace GraphCanvas required.push_back(AZ_CRC("GraphCanvas_SlotService", 0x701eaf6b)); } - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // VisualRequestBus QGraphicsItem* AsGraphicsItem() override; QGraphicsLayoutItem* AsGraphicsLayoutItem() override; - bool Contains(const AZ::Vector2& position) const; + bool Contains(const AZ::Vector2& position) const override; void SetVisible(bool visible) override; bool IsVisible() const override; //// diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotLayoutItem.h b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotLayoutItem.h index ee97284be8..98134a7362 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotLayoutItem.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotLayoutItem.h @@ -38,7 +38,7 @@ namespace GraphCanvas protected: // QGraphicsItem - void mousePressEvent(QGraphicsSceneMouseEvent* event) + void mousePressEvent(QGraphicsSceneMouseEvent* event) override { bool result = false; VisualNotificationBus::EventResult(result, GetEntityId(), &VisualNotifications::OnMousePress, GetEntityId(), event); @@ -48,7 +48,7 @@ namespace GraphCanvas } } - void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { bool result = false; VisualNotificationBus::EventResult(result, GetEntityId(), &VisualNotifications::OnMouseRelease, GetEntityId(), event); diff --git a/Gems/GraphCanvas/Code/Source/Widgets/NodePropertyDisplayWidget.h b/Gems/GraphCanvas/Code/Source/Widgets/NodePropertyDisplayWidget.h index dbd8a983cf..955ec490d6 100644 --- a/Gems/GraphCanvas/Code/Source/Widgets/NodePropertyDisplayWidget.h +++ b/Gems/GraphCanvas/Code/Source/Widgets/NodePropertyDisplayWidget.h @@ -45,7 +45,7 @@ namespace GraphCanvas //// // RootGraphicsItemNotificationBus - void OnDisplayStateChanged(RootGraphicsItemDisplayState oldState, RootGraphicsItemDisplayState newState); + void OnDisplayStateChanged(RootGraphicsItemDisplayState oldState, RootGraphicsItemDisplayState newState) override; //// // NodePropertiesRequestBus @@ -56,7 +56,7 @@ namespace GraphCanvas //// // NodePropertyRequestBus - void SetDisabled(bool disabled); + void SetDisabled(bool disabled) override; void SetNodePropertyDisplay(NodePropertyDisplay* nodePropertyDisplay) override; NodePropertyDisplay* GetNodePropertyDisplay() const override; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/GraphCanvasPropertyBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/GraphCanvasPropertyBus.h index 6dda23692b..2a26fc3fe0 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/GraphCanvasPropertyBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/GraphCanvasPropertyBus.h @@ -57,12 +57,12 @@ namespace GraphCanvas GraphCanvasPropertyBus::MultiHandler::BusDisconnect(); } - void AddBusId(const AZ::EntityId& busId) override final + void AddBusId(const AZ::EntityId& busId) final { GraphCanvasPropertyBus::MultiHandler::BusConnect(busId); } - void RemoveBusId(const AZ::EntityId& busId) override final + void RemoveBusId(const AZ::EntityId& busId) final { GraphCanvasPropertyBus::MultiHandler::BusDisconnect(busId); } @@ -86,12 +86,12 @@ namespace GraphCanvas void Init() override {}; - void Activate() + void Activate() override { GraphCanvasPropertyBusHandler::OnActivate(GetEntityId()); } - void Deactivate() + void Deactivate() override { GraphCanvasPropertyBusHandler::OnDeactivate(); } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/GraphicsItems/GlowOutlineGraphicsItem.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/GraphicsItems/GlowOutlineGraphicsItem.h index d54c34f8f0..05302ee889 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/GraphicsItems/GlowOutlineGraphicsItem.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/GraphicsItems/GlowOutlineGraphicsItem.h @@ -77,7 +77,7 @@ namespace GraphCanvas //// // SystemTick - void OnSystemTick(); + void OnSystemTick() override; //// // TickBus @@ -86,7 +86,7 @@ namespace GraphCanvas // GeometryNotificationBus::Handler void OnPositionChanged(const AZ::EntityId& /*targetEntity*/, const AZ::Vector2& /*position*/) override; - void OnBoundsChanged(); + void OnBoundsChanged() override; //// // ViewNotificationBus diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/SelectorImplementations.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/SelectorImplementations.h index 86b2cafdc9..1c65bf1915 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/SelectorImplementations.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/SelectorImplementations.h @@ -37,7 +37,7 @@ namespace GraphCanvas return 0; } - bool Matches([[maybe_unused]] const AZ::EntityId& object) const + bool Matches([[maybe_unused]] const AZ::EntityId& object) const override { return false; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/Style.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/Style.cpp index 166a333d24..048bdf1736 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/Style.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/Style.cpp @@ -129,7 +129,7 @@ namespace : public AZ::SerializeContext::IDataSerializer { /// Store the class data into a binary buffer - virtual size_t Save(const void* classPtr, AZ::IO::GenericStream& stream, bool isDataBigEndian /*= false*/) + size_t Save(const void* classPtr, AZ::IO::GenericStream& stream, bool isDataBigEndian /*= false*/) override { auto variant = reinterpret_cast(classPtr); @@ -142,7 +142,7 @@ namespace } /// Convert binary data to text - virtual size_t DataToText(AZ::IO::GenericStream& in, AZ::IO::GenericStream& out, bool isDataBigEndian /*= false*/) + size_t DataToText(AZ::IO::GenericStream& in, AZ::IO::GenericStream& out, bool isDataBigEndian /*= false*/) override { (void)isDataBigEndian; @@ -152,7 +152,7 @@ namespace } /// Convert text data to binary, to support loading old version formats. We must respect text version if the text->binary format has changed! - virtual size_t TextToData(const char* text, unsigned int textVersion, AZ::IO::GenericStream& stream, bool isDataBigEndian = false) + size_t TextToData(const char* text, unsigned int textVersion, AZ::IO::GenericStream& stream, bool isDataBigEndian = false) override { (void)textVersion; (void)isDataBigEndian; @@ -164,7 +164,7 @@ namespace } /// Load the class data from a stream. - virtual bool Load(void* classPtr, AZ::IO::GenericStream& in, unsigned int, bool isDataBigEndian = false) + bool Load(void* classPtr, AZ::IO::GenericStream& in, unsigned int, bool isDataBigEndian = false) override { QByteArray buffer = ReadAll(in); QDataStream qtStream(&buffer, QIODevice::ReadOnly); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/SceneMemberComponentSaveData.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/SceneMemberComponentSaveData.h index 4c07c82aef..b30857d71f 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/SceneMemberComponentSaveData.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/SceneMemberComponentSaveData.h @@ -43,7 +43,7 @@ namespace GraphCanvas } // SceneMemberNotificationBus::Handler - void OnSceneSet(const AZ::EntityId& graphId) + void OnSceneSet(const AZ::EntityId& graphId) override { const AZ::EntityId* ownerId = SceneMemberNotificationBus::GetCurrentBusId(); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/StateControllers/PrioritizedStateController.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/StateControllers/PrioritizedStateController.h index 1e31cc6c8a..583e755dfa 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/StateControllers/PrioritizedStateController.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/StateControllers/PrioritizedStateController.h @@ -45,7 +45,7 @@ namespace GraphCanvas m_valueSet.clear(); } - bool HasState() const + bool HasState() const override { return !m_valueSet.empty(); } @@ -85,7 +85,7 @@ namespace GraphCanvas return releasedValue; } - const T& GetCalculatedState() const + const T& GetCalculatedState() const override { auto valueIter = m_valueSet.begin(); return (*valueIter); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/StateControllers/StackStateController.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/StateControllers/StackStateController.h index d77cd43861..948e286f77 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/StateControllers/StackStateController.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Utils/StateControllers/StackStateController.h @@ -43,7 +43,7 @@ namespace GraphCanvas m_states.clear(); } - bool HasState() const + bool HasState() const override { return !m_states.empty(); } @@ -79,7 +79,7 @@ namespace GraphCanvas return releasedValue; } - const T& GetCalculatedState() const + const T& GetCalculatedState() const override { return m_states.back().second; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/Bookmarks/BookmarkDockWidget.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/Bookmarks/BookmarkDockWidget.h index 0326a5e5a0..74207315e1 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/Bookmarks/BookmarkDockWidget.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/Bookmarks/BookmarkDockWidget.h @@ -57,7 +57,7 @@ namespace GraphCanvas //// // GraphCanvas::SceneNotifications - void OnSelectionChanged(); + void OnSelectionChanged() override; //// public Q_SLOTS: diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/Bookmarks/BookmarkTableModel.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/Bookmarks/BookmarkTableModel.h index 2e14011d47..a1c5e15a3b 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/Bookmarks/BookmarkTableModel.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/Bookmarks/BookmarkTableModel.h @@ -79,7 +79,7 @@ namespace GraphCanvas // QAbstractTableModel int rowCount(const QModelIndex& parent = QModelIndex()) const override; - int columnCount(const QModelIndex& index = QModelIndex()) const; + int columnCount(const QModelIndex& index = QModelIndex()) const override; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; bool setData(const QModelIndex &index, const QVariant &value, int role) override; QVariant headerData(int section, Qt::Orientation orientation, int role) const override; @@ -125,7 +125,7 @@ namespace GraphCanvas BookmarkTableSortProxyModel(BookmarkTableSourceModel* sourceModel); ~BookmarkTableSortProxyModel() override = default; - bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const; + bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override; void SetFilter(const QString& filter); void ClearFilter(); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/ComboBox/ComboBoxItemModels.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/ComboBox/ComboBoxItemModels.h index 4eeb98b23a..1f78a109a9 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/ComboBox/ComboBoxItemModels.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/ComboBox/ComboBoxItemModels.h @@ -415,7 +415,7 @@ namespace GraphCanvas return index(nextRow, GetSortColumn()); } - void OnDropDownAboutToShow() + void OnDropDownAboutToShow() override { beginResetModel(); setSourceModel(m_modelInterface->GetDropDownItemModel()); @@ -424,7 +424,7 @@ namespace GraphCanvas invalidate(); } - void OnDropDownHidden() + void OnDropDownHidden() override { beginResetModel(); setSourceModel(nullptr); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuAction.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuAction.h index 1334dff94a..fb51e76868 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuAction.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuAction.h @@ -22,10 +22,11 @@ namespace GraphCanvas { } + using ContextMenuAction::RefreshAction; void RefreshAction() override { const AZ::EntityId& graphId = GetGraphId(); - const AZ::EntityId& targetId = GetTargetId(); + const AZ::EntityId& targetId = GetTargetId(); bool canAlignSelection = false; SceneRequestBus::EventResult(canAlignSelection, graphId, &SceneRequests::HasMultipleSelection); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuActions.h index bc5d8da1d5..fe261a5ce8 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuActions.h @@ -30,7 +30,8 @@ namespace GraphCanvas bool IsInSubMenu() const override; AZStd::string GetSubMenuPath() const override; - + + using AlignmentContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; private: diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/CommentMenuActions/CommentContextMenuAction.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/CommentMenuActions/CommentContextMenuAction.h index 2d2173204c..1ad2f41728 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/CommentMenuActions/CommentContextMenuAction.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/CommentMenuActions/CommentContextMenuAction.h @@ -22,6 +22,7 @@ namespace GraphCanvas { } + using ContextMenuAction::RefreshAction; void RefreshAction(const GraphId& graphId, const AZ::EntityId& targetId) override { AZ_UNUSED(targetId); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/CommentMenuActions/CommentContextMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/CommentMenuActions/CommentContextMenuActions.h index cb4012ec55..8d19e0f9ab 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/CommentMenuActions/CommentContextMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/CommentMenuActions/CommentContextMenuActions.h @@ -25,6 +25,8 @@ namespace GraphCanvas using ContextMenuAction::RefreshAction; void RefreshAction() override; + + using CommentContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/BookmarkConstructMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/BookmarkConstructMenuActions.h index e0f6320088..d1ac3b083f 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/BookmarkConstructMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/BookmarkConstructMenuActions.h @@ -20,6 +20,7 @@ namespace GraphCanvas AddBookmarkMenuAction(QObject* parent); virtual ~AddBookmarkMenuAction() = default; + using ConstructContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h index 1a22f40ea0..3c9c767619 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h @@ -20,6 +20,7 @@ namespace GraphCanvas AddCommentMenuAction(QObject* parent); virtual ~AddCommentMenuAction() = default; + using ConstructContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructPresetMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructPresetMenuActions.h index 9b081c9925..b6c393872f 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructPresetMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructPresetMenuActions.h @@ -28,6 +28,7 @@ namespace GraphCanvas bool IsInSubMenu() const override; AZStd::string GetSubMenuPath() const override; + using ConstructContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; private: @@ -52,6 +53,7 @@ namespace GraphCanvas bool IsInSubMenu() const override; AZStd::string GetSubMenuPath() const override; + using ConstructContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; private: @@ -69,6 +71,7 @@ namespace GraphCanvas CreatePresetFromSelection(QObject* parent = nullptr); virtual ~CreatePresetFromSelection(); + using ContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; static ActionGroupId GetCreateConstructContextMenuActionGroupId() diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/DisableMenuActions/DisableMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/DisableMenuActions/DisableMenuActions.h index 2252f081bb..b66a33bef8 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/DisableMenuActions/DisableMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/DisableMenuActions/DisableMenuActions.h @@ -22,6 +22,7 @@ namespace GraphCanvas void SetEnableState(bool enableState); + using DisableContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; private: diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/EditMenuActions/EditContextMenuAction.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/EditMenuActions/EditContextMenuAction.h index f87374323f..03a16d015b 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/EditMenuActions/EditContextMenuAction.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/EditMenuActions/EditContextMenuAction.h @@ -22,6 +22,7 @@ namespace GraphCanvas { } + using ContextMenuAction::RefreshAction; void RefreshAction(const GraphId& graphId, const AZ::EntityId& targetId) override { AZ_UNUSED(targetId); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/EditMenuActions/EditContextMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/EditMenuActions/EditContextMenuActions.h index 817cd887a6..35195c0c57 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/EditMenuActions/EditContextMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/EditMenuActions/EditContextMenuActions.h @@ -22,6 +22,7 @@ namespace GraphCanvas CutGraphSelectionMenuAction(QObject* parent); virtual ~CutGraphSelectionMenuAction() = default; + using EditContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -34,6 +35,7 @@ namespace GraphCanvas CopyGraphSelectionMenuAction(QObject* parent); virtual ~CopyGraphSelectionMenuAction() = default; + using EditContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -49,6 +51,8 @@ namespace GraphCanvas virtual ~PasteGraphSelectionMenuAction() = default; void RefreshAction() override; + + using EditContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -61,6 +65,7 @@ namespace GraphCanvas DeleteGraphSelectionMenuAction(QObject* parent); virtual ~DeleteGraphSelectionMenuAction() = default; + using EditContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -73,6 +78,7 @@ namespace GraphCanvas DuplicateGraphSelectionMenuAction(QObject* parent); virtual ~DuplicateGraphSelectionMenuAction() = default; + using EditContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeGroupMenuActions/NodeGroupContextMenuAction.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeGroupMenuActions/NodeGroupContextMenuAction.h index 28b36074b7..ade04ab8dc 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeGroupMenuActions/NodeGroupContextMenuAction.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeGroupMenuActions/NodeGroupContextMenuAction.h @@ -22,6 +22,7 @@ namespace GraphCanvas { } + using ContextMenuAction::RefreshAction; void RefreshAction(const GraphId& graphId, const AZ::EntityId& targetId) override { AZ_UNUSED(targetId); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeGroupMenuActions/NodeGroupContextMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeGroupMenuActions/NodeGroupContextMenuActions.h index 2a45e43aee..d0f4101235 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeGroupMenuActions/NodeGroupContextMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeGroupMenuActions/NodeGroupContextMenuActions.h @@ -25,6 +25,8 @@ namespace GraphCanvas using ContextMenuAction::RefreshAction; void RefreshAction() override; + + using NodeGroupContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; private: @@ -43,6 +45,8 @@ namespace GraphCanvas using ContextMenuAction::RefreshAction; void RefreshAction() override; + + using NodeGroupContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -58,6 +62,8 @@ namespace GraphCanvas using ContextMenuAction::RefreshAction; void RefreshAction() override; + + using NodeGroupContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -73,6 +79,8 @@ namespace GraphCanvas using ContextMenuAction::RefreshAction; void RefreshAction() override; + + using NodeGroupContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -88,6 +96,8 @@ namespace GraphCanvas using ContextMenuAction::RefreshAction; void RefreshAction() override; + + using NodeGroupContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeMenuActions/NodeContextMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeMenuActions/NodeContextMenuActions.h index 0e812d12e9..0253d31c79 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeMenuActions/NodeContextMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/NodeMenuActions/NodeContextMenuActions.h @@ -21,12 +21,14 @@ namespace GraphCanvas ManageUnusedSlotsMenuAction(QObject* parent, bool hideSlots); virtual ~ManageUnusedSlotsMenuAction() = default; - + + using NodeContextMenuAction::RefreshAction; void RefreshAction(const GraphId& grpahId, const AZ::EntityId& targetId) override; + + using NodeContextMenuAction::TriggerAction; SceneReaction TriggerAction(const GraphId& graphId, const AZ::Vector2&) override; private: - bool m_hideSlots = true; AZ::EntityId m_targetId; }; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/SceneMenuActions/SceneContextMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/SceneMenuActions/SceneContextMenuActions.h index 54b2efa046..59bfd847fe 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/SceneMenuActions/SceneContextMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/SceneMenuActions/SceneContextMenuActions.h @@ -25,6 +25,7 @@ namespace GraphCanvas bool IsInSubMenu() const override; AZStd::string GetSubMenuPath() const override; + using SceneContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -40,6 +41,7 @@ namespace GraphCanvas bool IsInSubMenu() const override; AZStd::string GetSubMenuPath() const override; + using SceneContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/SlotMenuActions/SlotContextMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/SlotMenuActions/SlotContextMenuActions.h index 29875882a5..f1875bc41d 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/SlotMenuActions/SlotContextMenuActions.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/SlotMenuActions/SlotContextMenuActions.h @@ -22,7 +22,10 @@ namespace GraphCanvas AddSlotMenuAction(QObject* parent); virtual ~AddSlotMenuAction() = default; + using SlotContextMenuAction::RefreshAction; void RefreshAction() override; + + using SlotContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -35,7 +38,10 @@ namespace GraphCanvas RemoveSlotMenuAction(QObject* parent); virtual ~RemoveSlotMenuAction() = default; + using SlotContextMenuAction::RefreshAction; void RefreshAction() override; + + using SlotContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -49,7 +55,10 @@ namespace GraphCanvas ClearConnectionsMenuAction(QObject* parent); virtual ~ClearConnectionsMenuAction() = default; + using SlotContextMenuAction::RefreshAction; void RefreshAction() override; + + using SlotContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -66,7 +75,10 @@ namespace GraphCanvas ResetToDefaultValueMenuAction(QObject* parent); virtual ~ResetToDefaultValueMenuAction() = default; + using SlotContextMenuAction::RefreshAction; void RefreshAction() override; + + using SlotContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -79,7 +91,10 @@ namespace GraphCanvas ToggleReferenceStateAction(QObject* parent); virtual ~ToggleReferenceStateAction() = default; + using SlotContextMenuAction::RefreshAction; void RefreshAction() override; + + using SlotContextMenuAction::TriggerAction; SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; @@ -92,7 +107,10 @@ namespace GraphCanvas PromoteToVariableAction(QObject* parent); virtual ~PromoteToVariableAction() = default; + using SlotContextMenuAction::RefreshAction; void RefreshAction() override; + + using SlotContextMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; }; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasEditor/GraphCanvasAssetEditorMainWindow.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasEditor/GraphCanvasAssetEditorMainWindow.h index 5aed5d77e7..139c540767 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasEditor/GraphCanvasAssetEditorMainWindow.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasEditor/GraphCanvasAssetEditorMainWindow.h @@ -55,6 +55,8 @@ namespace GraphCanvas struct AssetEditorWindowConfig { + virtual ~AssetEditorWindowConfig() = default; + /// General AssetEditor config parameters EditorId m_editorId; AZStd::string_view m_baseStyleSheet; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasGraphicsView/GraphCanvasGraphicsView.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasGraphicsView/GraphCanvasGraphicsView.h index 7dd8a01dc3..70b3e16166 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasGraphicsView/GraphCanvasGraphicsView.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasGraphicsView/GraphCanvasGraphicsView.h @@ -129,7 +129,7 @@ namespace GraphCanvas ToastId ShowToastAtCursor(const ToastConfiguration& toastConfiguration) override; ToastId ShowToastAtPoint(const QPoint& screenPosition, const QPointF& anchorPoint, const ToastConfiguration& toastConfiguration) override; - bool IsShowing() const; + bool IsShowing() const override; //// // TickBus @@ -159,7 +159,7 @@ namespace GraphCanvas void wheelEvent(QWheelEvent* event) override; - void focusOutEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event) override; void resizeEvent(QResizeEvent* event) override; void moveEvent(QMoveEvent* event) override; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/IconDecoratedNodePaletteTreeItem.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/IconDecoratedNodePaletteTreeItem.h index b214f00416..cfb4fe477a 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/IconDecoratedNodePaletteTreeItem.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/IconDecoratedNodePaletteTreeItem.h @@ -27,8 +27,8 @@ namespace GraphCanvas void AddIconColorPalette(const AZStd::string& colorPalette); - void OnStylesUnloaded(); - void OnStylesLoaded(); + void OnStylesUnloaded() override; + void OnStylesLoaded() override; protected: diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h index fdeb20dadf..fcb4d79077 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h @@ -95,7 +95,7 @@ namespace GraphCanvas const EditorId& GetEditorId() const; // Child Overrides - virtual bool LessThan(const GraphCanvasTreeItem* graphItem) const; + bool LessThan(const GraphCanvasTreeItem* graphItem) const override; virtual QVariant OnData(const QModelIndex& index, int role) const; virtual Qt::ItemFlags OnFlags() const; diff --git a/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h b/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h index a8051e16e4..3705b91b15 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h @@ -78,8 +78,8 @@ namespace GraphModelIntegration GraphModel::NodePtrList GetSelectedNodes() override; void SetSelected(GraphModel::NodePtrList nodes, bool selected) override; void ClearSelection() override; - void EnableNode(GraphModel::NodePtr node); - void DisableNode(GraphModel::NodePtr node); + void EnableNode(GraphModel::NodePtr node) override; + void DisableNode(GraphModel::NodePtr node) override; void CenterOnNodes(GraphModel::NodePtrList nodes) override; AZ::Vector2 GetMajorPitch() const override; @@ -166,7 +166,7 @@ namespace GraphModelIntegration void EnableNodes(const AZStd::unordered_set& nodeIds) override; void DisableNodes(const AZStd::unordered_set& nodeIds) override; - AZStd::string GetDataTypeString(const AZ::Uuid& typeId); + AZStd::string GetDataTypeString(const AZ::Uuid& typeId) override; //! This is where we find all of the graph metadata (like node positions, comments, etc) and store it in the node graph for serialization // CJS TODO: Use this instead of the above undo functions diff --git a/Gems/GraphModel/Code/Include/GraphModel/Model/Module/InputOutputNodes.h b/Gems/GraphModel/Code/Include/GraphModel/Model/Module/InputOutputNodes.h index 51e65705b9..2c3da656fb 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Model/Module/InputOutputNodes.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Model/Module/InputOutputNodes.h @@ -67,6 +67,7 @@ namespace GraphModel //! \param dataType The type of data represented by this node GraphInputNode(GraphModel::GraphPtr graph, DataTypePtr dataType); + using BaseInputOutputNode::PostLoadSetup; void PostLoadSetup(GraphPtr graph, NodeId id) override; //! Returns the value of the DefaultValue slot, which indicates the default value for this input. This @@ -95,6 +96,7 @@ namespace GraphModel //! \param dataType The type of data represented by this node GraphOutputNode(GraphModel::GraphPtr graph, DataTypePtr dataType); + using BaseInputOutputNode::PostLoadSetup; void PostLoadSetup(GraphPtr graph, NodeId id) override; protected: diff --git a/Gems/GraphModel/Code/Include/GraphModel/Model/Module/ModuleNode.h b/Gems/GraphModel/Code/Include/GraphModel/Model/Module/ModuleNode.h index cce45e5159..f63fd6531f 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Model/Module/ModuleNode.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Model/Module/ModuleNode.h @@ -36,6 +36,7 @@ namespace GraphModel const char* GetTitle() const override; + using Node::PostLoadSetup; void PostLoadSetup(GraphPtr ownerGraph, NodeId id) override; protected: diff --git a/Gems/GraphModel/Code/Tests/MockGraphCanvas.h b/Gems/GraphModel/Code/Tests/MockGraphCanvas.h index e66a47a79c..774e6aab9f 100644 --- a/Gems/GraphModel/Code/Tests/MockGraphCanvas.h +++ b/Gems/GraphModel/Code/Tests/MockGraphCanvas.h @@ -137,8 +137,8 @@ namespace MockGraphCanvasServices ~MockExtenderSlotComponent() = default; // Component overrides ... - void Activate(); - void Deactivate(); + void Activate() override; + void Deactivate() override; //// // ExtenderSlotComponent overrides ... @@ -177,7 +177,7 @@ namespace MockGraphCanvasServices void SetTooltip(const AZStd::string& tooltip) override; void SetTranslationKeyedTooltip(const GraphCanvas::TranslationKeyedString& tooltip) override; const AZStd::string GetTooltip() const override; - void SetShowInOutliner(bool showInOutliner); + void SetShowInOutliner(bool showInOutliner) override; bool ShowInOutliner() const override; void AddSlot(const AZ::EntityId& slotId) override; void RemoveSlot(const AZ::EntityId& slotId) override; diff --git a/Gems/GraphModel/Code/Tests/TestEnvironment.h b/Gems/GraphModel/Code/Tests/TestEnvironment.h index 908a4990e1..a9b2a548f4 100644 --- a/Gems/GraphModel/Code/Tests/TestEnvironment.h +++ b/Gems/GraphModel/Code/Tests/TestEnvironment.h @@ -87,7 +87,7 @@ namespace GraphModelIntegrationTest const char* GetTitle() const override; protected: - void RegisterSlots(); + void RegisterSlots() override; AZStd::shared_ptr m_graphContext = nullptr; }; @@ -108,7 +108,7 @@ namespace GraphModelIntegrationTest const char* GetTitle() const override; protected: - void RegisterSlots(); + void RegisterSlots() override; AZStd::shared_ptr m_graphContext = nullptr; }; @@ -129,7 +129,7 @@ namespace GraphModelIntegrationTest const char* GetTitle() const override; protected: - void RegisterSlots(); + void RegisterSlots() override; AZStd::shared_ptr m_graphContext = nullptr; }; diff --git a/Gems/ImGui/Code/Include/ImGuiBus.h b/Gems/ImGui/Code/Include/ImGuiBus.h index 959577e97f..d481ec7843 100644 --- a/Gems/ImGui/Code/Include/ImGuiBus.h +++ b/Gems/ImGui/Code/Include/ImGuiBus.h @@ -70,6 +70,8 @@ namespace ImGui public: AZ_RTTI(IImGuiManager, "{F5A0F08B-F2DA-43B7-8CD2-C6FC71E1A712}"); + virtual ~IImGuiManager() = default; + static const char* GetUniqueName() { return "IImGuiManager"; } virtual DisplayState GetEditorWindowState() const = 0; diff --git a/Gems/ImGui/Code/Source/ImGuiManager.h b/Gems/ImGui/Code/Source/ImGuiManager.h index 52862205a5..c4fa5169f7 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.h +++ b/Gems/ImGui/Code/Source/ImGuiManager.h @@ -48,8 +48,8 @@ namespace ImGui void SetClientMenuBarState(DisplayState state) override { m_clientMenuBarState = state; } bool IsControllerSupportModeEnabled(ImGuiControllerModeFlags::FlagType controllerMode) const override; void EnableControllerSupportMode(ImGuiControllerModeFlags::FlagType controllerMode, bool enable) override; - void SetControllerMouseSensitivity(float sensitivity) { m_controllerMouseSensitivity = sensitivity; } - float GetControllerMouseSensitivity() const { return m_controllerMouseSensitivity; } + void SetControllerMouseSensitivity(float sensitivity) override { m_controllerMouseSensitivity = sensitivity; } + float GetControllerMouseSensitivity() const override { return m_controllerMouseSensitivity; } bool GetEnableDiscreteInputMode() const override { return m_enableDiscreteInputMode; } void SetEnableDiscreteInputMode(bool enabled) override { m_enableDiscreteInputMode = enabled; } ImGuiResolutionMode GetResolutionMode() const override { return m_resolutionMode; } diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/Menus/SceneContextMenuActions.h b/Gems/LandscapeCanvas/Code/Source/Editor/Menus/SceneContextMenuActions.h index f51dab9bd9..27faad7099 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/Menus/SceneContextMenuActions.h +++ b/Gems/LandscapeCanvas/Code/Source/Editor/Menus/SceneContextMenuActions.h @@ -22,7 +22,11 @@ namespace LandscapeCanvasEditor virtual ~FindSelectedNodesAction() = default; GraphCanvas::ActionGroupId GetActionGroupId() const override; + + using GraphCanvas::ContextMenuAction::RefreshAction; void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override; + + using GraphCanvas::ContextMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override; private: diff --git a/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.h b/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.h index 17a5183dfe..3c6ce745ca 100644 --- a/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.h +++ b/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.h @@ -168,9 +168,9 @@ namespace LmbrCentral { public: - bool IsPathIntersectingObstacles(const NavigationMeshID /*meshID*/, const Vec3& /*start*/, const Vec3& /*end*/, float /*radius*/) const { return false; } - bool IsPointInsideObstacles(const Vec3& /*position*/) const { return false; } - bool IsLineSegmentIntersectingObstaclesOrCloseToThem(const Lineseg& /*linesegToTest*/, float /*maxDistanceToConsiderClose*/) const { return false; } + bool IsPathIntersectingObstacles(const NavigationMeshID /*meshID*/, const Vec3& /*start*/, const Vec3& /*end*/, float /*radius*/) const override { return false; } + bool IsPointInsideObstacles(const Vec3& /*position*/) const override { return false; } + bool IsLineSegmentIntersectingObstaclesOrCloseToThem(const Lineseg& /*linesegToTest*/, float /*maxDistanceToConsiderClose*/) const override { return false; } }; NullPathObstacles m_pathObstacles; @@ -344,7 +344,7 @@ namespace LmbrCentral bool GetValidPositionNearby(const Vec3&, Vec3&) const override { return false; } bool GetTeleportPosition(Vec3&) const override { return false; } class IPathFollower* GetPathFollower() const override { return nullptr; } - bool IsPointValidForAgent(const Vec3&, AZ::u32) const { return true; }; + bool IsPointValidForAgent(const Vec3&, AZ::u32) const override { return true; }; //// ~IAIPathAgent }; } // namespace LmbrCentral diff --git a/Gems/LmbrCentral/Code/Source/Audio/AudioSystemComponent.cpp b/Gems/LmbrCentral/Code/Source/Audio/AudioSystemComponent.cpp index cd4cff09ae..0c3531902f 100644 --- a/Gems/LmbrCentral/Code/Source/Audio/AudioSystemComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Audio/AudioSystemComponent.cpp @@ -35,12 +35,12 @@ namespace LmbrCentral OnGameUnpaused ); - void OnGamePaused() + void OnGamePaused() override { Call(FN_OnGamePaused); } - void OnGameUnpaused() + void OnGameUnpaused() override { Call(FN_OnGameUnpaused); } diff --git a/Gems/LmbrCentral/Code/Source/Scripting/EditorRandomTimedSpawnerComponent.h b/Gems/LmbrCentral/Code/Source/Scripting/EditorRandomTimedSpawnerComponent.h index d55463abd8..cc8a1a3a9e 100644 --- a/Gems/LmbrCentral/Code/Source/Scripting/EditorRandomTimedSpawnerComponent.h +++ b/Gems/LmbrCentral/Code/Source/Scripting/EditorRandomTimedSpawnerComponent.h @@ -57,7 +57,7 @@ namespace LmbrCentral void SetSpawnDelayVariation(double spawnDelayVariation) override { m_config.m_spawnDelayVariation = spawnDelayVariation; } double GetSpawnDelayVariation() override { return m_config.m_spawnDelayVariation; } - void BuildGameEntity(AZ::Entity* gameEntity); + void BuildGameEntity(AZ::Entity* gameEntity) override; private: //Reflected members diff --git a/Gems/LmbrCentral/Code/Source/Scripting/SimpleStateComponent.cpp b/Gems/LmbrCentral/Code/Source/Scripting/SimpleStateComponent.cpp index ad60e86834..e278f18e8b 100644 --- a/Gems/LmbrCentral/Code/Source/Scripting/SimpleStateComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Scripting/SimpleStateComponent.cpp @@ -29,7 +29,7 @@ namespace LmbrCentral AZ_EBUS_BEHAVIOR_BINDER(BehaviorSimpleStateComponentNotificationBusHandler, "{F935125C-AE4E-48C1-BB60-24A0559BC4D2}", AZ::SystemAllocator, OnStateChanged); - void OnStateChanged(const char* oldState, const char* newState) + void OnStateChanged(const char* oldState, const char* newState) override { Call(FN_OnStateChanged, oldState, newState); } diff --git a/Gems/LmbrCentral/Code/Tests/Builders/CopyDependencyBuilderTest.cpp b/Gems/LmbrCentral/Code/Tests/Builders/CopyDependencyBuilderTest.cpp index 08eb7df669..65847a7fef 100644 --- a/Gems/LmbrCentral/Code/Tests/Builders/CopyDependencyBuilderTest.cpp +++ b/Gems/LmbrCentral/Code/Tests/Builders/CopyDependencyBuilderTest.cpp @@ -213,18 +213,18 @@ namespace UnitTest // AzToolsFramework::AssetSystem::AssetSystemRequestBus::Handler overrides const char* GetAbsoluteDevGameFolderPath() override { return ""; } const char* GetAbsoluteDevRootFolderPath() override { return ""; } - bool GetRelativeProductPathFromFullSourceOrProductPath([[maybe_unused]] const AZStd::string& fullPath, [[maybe_unused]] AZStd::string& relativeProductPath) { return true; } + bool GetRelativeProductPathFromFullSourceOrProductPath([[maybe_unused]] const AZStd::string& fullPath, [[maybe_unused]] AZStd::string& relativeProductPath) override { return true; } bool GenerateRelativeSourcePath( [[maybe_unused]] const AZStd::string& sourcePath, [[maybe_unused]] AZStd::string& relativePath, - [[maybe_unused]] AZStd::string& watchFolder) { return true; } - bool GetFullSourcePathFromRelativeProductPath([[maybe_unused]] const AZStd::string& relPath, [[maybe_unused]] AZStd::string& fullSourcePath) { return true; } - bool GetAssetInfoById([[maybe_unused]] const AZ::Data::AssetId& assetId, [[maybe_unused]] const AZ::Data::AssetType& assetType, [[maybe_unused]] const AZStd::string& platformName, [[maybe_unused]] AZ::Data::AssetInfo& assetInfo, [[maybe_unused]] AZStd::string& rootFilePath) { return true; } - bool GetSourceInfoBySourcePath([[maybe_unused]] const char* sourcePath, [[maybe_unused]] AZ::Data::AssetInfo& assetInfo, [[maybe_unused]] AZStd::string& watchFolder) { return true; } - bool GetSourceInfoBySourceUUID([[maybe_unused]] const AZ::Uuid& sourceUuid, [[maybe_unused]] AZ::Data::AssetInfo& assetInfo, [[maybe_unused]] AZStd::string& watchFolder) { return true; } - bool GetScanFolders([[maybe_unused]] AZStd::vector& scanFolders) { return true; } - bool IsAssetPlatformEnabled([[maybe_unused]] const char* platform) { return true; } - int GetPendingAssetsForPlatform([[maybe_unused]] const char* platform) { return 0; } - bool GetAssetsProducedBySourceUUID([[maybe_unused]] const AZ::Uuid& sourceUuid, [[maybe_unused]] AZStd::vector& productsAssetInfo) { return true; } + [[maybe_unused]] AZStd::string& watchFolder) override { return true; } + bool GetFullSourcePathFromRelativeProductPath([[maybe_unused]] const AZStd::string& relPath, [[maybe_unused]] AZStd::string& fullSourcePath) override { return true; } + bool GetAssetInfoById([[maybe_unused]] const AZ::Data::AssetId& assetId, [[maybe_unused]] const AZ::Data::AssetType& assetType, [[maybe_unused]] const AZStd::string& platformName, [[maybe_unused]] AZ::Data::AssetInfo& assetInfo, [[maybe_unused]] AZStd::string& rootFilePath) override { return true; } + bool GetSourceInfoBySourcePath([[maybe_unused]] const char* sourcePath, [[maybe_unused]] AZ::Data::AssetInfo& assetInfo, [[maybe_unused]] AZStd::string& watchFolder) override { return true; } + bool GetSourceInfoBySourceUUID([[maybe_unused]] const AZ::Uuid& sourceUuid, [[maybe_unused]] AZ::Data::AssetInfo& assetInfo, [[maybe_unused]] AZStd::string& watchFolder) override { return true; } + bool GetScanFolders([[maybe_unused]] AZStd::vector& scanFolders) override { return true; } + bool IsAssetPlatformEnabled([[maybe_unused]] const char* platform) override { return true; } + int GetPendingAssetsForPlatform([[maybe_unused]] const char* platform) override { return 0; } + bool GetAssetsProducedBySourceUUID([[maybe_unused]] const AZ::Uuid& sourceUuid, [[maybe_unused]] AZStd::vector& productsAssetInfo) override { return true; } bool GetAssetSafeFolders(AZStd::vector& assetSafeFolders) override { char resolvedBuffer[AZ_MAX_PATH_LEN] = { 0 }; diff --git a/Gems/LyShine/Code/Editor/Animation/AnimationContext.h b/Gems/LyShine/Code/Editor/Animation/AnimationContext.h index 9534902f99..cb45fb9653 100644 --- a/Gems/LyShine/Code/Editor/Animation/AnimationContext.h +++ b/Gems/LyShine/Code/Editor/Animation/AnimationContext.h @@ -167,12 +167,12 @@ public: void UpdateTimeRange(); private: - virtual void BeginUndoTransaction() override; - virtual void EndUndoTransaction() override; + void BeginUndoTransaction() override; + void EndUndoTransaction() override; - virtual void OnSequenceRemoved(CUiAnimViewSequence* pSequence) override; + void OnSequenceRemoved(CUiAnimViewSequence* pSequence) override; - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event); + void OnEditorNotifyEvent(EEditorNotifyEvent event) override; void AnimateActiveSequence(); diff --git a/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.h b/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.h index 1bbcf8eea7..05b86bd380 100644 --- a/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.h +++ b/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.h @@ -345,8 +345,8 @@ public: SplineWidget(QWidget* parent); virtual ~SplineWidget(); - void update() { QWidget::update(); } - void update(const QRect& rect) { QWidget::update(rect); } + void update() override { QWidget::update(); } + void update(const QRect& rect) override { QWidget::update(rect); } QPoint mapFromGlobal(const QPoint& point) const override { return QWidget::mapFromGlobal(point); } diff --git a/Gems/LyShine/Code/Editor/Animation/Controls/UiTimelineCtrl.h b/Gems/LyShine/Code/Editor/Animation/Controls/UiTimelineCtrl.h index 701d187ddc..ed0d8ce02d 100644 --- a/Gems/LyShine/Code/Editor/Animation/Controls/UiTimelineCtrl.h +++ b/Gems/LyShine/Code/Editor/Animation/Controls/UiTimelineCtrl.h @@ -54,7 +54,7 @@ public: void setGeometry(const QRect& r) override { QWidget::setGeometry(r); } void SetTimeRange(const Range& r) { m_timeRange = r; } - void SetTimeMarker(float fTime); + void SetTimeMarker(float fTime) override; float GetTimeMarker() const { return m_fTimeMarker; } void SetZoom(float fZoom); @@ -111,7 +111,7 @@ protected: void OnLButtonUp(const QPoint& point, Qt::KeyboardModifiers modifiers); void OnRButtonDown(const QPoint& point, Qt::KeyboardModifiers modifiers); void OnRButtonUp(const QPoint& point, Qt::KeyboardModifiers modifiers); - void keyPressEvent(QKeyEvent* event); + void keyPressEvent(QKeyEvent* event) override; // Drawing functions float ClientToTime(int x); diff --git a/Gems/LyShine/Code/Editor/Animation/UiAVTrackEventKeyUIControls.h b/Gems/LyShine/Code/Editor/Animation/UiAVTrackEventKeyUIControls.h index df3b7fa24f..ed47e6a160 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAVTrackEventKeyUIControls.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAVTrackEventKeyUIControls.h @@ -17,13 +17,13 @@ public: CSmartVariableEnum mv_event; CSmartVariable mv_value; - virtual void OnCreateVars(); + void OnCreateVars() override; bool SupportTrackType(const CUiAnimParamType& paramType, EUiAnimCurveType trackType, EUiAnimValue valueType) const override; bool OnKeySelectionChange(CUiAnimViewKeyBundle& selectedKeys) override; void OnUIChange(IVariable* pVar, CUiAnimViewKeyBundle& keys) override; - virtual unsigned int GetPriority() const { return 1; } + unsigned int GetPriority() const override { return 1; } static const GUID& GetClassID() { diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewCurveEditor.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewCurveEditor.h index edde246e1c..863e8c1cdd 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewCurveEditor.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewCurveEditor.h @@ -49,8 +49,8 @@ public: void SetPlayCallback(const std::function& callback); // IUiAnimationContextListener - virtual void OnSequenceChanged(CUiAnimViewSequence* pNewSequence); - virtual void OnTimeChanged(float newTime); + void OnSequenceChanged(CUiAnimViewSequence* pNewSequence) override; + void OnTimeChanged(float newTime) override; protected: void showEvent(QShowEvent* event) override; @@ -112,8 +112,8 @@ public: float GetFPS() const { return m_widget->GetFPS(); } void SetTickDisplayMode(EUiAVTickMode mode) { m_widget->SetTickDisplayMode(mode); } - virtual void OnSequenceChanged(CUiAnimViewSequence* pNewSequence) { m_widget->OnSequenceChanged(pNewSequence); } - virtual void OnTimeChanged(float newTime) { m_widget->OnTimeChanged(newTime); } + void OnSequenceChanged(CUiAnimViewSequence* pNewSequence) override { m_widget->OnSequenceChanged(pNewSequence); } + void OnTimeChanged(float newTime) override { m_widget->OnTimeChanged(newTime); } virtual void OnKeysChanged(CUiAnimViewSequence* pSequence) override { m_widget->OnKeysChanged(pSequence); } virtual void OnKeySelectionChanged(CUiAnimViewSequence* pSequence) override { m_widget->OnKeySelectionChanged(pSequence); } diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.h index a7ecbd3499..4671612695 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.h @@ -70,7 +70,7 @@ public: // UiEditorAnimationStateInterface UiEditorAnimationStateInterface::UiEditorAnimationEditState GetCurrentEditState() override; - void RestoreCurrentEditState(const UiEditorAnimationStateInterface::UiEditorAnimationEditState& animEditState); + void RestoreCurrentEditState(const UiEditorAnimationStateInterface::UiEditorAnimationEditState& animEditState) override; // ~UiEditorAnimationStateInterface // UiEditorAnimListenerInterface @@ -167,11 +167,11 @@ private: virtual void OnNodeSelectionChanged(CUiAnimViewSequence* pSequence) override; virtual void OnNodeRenamed(CUiAnimViewNode* pNode, const char* pOldName) override; - virtual void OnSequenceAdded(CUiAnimViewSequence* pSequence); - virtual void OnSequenceRemoved(CUiAnimViewSequence* pSequence); + void OnSequenceAdded(CUiAnimViewSequence* pSequence) override; + void OnSequenceRemoved(CUiAnimViewSequence* pSequence) override; - virtual void BeginUndoTransaction(); - virtual void EndUndoTransaction(); + void BeginUndoTransaction() override; + void EndUndoTransaction() override; void SaveSequenceTimingToXML(); // Instance diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.h index ff1984184f..504c39e630 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.h @@ -87,7 +87,7 @@ public: void SetEditLock(bool bLock) { m_bEditLock = bLock; } // IUiAnimationContextListener - virtual void OnTimeChanged(float newTime); + void OnTimeChanged(float newTime) override; float TickSnap(float time) const; diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h index 80946eb317..c133ec439a 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewNode.h @@ -115,6 +115,7 @@ class CUiAnimViewKeyBundle public: CUiAnimViewKeyBundle() : m_bAllOfSameType(true) {} + virtual ~CUiAnimViewKeyBundle() = default; virtual bool AreAllKeysOfSameType() const override { return m_bAllOfSameType; } diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.h index 3aa8d74563..494cebd573 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequence.h @@ -234,17 +234,17 @@ private: // Called when an animation updates needs to be schedules void ForceAnimation(); - virtual void CopyKeysToClipboard(XmlNodeRef& xmlNode, const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks) override; + void CopyKeysToClipboard(XmlNodeRef& xmlNode, const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks) override; void UpdateLightAnimationRefs(const char* pOldName, const char* pNewName); std::deque GetMatchingTracks(CUiAnimViewAnimNode* pAnimNode, XmlNodeRef trackNode); void GetMatchedPasteLocationsRec(std::vector& locations, CUiAnimViewNode* pCurrentNode, XmlNodeRef clipboardNode); - virtual void BeginUndoTransaction(); - virtual void EndUndoTransaction(); - virtual void BeginRestoreTransaction(); - virtual void EndRestoreTransaction(); + void BeginUndoTransaction() override; + void EndUndoTransaction() override; + void BeginRestoreTransaction() override; + void EndRestoreTransaction() override; // Current time when animated float m_time; diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.h index f29f0e58e1..1fe9d96f85 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.h @@ -35,7 +35,7 @@ public: CUiAnimViewSequenceManager(); ~CUiAnimViewSequenceManager(); - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event); + void OnEditorNotifyEvent(EEditorNotifyEvent event) override; unsigned int GetCount() const { return static_cast(m_sequences.size()); } diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.h b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.h index 8dd0ec0c79..45b3816f29 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.h +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSplineCtrl.h @@ -26,7 +26,7 @@ public: CUiAnimViewSplineCtrl(QWidget* parent); virtual ~CUiAnimViewSplineCtrl(); - virtual void ClearSelection(); + void ClearSelection() override; void AddSpline(ISplineInterpolator* pSpline, CUiAnimViewTrack* pTrack, const QColor& color); void AddSpline(ISplineInterpolator * pSpline, CUiAnimViewTrack * pTrack, QColor anColorArray[4]); @@ -64,7 +64,7 @@ private: void AdjustTCB(float d_tension, float d_continuity, float d_bias); void MoveSelectedTangentHandleTo(const QPoint& point); - virtual ISplineCtrlUndo* CreateSplineCtrlUndoObject(std::vector& splineContainer); + ISplineCtrlUndo* CreateSplineCtrlUndoObject(std::vector& splineContainer) override; bool m_bKeysFreeze; bool m_bTangentsFreeze; diff --git a/Gems/LyShine/Code/Source/Animation/AnimNode.h b/Gems/LyShine/Code/Source/Animation/AnimNode.h index 6ac198a5c7..0076276204 100644 --- a/Gems/LyShine/Code/Source/Animation/AnimNode.h +++ b/Gems/LyShine/Code/Source/Animation/AnimNode.h @@ -64,10 +64,10 @@ public: // Return Animation Sequence that owns this node. IUiAnimSequence* GetSequence() const override { return m_pSequence; }; - void SetFlags(int flags); - int GetFlags() const; + void SetFlags(int flags) override; + int GetFlags() const override; - IUiAnimationSystem* GetUiAnimationSystem() const { return m_pSequence->GetUiAnimationSystem(); }; + IUiAnimationSystem* GetUiAnimationSystem() const override { return m_pSequence->GetUiAnimationSystem(); }; virtual void OnStart() {} void OnReset() override {} @@ -80,23 +80,23 @@ public: virtual Matrix34 GetReferenceMatrix() const; ////////////////////////////////////////////////////////////////////////// - bool IsParamValid(const CUiAnimParamType& paramType) const; + bool IsParamValid(const CUiAnimParamType& paramType) const override; AZStd::string GetParamName(const CUiAnimParamType& param) const override; - virtual EUiAnimValue GetParamValueType(const CUiAnimParamType& paramType) const; - virtual IUiAnimNode::ESupportedParamFlags GetParamFlags(const CUiAnimParamType& paramType) const; - virtual unsigned int GetParamCount() const { return 0; }; + EUiAnimValue GetParamValueType(const CUiAnimParamType& paramType) const override; + IUiAnimNode::ESupportedParamFlags GetParamFlags(const CUiAnimParamType& paramType) const override; + unsigned int GetParamCount() const override { return 0; }; - bool SetParamValue(float time, CUiAnimParamType param, float val); - bool SetParamValue(float time, CUiAnimParamType param, const Vec3& val); - bool SetParamValue(float time, CUiAnimParamType param, const Vec4& val); - bool GetParamValue(float time, CUiAnimParamType param, float& val); - bool GetParamValue(float time, CUiAnimParamType param, Vec3& val); - bool GetParamValue(float time, CUiAnimParamType param, Vec4& val); + bool SetParamValue(float time, CUiAnimParamType param, float val) override; + bool SetParamValue(float time, CUiAnimParamType param, const Vec3& val) override; + bool SetParamValue(float time, CUiAnimParamType param, const Vec4& val) override; + bool GetParamValue(float time, CUiAnimParamType param, float& val) override; + bool GetParamValue(float time, CUiAnimParamType param, Vec3& val) override; + bool GetParamValue(float time, CUiAnimParamType param, Vec4& val) override; void SetTarget([[maybe_unused]] IUiAnimNode* node) {}; IUiAnimNode* GetTarget() const { return 0; }; - void StillUpdate() {} + void StillUpdate() override {} void Animate(SUiAnimContext& ec) override; virtual void PrecacheStatic([[maybe_unused]] float startTime) {} @@ -109,7 +109,7 @@ public: IUiAnimNodeOwner* GetNodeOwner() override { return m_pOwner; }; // Called by sequence when needs to activate a node. - virtual void Activate(bool bActivate); + void Activate(bool bActivate) override; ////////////////////////////////////////////////////////////////////////// void SetParent(IUiAnimNode* pParent) override; @@ -132,7 +132,7 @@ public: IUiAnimTrack* GetTrackForAzField([[maybe_unused]] const UiAnimParamData& param) const override { return nullptr; } IUiAnimTrack* CreateTrackForAzField([[maybe_unused]] const UiAnimParamData& param) override { return nullptr; } - virtual void SetTrack(const CUiAnimParamType& paramType, IUiAnimTrack* track); + void SetTrack(const CUiAnimParamType& paramType, IUiAnimTrack* track) override; IUiAnimTrack* CreateTrack(const CUiAnimParamType& paramType) override; void SetTimeRange(Range timeRange) override; void AddTrack(IUiAnimTrack* track) override; @@ -147,7 +147,7 @@ public: void SetId(int id) { m_id = id; } const char* GetNameFast() const { return m_name.c_str(); } - virtual void Render(){} + void Render() override{} static void Reflect(AZ::SerializeContext* serializeContext); @@ -168,7 +168,7 @@ protected: // sets track animNode pointer to this node and sorts tracks void RegisterTrack(IUiAnimTrack* track); - virtual bool NeedToRender() const { return false; } + bool NeedToRender() const override { return false; } protected: int m_refCount; @@ -199,7 +199,7 @@ class CUiAnimNodeGroup public: CUiAnimNodeGroup(const int id) : CUiAnimNode(id, eUiAnimNodeType_Group) { SetFlags(GetFlags() | eUiAnimNodeFlags_CanChangeName); } - EUiAnimNodeType GetType() const { return eUiAnimNodeType_Group; } + EUiAnimNodeType GetType() const override { return eUiAnimNodeType_Group; } - virtual CUiAnimParamType GetParamType([[maybe_unused]] unsigned int nIndex) const { return eUiAnimParamType_Invalid; } + CUiAnimParamType GetParamType([[maybe_unused]] unsigned int nIndex) const override { return eUiAnimParamType_Invalid; } }; diff --git a/Gems/LyShine/Code/Source/Animation/AnimSequence.h b/Gems/LyShine/Code/Source/Animation/AnimSequence.h index e4026ce250..5441dc3860 100644 --- a/Gems/LyShine/Code/Source/Animation/AnimSequence.h +++ b/Gems/LyShine/Code/Source/Animation/AnimSequence.h @@ -34,95 +34,95 @@ public: // Animation system. IUiAnimationSystem* GetUiAnimationSystem() const override { return m_pUiAnimationSystem; }; - void SetName(const char* name); - const char* GetName() const; - uint32 GetId() const { return m_id; } + void SetName(const char* name) override; + const char* GetName() const override; + uint32 GetId() const override { return m_id; } float GetTime() const { return m_time; } - virtual void SetOwner(IUiAnimSequenceOwner* pOwner) { m_pOwner = pOwner; } - virtual IUiAnimSequenceOwner* GetOwner() const { return m_pOwner; } + void SetOwner(IUiAnimSequenceOwner* pOwner) override { m_pOwner = pOwner; } + IUiAnimSequenceOwner* GetOwner() const override { return m_pOwner; } - virtual void SetActiveDirector(IUiAnimNode* pDirectorNode); - virtual IUiAnimNode* GetActiveDirector() const; + void SetActiveDirector(IUiAnimNode* pDirectorNode) override; + IUiAnimNode* GetActiveDirector() const override; - virtual void SetFlags(int flags); - virtual int GetFlags() const; - virtual int GetCutSceneFlags(const bool localFlags = false) const; + void SetFlags(int flags) override; + int GetFlags() const override; + int GetCutSceneFlags(const bool localFlags = false) const override; - virtual void SetParentSequence(IUiAnimSequence* pParentSequence); - virtual const IUiAnimSequence* GetParentSequence() const; - virtual bool IsAncestorOf(const IUiAnimSequence* pSequence) const; + void SetParentSequence(IUiAnimSequence* pParentSequence) override; + const IUiAnimSequence* GetParentSequence() const override; + bool IsAncestorOf(const IUiAnimSequence* pSequence) const override; - void SetTimeRange(Range timeRange); - Range GetTimeRange() { return m_timeRange; }; + void SetTimeRange(Range timeRange) override; + Range GetTimeRange() override { return m_timeRange; }; - void AdjustKeysToTimeRange(const Range& timeRange); + void AdjustKeysToTimeRange(const Range& timeRange) override; //! Return number of animation nodes in sequence. - int GetNodeCount() const; + int GetNodeCount() const override; //! Get specified animation node. - IUiAnimNode* GetNode(int index) const; + IUiAnimNode* GetNode(int index) const override; - IUiAnimNode* FindNodeByName(const char* sNodeName, const IUiAnimNode* pParentDirector); + IUiAnimNode* FindNodeByName(const char* sNodeName, const IUiAnimNode* pParentDirector) override; IUiAnimNode* FindNodeById(int nNodeId); - virtual void ReorderNode(IUiAnimNode* node, IUiAnimNode* pPivotNode, bool next); + void ReorderNode(IUiAnimNode* node, IUiAnimNode* pPivotNode, bool next) override; - void Reset(bool bSeekToStart); - void ResetHard(); - void Pause(); - void Resume(); - bool IsPaused() const; + void Reset(bool bSeekToStart) override; + void ResetHard() override; + void Pause() override; + void Resume() override; + bool IsPaused() const override; virtual void OnStart(); virtual void OnStop(); void OnLoop() override; //! Add animation node to sequence. - bool AddNode(IUiAnimNode* node); - IUiAnimNode* CreateNode(EUiAnimNodeType nodeType); - IUiAnimNode* CreateNode(XmlNodeRef node); - void RemoveNode(IUiAnimNode* node); + bool AddNode(IUiAnimNode* node) override; + IUiAnimNode* CreateNode(EUiAnimNodeType nodeType) override; + IUiAnimNode* CreateNode(XmlNodeRef node) override; + void RemoveNode(IUiAnimNode* node) override; //! Add scene node to sequence. - void RemoveAll(); + void RemoveAll() override; - virtual void Activate(); - virtual bool IsActivated() const { return m_bActive; } - virtual void Deactivate(); + void Activate() override; + bool IsActivated() const override { return m_bActive; } + void Deactivate() override; - virtual void PrecacheData(float startTime); + void PrecacheData(float startTime) override; void PrecacheStatic(const float startTime); void PrecacheDynamic(float time); - void StillUpdate(); - void Animate(const SUiAnimContext& ec); - void Render(); + void StillUpdate() override; + void Animate(const SUiAnimContext& ec) override; + void Render() override; - void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true, uint32 overrideId = 0, bool bResetLightAnimSet = false); - void InitPostLoad(IUiAnimationSystem* pUiAnimationSystem, bool remapIds, LyShine::EntityIdMap* entityIdMap); + void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true, uint32 overrideId = 0, bool bResetLightAnimSet = false) override; + void InitPostLoad(IUiAnimationSystem* pUiAnimationSystem, bool remapIds, LyShine::EntityIdMap* entityIdMap) override; - void CopyNodes(XmlNodeRef& xmlNode, IUiAnimNode** pSelectedNodes, uint32 count); - void PasteNodes(const XmlNodeRef& xmlNode, IUiAnimNode* pParent); + void CopyNodes(XmlNodeRef& xmlNode, IUiAnimNode** pSelectedNodes, uint32 count) override; + void PasteNodes(const XmlNodeRef& xmlNode, IUiAnimNode* pParent) override; //! Add/remove track events in sequence - virtual bool AddTrackEvent(const char* szEvent); - virtual bool RemoveTrackEvent(const char* szEvent); - virtual bool RenameTrackEvent(const char* szEvent, const char* szNewEvent); - virtual bool MoveUpTrackEvent(const char* szEvent); - virtual bool MoveDownTrackEvent(const char* szEvent); - virtual void ClearTrackEvents(); + bool AddTrackEvent(const char* szEvent) override; + bool RemoveTrackEvent(const char* szEvent) override; + bool RenameTrackEvent(const char* szEvent, const char* szNewEvent) override; + bool MoveUpTrackEvent(const char* szEvent) override; + bool MoveDownTrackEvent(const char* szEvent) override; + void ClearTrackEvents() override; //! Get the track events in the sequence - virtual int GetTrackEventsCount() const; - virtual char const* GetTrackEvent(int iIndex) const; - virtual IUiAnimStringTable* GetTrackEventStringTable() { return m_pEventStrings.get(); } + int GetTrackEventsCount() const override; + char const* GetTrackEvent(int iIndex) const override; + IUiAnimStringTable* GetTrackEventStringTable() override { return m_pEventStrings.get(); } //! Call to trigger a track event - virtual void TriggerTrackEvent(const char* event, const char* param = NULL); + void TriggerTrackEvent(const char* event, const char* param = nullptr) override; //! Track event listener - virtual void AddTrackEventListener(IUiTrackEventListener* pListener); - virtual void RemoveTrackEventListener(IUiTrackEventListener* pListener); + void AddTrackEventListener(IUiTrackEventListener* pListener) override; + void RemoveTrackEventListener(IUiTrackEventListener* pListener) override; static void Reflect(AZ::SerializeContext* serializeContext); @@ -130,7 +130,7 @@ private: void ComputeTimeRange(); void CopyNodeChildren(XmlNodeRef& xmlNode, IUiAnimNode* pAnimNode); void NotifyTrackEvent(IUiTrackEventListener::ETrackEventReason reason, - const char* event, const char* param = NULL); + const char* event, const char* param = nullptr); // Create a new animation node. IUiAnimNode* CreateNodeInternal(EUiAnimNodeType nodeType, uint32 nNodeId = -1); diff --git a/Gems/LyShine/Code/Source/Animation/AnimSplineTrack.h b/Gems/LyShine/Code/Source/Animation/AnimSplineTrack.h index 0bc625155a..414b1cb3cb 100644 --- a/Gems/LyShine/Code/Source/Animation/AnimSplineTrack.h +++ b/Gems/LyShine/Code/Source/Animation/AnimSplineTrack.h @@ -45,23 +45,23 @@ public: void release() override; ////////////////////////////////////////////////////////////////////////// - virtual int GetSubTrackCount() const { return 0; }; - virtual IUiAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const { return 0; }; + int GetSubTrackCount() const override { return 0; }; + IUiAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const override { return 0; }; AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const override { return AZStd::string(); }; - virtual void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) { assert(0); } + void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) override { assert(0); } - virtual const CUiAnimParamType& GetParameterType() const { return m_nParamType; }; - virtual void SetParameterType(CUiAnimParamType type) { m_nParamType = type; }; + const CUiAnimParamType& GetParameterType() const override { return m_nParamType; }; + void SetParameterType(CUiAnimParamType type) override { m_nParamType = type; }; - virtual const UiAnimParamData& GetParamData() const { return m_componentParamData; } - virtual void SetParamData(const UiAnimParamData& param) { m_componentParamData = param; } + const UiAnimParamData& GetParamData() const override { return m_componentParamData; } + void SetParamData(const UiAnimParamData& param) override { m_componentParamData = param; } - virtual void GetKeyValueRange(float& fMin, float& fMax) const { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; - virtual void SetKeyValueRange(float fMin, float fMax){ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; }; + void GetKeyValueRange(float& fMin, float& fMax) const override { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; + void SetKeyValueRange(float fMin, float fMax) override{ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; }; - ISplineInterpolator* GetSpline() const { return m_spline.get(); }; + ISplineInterpolator* GetSpline() const override { return m_spline.get(); }; - virtual bool IsKeySelected(int key) const + bool IsKeySelected(int key) const override { if (GetSpline() && GetSpline()->IsKeySelectedAtAnyDimension(key)) { @@ -70,7 +70,7 @@ public: return false; } - virtual void SelectKey(int key, bool select) + void SelectKey(int key, bool select) override { if (GetSpline()) { @@ -78,22 +78,22 @@ public: } } - int GetNumKeys() const + int GetNumKeys() const override { return m_spline->num_keys(); } - void SetNumKeys(int numKeys) + void SetNumKeys(int numKeys) override { m_spline->resize(numKeys); } - bool HasKeys() const + bool HasKeys() const override { return GetNumKeys() != 0; } - void RemoveKey(int num) + void RemoveKey(int num) override { if (m_spline && m_spline->num_keys() > num) { @@ -105,7 +105,7 @@ public: } } - void GetKey(int index, IKey* key) const + void GetKey(int index, IKey* key) const override { assert(index >= 0 && index < GetNumKeys()); assert(key != 0); @@ -123,7 +123,7 @@ public: tcbkey->SetValue(k.value); } - void SetKey(int index, IKey* key) + void SetKey(int index, IKey* key) override { assert(index >= 0 && index < GetNumKeys()); assert(key != 0); @@ -140,76 +140,76 @@ public: Invalidate(); } - float GetKeyTime(int index) const + float GetKeyTime(int index) const override { assert(index >= 0 && index < GetNumKeys()); return m_spline->time(index); } - void SetKeyTime(int index, float time) + void SetKeyTime(int index, float time) override { assert(index >= 0 && index < GetNumKeys()); m_spline->SetKeyTime(index, time); Invalidate(); } - int GetKeyFlags(int index) + int GetKeyFlags(int index) override { assert(index >= 0 && index < GetNumKeys()); return m_spline->key(index).flags; } - void SetKeyFlags(int index, int flags) + void SetKeyFlags(int index, int flags) override { assert(index >= 0 && index < GetNumKeys()); m_spline->key(index).flags = flags; } - virtual EUiAnimCurveType GetCurveType() { assert(0); return eUiAnimCurveType_Unknown; } - virtual EUiAnimValue GetValueType() { assert(0); return eUiAnimValue_Unknown; } + EUiAnimCurveType GetCurveType() override { assert(0); return eUiAnimCurveType_Unknown; } + EUiAnimValue GetValueType() override { assert(0); return eUiAnimValue_Unknown; } - virtual void GetValue(float time, float& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector2& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector3& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector4& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Color& value) { assert(0); } + void GetValue(float time, float& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector2& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector3& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector4& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Color& value) override { assert(0); } - virtual void SetValue(float time, const float& value, bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector2& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector3& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector4& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Color& value, [[maybe_unused]] bool bDefault = false) { assert(0); } + void SetValue(float time, const float& value, bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector2& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector3& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector4& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Color& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } - virtual void OffsetKeyPosition([[maybe_unused]] const Vec3& value) { assert(0); }; + void OffsetKeyPosition([[maybe_unused]] const Vec3& value) override { assert(0); }; - bool Serialize(IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks); - bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset); + bool Serialize(IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override; + bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset) override; - void GetKeyInfo(int key, const char*& description, float& duration) + void GetKeyInfo(int key, const char*& description, float& duration) override { description = 0; duration = 0; } //! Sort keys in track (after time of keys was modified). - void SortKeys() + void SortKeys() override { m_spline->sort_keys(); }; //! Get track flags. - int GetFlags() { return m_flags; } + int GetFlags() override { return m_flags; } //! Check if track is masked by mask - virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; } + bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; } //! Set track flags. - void SetFlags(int flags) + void SetFlags(int flags) override { m_flags = flags; if (m_flags & eUiAnimTrackFlags_Loop) @@ -231,12 +231,12 @@ public: m_spline->flag_set(Spline::MODIFIED); }; - void SetTimeRange(const Range& timeRange) + void SetTimeRange(const Range& timeRange) override { m_spline->SetRange(timeRange.start, timeRange.end); } - int FindKey(float time) + int FindKey(float time) override { // Find key with given time. int num = m_spline->num_keys(); @@ -252,7 +252,7 @@ public: } //! Create key at given time, and return its index. - int CreateKey(float time) + int CreateKey(float time) override { ValueType value; @@ -272,12 +272,12 @@ public: return m_spline->InsertKey(time, tmp); } - int CloneKey(int srcKey) + int CloneKey(int srcKey) override { return CopyKey(this, srcKey); } - int CopyKey(IUiAnimTrack* pFromTrack, int nFromKey) + int CopyKey(IUiAnimTrack* pFromTrack, int nFromKey) override { ITcbKey key; pFromTrack->GetKey(nFromKey, &key); @@ -326,16 +326,16 @@ public: m_defaultValue = value; } - virtual ColorB GetCustomColor() const + ColorB GetCustomColor() const { return m_customColor; } - virtual void SetCustomColor(ColorB color) + void SetCustomColor(ColorB color) { m_customColor = color; m_bCustomColorSet = true; } - virtual bool HasCustomColor() const + bool HasCustomColor() const { return m_bCustomColorSet; } - virtual void ClearCustomColor() + void ClearCustomColor() { m_bCustomColorSet = false; } static void Reflect(AZ::SerializeContext* serializeContext) {} diff --git a/Gems/LyShine/Code/Source/Animation/AnimTrack.h b/Gems/LyShine/Code/Source/Animation/AnimTrack.h index 9645572e3e..1ab5c26ab0 100644 --- a/Gems/LyShine/Code/Source/Animation/AnimTrack.h +++ b/Gems/LyShine/Code/Source/Animation/AnimTrack.h @@ -27,19 +27,19 @@ public: TUiAnimTrack(); - virtual EUiAnimCurveType GetCurveType() { return eUiAnimCurveType_Unknown; }; - virtual EUiAnimValue GetValueType() { return eUiAnimValue_Unknown; } + EUiAnimCurveType GetCurveType() override { return eUiAnimCurveType_Unknown; }; + EUiAnimValue GetValueType() override { return eUiAnimValue_Unknown; } - virtual int GetSubTrackCount() const { return 0; }; - virtual IUiAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const { return 0; }; + int GetSubTrackCount() const override { return 0; }; + IUiAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const override { return 0; }; AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const override { return AZStd::string(); }; - virtual void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) { assert(0); } + void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) override { assert(0); } - virtual const CUiAnimParamType& GetParameterType() const { return m_nParamType; }; - virtual void SetParameterType(CUiAnimParamType type) { m_nParamType = type; }; + const CUiAnimParamType& GetParameterType() const override { return m_nParamType; }; + void SetParameterType(CUiAnimParamType type) override { m_nParamType = type; }; - virtual const UiAnimParamData& GetParamData() const { return m_componentParamData; } - virtual void SetParamData(const UiAnimParamData& param) { m_componentParamData = param; } + const UiAnimParamData& GetParamData() const override { return m_componentParamData; } + void SetParamData(const UiAnimParamData& param) override { m_componentParamData = param; } ////////////////////////////////////////////////////////////////////////// // for intrusive_ptr support @@ -47,7 +47,7 @@ public: void release() override; ////////////////////////////////////////////////////////////////////////// - virtual bool IsKeySelected(int key) const + bool IsKeySelected(int key) const override { AZ_Assert(key >= 0 && key < (int)m_keys.size(), "Key index is out of range"); if (m_keys[key].flags & AKEY_SELECTED) @@ -57,7 +57,7 @@ public: return false; } - virtual void SelectKey(int key, bool select) + void SelectKey(int key, bool select) override { AZ_Assert(key >= 0 && key < (int)m_keys.size(), "Key index is out of range"); if (select) @@ -71,100 +71,100 @@ public: } //! Return number of keys in track. - virtual int GetNumKeys() const { return static_cast(m_keys.size()); }; + int GetNumKeys() const override { return static_cast(m_keys.size()); }; //! Return true if keys exists in this track - virtual bool HasKeys() const { return !m_keys.empty(); } + bool HasKeys() const override { return !m_keys.empty(); } //! Set number of keys in track. //! If needed adds empty keys at end or remove keys from end. - virtual void SetNumKeys(int numKeys) { m_keys.resize(numKeys); }; + void SetNumKeys(int numKeys) override { m_keys.resize(numKeys); }; //! Remove specified key. - virtual void RemoveKey(int num); + void RemoveKey(int num) override; - int CreateKey(float time); - int CloneKey(int fromKey); - int CopyKey(IUiAnimTrack* pFromTrack, int nFromKey); + int CreateKey(float time) override; + int CloneKey(int fromKey) override; + int CopyKey(IUiAnimTrack* pFromTrack, int nFromKey) override; //! Get key at specified location. //! @param key Must be valid pointer to compatible key structure, to be filled with specified key location. - virtual void GetKey(int index, IKey* key) const; + void GetKey(int index, IKey* key) const override; //! Get time of specified key. //! @return key time. - virtual float GetKeyTime(int index) const; + float GetKeyTime(int index) const override; //! Find key at given time. //! @return Index of found key, or -1 if key with this time not found. - virtual int FindKey(float time); + int FindKey(float time) override; //! Get flags of specified key. //! @return key time. - virtual int GetKeyFlags(int index); + int GetKeyFlags(int index) override; //! Set key at specified location. //! @param key Must be valid pointer to compatible key structure. - virtual void SetKey(int index, IKey* key); + void SetKey(int index, IKey* key) override; //! Set time of specified key. - virtual void SetKeyTime(int index, float time); + void SetKeyTime(int index, float time) override; //! Set flags of specified key. - virtual void SetKeyFlags(int index, int flags); + void SetKeyFlags(int index, int flags) override; //! Sort keys in track (after time of keys was modified). - virtual void SortKeys(); + void SortKeys() override; //! Get track flags. - virtual int GetFlags() { return m_flags; } + int GetFlags() override { return m_flags; } //! Check if track is masked - virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; } + bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; } //! Set track flags. - virtual void SetFlags(int flags) { m_flags = flags; } + void SetFlags(int flags) override { m_flags = flags; } ////////////////////////////////////////////////////////////////////////// // Get track value at specified time. // Interpolates keys if needed. ////////////////////////////////////////////////////////////////////////// - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] float& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector2& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector3& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector4& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Color& value) { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] float& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector2& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector3& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Vector4& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] AZ::Color& value) override { assert(0); }; ////////////////////////////////////////////////////////////////////////// // Set track value at specified time. // Adds new keys if required. ////////////////////////////////////////////////////////////////////////// - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const float& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector2& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector3& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector4& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Color& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const float& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector2& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector3& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Vector4& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const AZ::Color& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; - virtual void OffsetKeyPosition([[maybe_unused]] const Vec3& value) { assert(0); }; + void OffsetKeyPosition([[maybe_unused]] const Vec3& value) override { assert(0); }; /** Assign active time range for this track. */ - virtual void SetTimeRange(const Range& timeRange) { m_timeRange = timeRange; }; + void SetTimeRange(const Range& timeRange) override { m_timeRange = timeRange; }; /** Serialize this animation track to XML. Do not override this method, prefer to override SerializeKey. */ - virtual bool Serialize(IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true); + bool Serialize(IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true) override; - virtual bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0); + bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0) override; /** Serialize single key of this track. @@ -181,21 +181,21 @@ public: int GetActiveKey(float time, KeyType* key); #ifdef UI_ANIMATION_SYSTEM_SUPPORT_EDITING - virtual ColorB GetCustomColor() const + ColorB GetCustomColor() const override { return m_customColor; } - virtual void SetCustomColor(ColorB color) + void SetCustomColor(ColorB color) override { m_customColor = color; m_bCustomColorSet = true; } - virtual bool HasCustomColor() const + bool HasCustomColor() const override { return m_bCustomColorSet; } - virtual void ClearCustomColor() + void ClearCustomColor() override { m_bCustomColorSet = false; } #endif - virtual void GetKeyValueRange(float& fMin, float& fMax) const { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; - virtual void SetKeyValueRange(float fMin, float fMax){ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; }; + void GetKeyValueRange(float& fMin, float& fMax) const override { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; + void SetKeyValueRange(float fMin, float fMax) override{ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; }; static void Reflect(AZ::SerializeContext* serializeContext) {} diff --git a/Gems/LyShine/Code/Source/Animation/AzEntityNode.h b/Gems/LyShine/Code/Source/Animation/AzEntityNode.h index 9771ac7be3..f3a0fd641f 100644 --- a/Gems/LyShine/Code/Source/Animation/AzEntityNode.h +++ b/Gems/LyShine/Code/Source/Animation/AzEntityNode.h @@ -37,24 +37,24 @@ public: void EnableEntityPhysics(bool bEnable); - virtual EUiAnimNodeType GetType() const { return eUiAnimNodeType_AzEntity; } + EUiAnimNodeType GetType() const override { return eUiAnimNodeType_AzEntity; } - virtual void AddTrack(IUiAnimTrack* track); + void AddTrack(IUiAnimTrack* track) override; ////////////////////////////////////////////////////////////////////////// // Overrides from CUiAnimNode ////////////////////////////////////////////////////////////////////////// // UiAnimNodeInterface - virtual AZ::EntityId GetAzEntityId() override { return m_entityId; }; - virtual void SetAzEntity(AZ::Entity* entity) override { m_entityId = entity->GetId(); } + AZ::EntityId GetAzEntityId() override { return m_entityId; }; + void SetAzEntity(AZ::Entity* entity) override { m_entityId = entity->GetId(); } // ~UiAnimNodeInterface - virtual void StillUpdate(); - virtual void Animate(SUiAnimContext& ec); + void StillUpdate() override; + void Animate(SUiAnimContext& ec) override; - virtual void CreateDefaultTracks(); + void CreateDefaultTracks() override; bool SetParamValueAz(float time, const UiAnimParamData& param, float value) override; bool SetParamValueAz(float time, const UiAnimParamData& param, bool value) override; @@ -67,30 +67,30 @@ public: bool GetParamValueAz(float time, const UiAnimParamData& param, float& value) override; - virtual void PrecacheStatic(float startTime) override; - virtual void PrecacheDynamic(float time) override; + void PrecacheStatic(float startTime) override; + void PrecacheDynamic(float time) override; Vec3 GetPos() { return m_pos; }; Quat GetRotate() { return m_rotate; }; Vec3 GetScale() { return m_scale; }; - virtual void Activate(bool bActivate); + void Activate(bool bActivate) override; IUiAnimTrack* GetTrackForAzField(const UiAnimParamData& param) const override; IUiAnimTrack* CreateTrackForAzField(const UiAnimParamData& param) override; ////////////////////////////////////////////////////////////////////////// - void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks); - virtual void InitPostLoad(IUiAnimSequence* pSequence, bool remapIds, LyShine::EntityIdMap* entityIdMap); - void OnReset(); - void OnResetHard(); - void OnStart(); - void OnPause(); - void OnStop(); + void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override; + void InitPostLoad(IUiAnimSequence* pSequence, bool remapIds, LyShine::EntityIdMap* entityIdMap) override; + void OnReset() override; + void OnResetHard() override; + void OnStart() override; + void OnPause() override; + void OnStop() override; ////////////////////////////////////////////////////////////////////////// - virtual unsigned int GetParamCount() const; - virtual CUiAnimParamType GetParamType(unsigned int nIndex) const; + unsigned int GetParamCount() const override; + CUiAnimParamType GetParamType(unsigned int nIndex) const override; AZStd::string GetParamName(const CUiAnimParamType& param) const override; AZStd::string GetParamNameForTrack(const CUiAnimParamType& param, const IUiAnimTrack* track) const override; @@ -100,7 +100,7 @@ public: static void Reflect(AZ::SerializeContext* serializeContext); protected: - virtual bool GetParamInfoFromType(const CUiAnimParamType& paramId, SParamInfo& info) const; + bool GetParamInfoFromType(const CUiAnimParamType& paramId, SParamInfo& info) const override; //! Given the class data definition and a track for a field within it, //! compute the offset for the field and set it in the track @@ -115,7 +115,7 @@ protected: void ReleaseSounds(); // functions involved in the process to parse and store lua animated properties - virtual void UpdateDynamicParams(); + void UpdateDynamicParams() override; virtual void UpdateDynamicParams_Editor(); virtual void UpdateDynamicParams_PureGame(); diff --git a/Gems/LyShine/Code/Source/Animation/CompoundSplineTrack.h b/Gems/LyShine/Code/Source/Animation/CompoundSplineTrack.h index 127b6593fb..83a1f82588 100644 --- a/Gems/LyShine/Code/Source/Animation/CompoundSplineTrack.h +++ b/Gems/LyShine/Code/Source/Animation/CompoundSplineTrack.h @@ -26,8 +26,8 @@ public: UiCompoundSplineTrack(int nDims, EUiAnimValue inValueType, CUiAnimParamType subTrackParamTypes[MAX_SUBTRACKS]); UiCompoundSplineTrack(); - void add_ref() { ++m_refCount; } - void release() + void add_ref() override { ++m_refCount; } + void release() override { if (--m_refCount <= 0) { @@ -35,107 +35,107 @@ public: } } - virtual int GetSubTrackCount() const { return m_nDimensions; }; - virtual IUiAnimTrack* GetSubTrack(int nIndex) const; + int GetSubTrackCount() const override { return m_nDimensions; }; + IUiAnimTrack* GetSubTrack(int nIndex) const override; AZStd::string GetSubTrackName(int nIndex) const override; - virtual void SetSubTrackName(int nIndex, const char* name); + void SetSubTrackName(int nIndex, const char* name) override; - virtual EUiAnimCurveType GetCurveType() { return eUiAnimCurveType_BezierFloat; }; - virtual EUiAnimValue GetValueType() { return m_valueType; }; + EUiAnimCurveType GetCurveType() override { return eUiAnimCurveType_BezierFloat; }; + EUiAnimValue GetValueType() override { return m_valueType; }; - virtual const CUiAnimParamType& GetParameterType() const { return m_nParamType; }; - virtual void SetParameterType(CUiAnimParamType type) { m_nParamType = type; } + const CUiAnimParamType& GetParameterType() const override { return m_nParamType; }; + void SetParameterType(CUiAnimParamType type) override { m_nParamType = type; } - virtual const UiAnimParamData& GetParamData() const { return m_componentParamData; } - virtual void SetParamData(const UiAnimParamData& param) { m_componentParamData = param; } + const UiAnimParamData& GetParamData() const override { return m_componentParamData; } + void SetParamData(const UiAnimParamData& param) override { m_componentParamData = param; } - virtual int GetNumKeys() const; - virtual void SetNumKeys([[maybe_unused]] int numKeys) { assert(0); }; - virtual bool HasKeys() const; - virtual void RemoveKey(int num); + int GetNumKeys() const override; + void SetNumKeys([[maybe_unused]] int numKeys) override { assert(0); }; + bool HasKeys() const override; + void RemoveKey(int num) override; - virtual void GetKeyInfo(int key, const char*& description, float& duration); - virtual int CreateKey([[maybe_unused]] float time) { assert(0); return 0; }; - virtual int CloneKey([[maybe_unused]] int fromKey) { assert(0); return 0; }; - virtual int CopyKey([[maybe_unused]] IUiAnimTrack* pFromTrack, [[maybe_unused]] int nFromKey) { assert(0); return 0; }; - virtual void GetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) const { assert(0); }; - virtual float GetKeyTime(int index) const; - virtual int FindKey([[maybe_unused]] float time) { assert(0); return 0; }; - virtual int GetKeyFlags([[maybe_unused]] int index) { assert(0); return 0; }; - virtual void SetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) { assert(0); }; - virtual void SetKeyTime(int index, float time); - virtual void SetKeyFlags([[maybe_unused]] int index, [[maybe_unused]] int flags) { assert(0); }; - virtual void SortKeys() { assert(0); }; + void GetKeyInfo(int key, const char*& description, float& duration) override; + int CreateKey([[maybe_unused]] float time) override { assert(0); return 0; }; + int CloneKey([[maybe_unused]] int fromKey) override { assert(0); return 0; }; + int CopyKey([[maybe_unused]] IUiAnimTrack* pFromTrack, [[maybe_unused]] int nFromKey) override { assert(0); return 0; }; + void GetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) const override { assert(0); }; + float GetKeyTime(int index) const override; + int FindKey([[maybe_unused]] float time) override { assert(0); return 0; }; + int GetKeyFlags([[maybe_unused]] int index) override { assert(0); return 0; }; + void SetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) override { assert(0); }; + void SetKeyTime(int index, float time) override; + void SetKeyFlags([[maybe_unused]] int index, [[maybe_unused]] int flags) override { assert(0); }; + void SortKeys() override { assert(0); }; - virtual bool IsKeySelected(int key) const; - virtual void SelectKey(int key, bool select); + bool IsKeySelected(int key) const override; + void SelectKey(int key, bool select) override; - virtual int GetFlags() { return m_flags; }; - virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; } - virtual void SetFlags(int flags) { m_flags = flags; }; + int GetFlags() override { return m_flags; }; + bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; } + void SetFlags(int flags) override { m_flags = flags; }; ////////////////////////////////////////////////////////////////////////// // Get track value at specified time. // Interpolates keys if needed. ////////////////////////////////////////////////////////////////////////// - virtual void GetValue(float time, float& value); - virtual void GetValue(float time, Vec3& value); - virtual void GetValue(float time, Vec4& value); - virtual void GetValue(float time, Quat& value); - virtual void GetValue(float time, AZ::Vector2& value); - virtual void GetValue(float time, AZ::Vector3& value); - virtual void GetValue(float time, AZ::Vector4& value); - virtual void GetValue(float time, AZ::Color& value); - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); }; + void GetValue(float time, float& value) override; + void GetValue(float time, Vec3& value) override; + void GetValue(float time, Vec4& value) override; + void GetValue(float time, Quat& value) override; + void GetValue(float time, AZ::Vector2& value) override; + void GetValue(float time, AZ::Vector3& value) override; + void GetValue(float time, AZ::Vector4& value) override; + void GetValue(float time, AZ::Color& value) override; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); }; ////////////////////////////////////////////////////////////////////////// // Set track value at specified time. // Adds new keys if required. ////////////////////////////////////////////////////////////////////////// - virtual void SetValue(float time, const float& value, bool bDefault = false); - virtual void SetValue(float time, const Vec3& value, bool bDefault = false); - void SetValue(float time, const Vec4& value, bool bDefault = false); - virtual void SetValue(float time, const Quat& value, bool bDefault = false); - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue(float time, const AZ::Vector2& value, bool bDefault = false); - virtual void SetValue(float time, const AZ::Vector3& value, bool bDefault = false); - virtual void SetValue(float time, const AZ::Vector4& value, bool bDefault = false); - virtual void SetValue(float time, const AZ::Color& value, bool bDefault = false); + void SetValue(float time, const float& value, bool bDefault = false) override; + void SetValue(float time, const Vec3& value, bool bDefault = false) override; + void SetValue(float time, const Vec4& value, bool bDefault = false) override; + void SetValue(float time, const Quat& value, bool bDefault = false) override; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue(float time, const AZ::Vector2& value, bool bDefault = false) override; + void SetValue(float time, const AZ::Vector3& value, bool bDefault = false) override; + void SetValue(float time, const AZ::Vector4& value, bool bDefault = false) override; + void SetValue(float time, const AZ::Color& value, bool bDefault = false) override; - virtual void OffsetKeyPosition(const Vec3& value); + void OffsetKeyPosition(const Vec3& value) override; - virtual void SetTimeRange(const Range& timeRange); + void SetTimeRange(const Range& timeRange) override; - virtual bool Serialize(IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true); + bool Serialize(IUiAnimationSystem* uiAnimationSystem, XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true) override; - virtual bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0); + bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0) override; - virtual int NextKeyByTime(int key) const; + int NextKeyByTime(int key) const override; void SetSubTrackName(const int i, const AZStd::string& name) { assert (i < MAX_SUBTRACKS); m_subTrackNames[i] = name; } #ifdef UI_ANIMATION_SYSTEM_SUPPORT_EDITING - virtual ColorB GetCustomColor() const + ColorB GetCustomColor() const override { return m_customColor; } - virtual void SetCustomColor(ColorB color) + void SetCustomColor(ColorB color) override { m_customColor = color; m_bCustomColorSet = true; } - virtual bool HasCustomColor() const + bool HasCustomColor() const override { return m_bCustomColorSet; } - virtual void ClearCustomColor() + void ClearCustomColor() override { m_bCustomColorSet = false; } #endif - virtual void GetKeyValueRange(float& fMin, float& fMax) const + void GetKeyValueRange(float& fMin, float& fMax) const override { if (GetSubTrackCount() > 0) { m_subTracks[0]->GetKeyValueRange(fMin, fMax); } }; - virtual void SetKeyValueRange(float fMin, float fMax) + void SetKeyValueRange(float fMin, float fMax) override { for (int i = 0; i < m_nDimensions; ++i) { diff --git a/Gems/LyShine/Code/Source/Animation/TrackEventTrack.h b/Gems/LyShine/Code/Source/Animation/TrackEventTrack.h index 5896b19a2a..c7499c15d0 100644 --- a/Gems/LyShine/Code/Source/Animation/TrackEventTrack.h +++ b/Gems/LyShine/Code/Source/Animation/TrackEventTrack.h @@ -66,9 +66,9 @@ public: ////////////////////////////////////////////////////////////////////////// // Overrides of IAnimTrack. ////////////////////////////////////////////////////////////////////////// - void GetKeyInfo(int key, const char*& description, float& duration); - void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading); - void SetKey(int index, IKey* key); + void GetKeyInfo(int key, const char*& description, float& duration) override; + void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading) override; + void SetKey(int index, IKey* key) override; void InitPostLoad(IUiAnimSequence* sequence) override; static void Reflect(AZ::SerializeContext* serializeContext); diff --git a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.h b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.h index c1dbdcfcda..c270d9ca60 100644 --- a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.h +++ b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.h @@ -44,94 +44,94 @@ public: ~UiAnimationSystem(); - void Release() { delete this; }; + void Release() override { delete this; }; - bool Load(const char* pszFile, const char* pszMission); + bool Load(const char* pszFile, const char* pszMission) override; - ISystem* GetSystem() { return m_pSystem; } + ISystem* GetSystem() override { return m_pSystem; } - IUiAnimTrack* CreateTrack(EUiAnimCurveType type); + IUiAnimTrack* CreateTrack(EUiAnimCurveType type) override; - IUiAnimSequence* CreateSequence(const char* sequence, bool bLoad = false, uint32 id = 0); + IUiAnimSequence* CreateSequence(const char* sequence, bool bLoad = false, uint32 id = 0) override; IUiAnimSequence* LoadSequence(const char* pszFilePath); - IUiAnimSequence* LoadSequence(XmlNodeRef& xmlNode, bool bLoadEmpty = true); + IUiAnimSequence* LoadSequence(XmlNodeRef& xmlNode, bool bLoadEmpty = true) override; - void AddSequence(IUiAnimSequence* pSequence); - void RemoveSequence(IUiAnimSequence* pSequence); - IUiAnimSequence* FindSequence(const char* sequence) const; - IUiAnimSequence* FindSequenceById(uint32 id) const; - IUiAnimSequence* GetSequence(int i) const; - int GetNumSequences() const; - IUiAnimSequence* GetPlayingSequence(int i) const; - int GetNumPlayingSequences() const; - bool IsCutScenePlaying() const; + void AddSequence(IUiAnimSequence* pSequence) override; + void RemoveSequence(IUiAnimSequence* pSequence) override; + IUiAnimSequence* FindSequence(const char* sequence) const override; + IUiAnimSequence* FindSequenceById(uint32 id) const override; + IUiAnimSequence* GetSequence(int i) const override; + int GetNumSequences() const override; + IUiAnimSequence* GetPlayingSequence(int i) const override; + int GetNumPlayingSequences() const override; + bool IsCutScenePlaying() const override; - uint32 GrabNextSequenceId() + uint32 GrabNextSequenceId() override { return m_nextSequenceId++; } - int OnSequenceRenamed(const char* before, const char* after); - int OnCameraRenamed(const char* before, const char* after); + int OnSequenceRenamed(const char* before, const char* after) override; + int OnCameraRenamed(const char* before, const char* after) override; - bool AddUiAnimationListener(IUiAnimSequence* pSequence, IUiAnimationListener* pListener); - bool RemoveUiAnimationListener(IUiAnimSequence* pSequence, IUiAnimationListener* pListener); + bool AddUiAnimationListener(IUiAnimSequence* pSequence, IUiAnimationListener* pListener) override; + bool RemoveUiAnimationListener(IUiAnimSequence* pSequence, IUiAnimationListener* pListener) override; - void RemoveAllSequences(); + void RemoveAllSequences() override; ////////////////////////////////////////////////////////////////////////// // Sequence playback. ////////////////////////////////////////////////////////////////////////// void PlaySequence(const char* sequence, IUiAnimSequence* parentSeq = NULL, bool bResetFX = true, - bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX); + bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX) override; void PlaySequence(IUiAnimSequence* seq, IUiAnimSequence* parentSeq = NULL, bool bResetFX = true, - bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX); - void PlayOnLoadSequences(); + bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX) override; + void PlayOnLoadSequences() override; - bool StopSequence(const char* sequence); - bool StopSequence(IUiAnimSequence* seq); - bool AbortSequence(IUiAnimSequence* seq, bool bLeaveTime = false); + bool StopSequence(const char* sequence) override; + bool StopSequence(IUiAnimSequence* seq) override; + bool AbortSequence(IUiAnimSequence* seq, bool bLeaveTime = false) override; - void StopAllSequences(); - void StopAllCutScenes(); + void StopAllSequences() override; + void StopAllCutScenes() override; void Pause(bool bPause); - void Reset(bool bPlayOnReset, bool bSeekToStart); - void StillUpdate(); - void PreUpdate(const float dt); - void PostUpdate(const float dt); - void Render(); + void Reset(bool bPlayOnReset, bool bSeekToStart) override; + void StillUpdate() override; + void PreUpdate(const float dt) override; + void PostUpdate(const float dt) override; + void Render() override; - bool IsPlaying(IUiAnimSequence* seq) const; + bool IsPlaying(IUiAnimSequence* seq) const override; - void Pause(); - void Resume(); + void Pause() override; + void Resume() override; - void SetRecording(bool recording) { m_bRecording = recording; }; - bool IsRecording() const { return m_bRecording; }; + void SetRecording(bool recording) override { m_bRecording = recording; }; + bool IsRecording() const override { return m_bRecording; }; - void SetCallback(IUiAnimationCallback* pCallback) { m_pCallback = pCallback; } - IUiAnimationCallback* GetCallback() { return m_pCallback; } + void SetCallback(IUiAnimationCallback* pCallback) override { m_pCallback = pCallback; } + IUiAnimationCallback* GetCallback() override { return m_pCallback; } void Callback(IUiAnimationCallback::ECallbackReason Reason, IUiAnimNode* pNode); - void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bRemoveOldNodes = false, bool bLoadEmpty = true); - void InitPostLoad(bool remapIds, LyShine::EntityIdMap* entityIdMap); + void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bRemoveOldNodes = false, bool bLoadEmpty = true) override; + void InitPostLoad(bool remapIds, LyShine::EntityIdMap* entityIdMap) override; - void SetSequenceStopBehavior(ESequenceStopBehavior behavior); - IUiAnimationSystem::ESequenceStopBehavior GetSequenceStopBehavior(); + void SetSequenceStopBehavior(ESequenceStopBehavior behavior) override; + IUiAnimationSystem::ESequenceStopBehavior GetSequenceStopBehavior() override; - float GetPlayingTime(IUiAnimSequence* pSeq); - bool SetPlayingTime(IUiAnimSequence* pSeq, float fTime); + float GetPlayingTime(IUiAnimSequence* pSeq) override; + bool SetPlayingTime(IUiAnimSequence* pSeq, float fTime) override; - float GetPlayingSpeed(IUiAnimSequence* pSeq); - bool SetPlayingSpeed(IUiAnimSequence* pSeq, float fTime); + float GetPlayingSpeed(IUiAnimSequence* pSeq) override; + bool SetPlayingSpeed(IUiAnimSequence* pSeq, float fTime) override; - bool GetStartEndTime(IUiAnimSequence* pSeq, float& fStartTime, float& fEndTime); - bool SetStartEndTime(IUiAnimSequence* pSeq, const float fStartTime, const float fEndTime); + bool GetStartEndTime(IUiAnimSequence* pSeq, float& fStartTime, float& fEndTime) override; + bool SetStartEndTime(IUiAnimSequence* pSeq, const float fStartTime, const float fEndTime) override; - void GoToFrame(const char* seqName, float targetFrame); + void GoToFrame(const char* seqName, float targetFrame) override; void SerializeNodeType(EUiAnimNodeType& animNodeType, XmlNodeRef& xmlNode, bool bLoading, const uint version, int flags); - virtual void SerializeParamType(CUiAnimParamType& animParamType, XmlNodeRef& xmlNode, bool bLoading, const uint version); - virtual void SerializeParamData(UiAnimParamData& animParamData, XmlNodeRef& xmlNode, bool bLoading); + void SerializeParamType(CUiAnimParamType& animParamType, XmlNodeRef& xmlNode, bool bLoading, const uint version) override; + void SerializeParamData(UiAnimParamData& animParamData, XmlNodeRef& xmlNode, bool bLoading) override; static const char* GetParamTypeName(const CUiAnimParamType& animParamType); @@ -156,8 +156,8 @@ private: void UpdateInternal(const float dt, const bool bPreUpdate); #ifdef UI_ANIMATION_SYSTEM_SUPPORT_EDITING - virtual EUiAnimNodeType GetNodeTypeFromString(const char* pString) const; - virtual CUiAnimParamType GetParamTypeFromString(const char* pString) const; + EUiAnimNodeType GetNodeTypeFromString(const char* pString) const override; + CUiAnimParamType GetParamTypeFromString(const char* pString) const override; #endif ISystem* m_pSystem; diff --git a/Gems/LyShine/Code/Source/LyShineSystemComponent.h b/Gems/LyShine/Code/Source/LyShineSystemComponent.h index 3d5e81f7c5..5b4086007b 100644 --- a/Gems/LyShine/Code/Source/LyShineSystemComponent.h +++ b/Gems/LyShine/Code/Source/LyShineSystemComponent.h @@ -65,7 +65,7 @@ namespace LyShine // UiSystemBus interface implementation void RegisterComponentTypeForMenuOrdering(const AZ::Uuid& typeUuid) override; const AZStd::vector* GetComponentTypesForMenuOrdering() override; - const AZStd::list* GetLyShineComponentDescriptors(); + const AZStd::list* GetLyShineComponentDescriptors() override; //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// @@ -89,7 +89,7 @@ namespace LyShine // CrySystemEventBus /////////////////////////////////////////////////////// void OnCrySystemInitialized(ISystem& system, const SSystemInitParams&) override; - virtual void OnCrySystemShutdown(ISystem&) override; + void OnCrySystemShutdown(ISystem&) override; //////////////////////////////////////////////////////////////////////////// void BroadcastCursorImagePathname(); 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/LyShine/Code/Source/UiLayoutFitterComponent.h b/Gems/LyShine/Code/Source/UiLayoutFitterComponent.h index d8ca9462bc..c5ceef4a74 100644 --- a/Gems/LyShine/Code/Source/UiLayoutFitterComponent.h +++ b/Gems/LyShine/Code/Source/UiLayoutFitterComponent.h @@ -72,7 +72,7 @@ protected: // member functions // ~AZ::Component // UiLayoutControllerInterface - unsigned int GetPriority() const; + unsigned int GetPriority() const override; // ~UiLayoutControllerInterface AZ_DISABLE_COPY_MOVE(UiLayoutFitterComponent); diff --git a/Gems/LyShine/Code/Source/UiScrollBarComponent.h b/Gems/LyShine/Code/Source/UiScrollBarComponent.h index 78bfa708c7..ba7abdf5e5 100644 --- a/Gems/LyShine/Code/Source/UiScrollBarComponent.h +++ b/Gems/LyShine/Code/Source/UiScrollBarComponent.h @@ -53,7 +53,7 @@ public: // member functions // UiScrollerInterface Orientation GetOrientation() override; - void SetOrientation(Orientation orientation); + void SetOrientation(Orientation orientation) override; AZ::EntityId GetScrollableEntity() override; void SetScrollableEntity(AZ::EntityId entityId) override; float GetValue() override; diff --git a/Gems/LyShine/Code/Source/UiTooltipDisplayComponent.h b/Gems/LyShine/Code/Source/UiTooltipDisplayComponent.h index 7aa0c0f618..d1fd53ec28 100644 --- a/Gems/LyShine/Code/Source/UiTooltipDisplayComponent.h +++ b/Gems/LyShine/Code/Source/UiTooltipDisplayComponent.h @@ -70,7 +70,7 @@ public: // member functions // ~UiInitializationInterface //! IUiAnimationListener - void OnUiAnimationEvent(EUiAnimationEvent uiAnimationEvent, IUiAnimSequence* pAnimSequence); + void OnUiAnimationEvent(EUiAnimationEvent uiAnimationEvent, IUiAnimSequence* pAnimSequence) override; // ~IUiAnimationListener State GetState(); diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimAZEntityNode.h b/Gems/Maestro/Code/Source/Cinematics/AnimAZEntityNode.h index f5af0a7ab8..68399aa53e 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimAZEntityNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/AnimAZEntityNode.h @@ -63,7 +63,7 @@ public: Vec3 GetScale() override; ////////////////////////////////////////////////////////////////////////// - void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks); + void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override; // this is an unfortunate hold-over from legacy entities - used when a SceneNode overrides the camera animation so // we must disable the transform and camera components from updating animation on this entity because the SceneNode diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimComponentNode.h b/Gems/Maestro/Code/Source/Cinematics/AnimComponentNode.h index 43f49e8b80..6f4fe4cdd6 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimComponentNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/AnimComponentNode.h @@ -86,7 +86,7 @@ public: // EditorSequenceAgentComponentNotificationBus::Handler Interface void OnSequenceAgentConnected() override; - void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks); + void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override; const AZ::Uuid& GetComponentTypeId() const { return m_componentTypeId; } diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimNode.h b/Gems/Maestro/Code/Source/Cinematics/AnimNode.h index 7c56d8f641..d0f22599e8 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/AnimNode.h @@ -46,7 +46,7 @@ public: ////////////////////////////////////////////////////////////////////////// void SetName(const char* name) override { m_name = name; }; - const char* GetName() { return m_name.c_str(); }; + const char* GetName() override { return m_name.c_str(); }; void SetSequence(IAnimSequence* sequence) override { m_pSequence = sequence; } // Return Animation Sequence that owns this node. @@ -60,7 +60,7 @@ public: int GetFlags() const override; bool AreFlagsSetOnNodeOrAnyParent(EAnimNodeFlags flagsToCheck) const override; - IMovieSystem* GetMovieSystem() const { return gEnv->pMovieSystem; }; + IMovieSystem* GetMovieSystem() const override { return gEnv->pMovieSystem; }; virtual void OnStart() {} void OnReset() override {} @@ -85,23 +85,23 @@ public: virtual Matrix34 GetReferenceMatrix() const; ////////////////////////////////////////////////////////////////////////// - bool IsParamValid(const CAnimParamType& paramType) const; + bool IsParamValid(const CAnimParamType& paramType) const override; AZStd::string GetParamName(const CAnimParamType& param) const override; - virtual AnimValueType GetParamValueType(const CAnimParamType& paramType) const; - virtual IAnimNode::ESupportedParamFlags GetParamFlags(const CAnimParamType& paramType) const; - virtual unsigned int GetParamCount() const { return 0; }; + AnimValueType GetParamValueType(const CAnimParamType& paramType) const override; + IAnimNode::ESupportedParamFlags GetParamFlags(const CAnimParamType& paramType) const override; + unsigned int GetParamCount() const override { return 0; }; - bool SetParamValue(float time, CAnimParamType param, float val); - bool SetParamValue(float time, CAnimParamType param, const Vec3& val); - bool SetParamValue(float time, CAnimParamType param, const Vec4& val); - bool GetParamValue(float time, CAnimParamType param, float& val); - bool GetParamValue(float time, CAnimParamType param, Vec3& val); - bool GetParamValue(float time, CAnimParamType param, Vec4& val); + bool SetParamValue(float time, CAnimParamType param, float val) override; + bool SetParamValue(float time, CAnimParamType param, const Vec3& val) override; + bool SetParamValue(float time, CAnimParamType param, const Vec4& val) override; + bool GetParamValue(float time, CAnimParamType param, float& val) override; + bool GetParamValue(float time, CAnimParamType param, Vec3& val) override; + bool GetParamValue(float time, CAnimParamType param, Vec4& val) override; void SetTarget([[maybe_unused]] IAnimNode* node) {}; IAnimNode* GetTarget() const { return 0; }; - void StillUpdate() {} + void StillUpdate() override {} void Animate(SAnimContext& ec) override; virtual void PrecacheStatic([[maybe_unused]] float startTime) {} @@ -114,7 +114,7 @@ public: IAnimNodeOwner* GetNodeOwner() override { return m_pOwner; }; // Called by sequence when needs to activate a node. - virtual void Activate(bool bActivate); + void Activate(bool bActivate) override; ////////////////////////////////////////////////////////////////////////// void SetParent(IAnimNode* parent) override; @@ -149,7 +149,7 @@ public: void SetId(int id) { m_id = id; } const char* GetNameFast() const { return m_name.c_str(); } - virtual void Render(){} + void Render() override{} void UpdateDynamicParams() final; @@ -177,7 +177,7 @@ protected: CMovieSystem* GetCMovieSystem() const { return (CMovieSystem*)gEnv->pMovieSystem; } - virtual bool NeedToRender() const { return false; } + bool NeedToRender() const override { return false; } // nodes which support sounds should override this to reset their start/stop sound states virtual void ResetSounds() {} diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimPostFXNode.h b/Gems/Maestro/Code/Source/Cinematics/AnimPostFXNode.h index 6ce44607aa..25c4c89b94 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimPostFXNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/AnimPostFXNode.h @@ -37,32 +37,32 @@ public: //----------------------------------------------------------------------------- //! - virtual void SerializeAnims(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks); + void SerializeAnims(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override; //----------------------------------------------------------------------------- //! - virtual unsigned int GetParamCount() const; - virtual CAnimParamType GetParamType(unsigned int nIndex) const; + unsigned int GetParamCount() const override; + CAnimParamType GetParamType(unsigned int nIndex) const override; //----------------------------------------------------------------------------- //! //----------------------------------------------------------------------------- //! - virtual void CreateDefaultTracks(); + void CreateDefaultTracks() override; - virtual void OnReset(); + void OnReset() override; //----------------------------------------------------------------------------- //! - virtual void Animate(SAnimContext& ac); + void Animate(SAnimContext& ac) override; void InitPostLoad(IAnimSequence* sequence) override; static void Reflect(AZ::ReflectContext* context); protected: - virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const; + bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override; typedef std::map< AnimNodeType, _smart_ptr > FxNodeDescriptionMap; static StaticInstance s_fxNodeDescriptions; diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimScreenFaderNode.h b/Gems/Maestro/Code/Source/Cinematics/AnimScreenFaderNode.h index 1e16cc5fb0..8f4b0de4fb 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimScreenFaderNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/AnimScreenFaderNode.h @@ -32,32 +32,32 @@ public: //----------------------------------------------------------------------------- //! Overrides from CAnimNode - virtual void Animate(SAnimContext& ac); + void Animate(SAnimContext& ac) override; - virtual void CreateDefaultTracks(); + void CreateDefaultTracks() override; - virtual void OnReset(); + void OnReset() override; - virtual void Activate(bool bActivate); + void Activate(bool bActivate) override; - virtual void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks); + void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override; //----------------------------------------------------------------------------- //! Overrides from IAnimNode - virtual unsigned int GetParamCount() const; - virtual CAnimParamType GetParamType(unsigned int nIndex) const; + unsigned int GetParamCount() const override; + CAnimParamType GetParamType(unsigned int nIndex) const override; void SetFlags(int flags) override; - virtual void Render(); + void Render() override; bool IsAnyTextureVisible() const; static void Reflect(AZ::ReflectContext* context); protected: - virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const; + bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override; - virtual bool NeedToRender() const { return true; } + bool NeedToRender() const override { return true; } private: CAnimScreenFaderNode(const CAnimScreenFaderNode&); diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimSequence.h b/Gems/Maestro/Code/Source/Cinematics/AnimSequence.h index 0a1d4a931c..f824cf519d 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimSequence.h +++ b/Gems/Maestro/Code/Source/Cinematics/AnimSequence.h @@ -40,48 +40,48 @@ public: // Movie system. IMovieSystem* GetMovieSystem() const { return m_pMovieSystem; }; - void SetName(const char* name); - const char* GetName() const; - uint32 GetId() const { return m_id; } + void SetName(const char* name) override; + const char* GetName() const override; + uint32 GetId() const override { return m_id; } void ResetId() override; float GetTime() const { return m_time; } void SetLegacySequenceObject(IAnimLegacySequenceObject* legacySequenceObject) override { m_legacySequenceObject = legacySequenceObject; } - virtual IAnimLegacySequenceObject* GetLegacySequenceObject() const override { return m_legacySequenceObject; } + IAnimLegacySequenceObject* GetLegacySequenceObject() const override { return m_legacySequenceObject; } void SetSequenceEntityId(const AZ::EntityId& sequenceEntityId) override; const AZ::EntityId& GetSequenceEntityId() const override { return m_sequenceEntityId; } - virtual void SetActiveDirector(IAnimNode* pDirectorNode); - virtual IAnimNode* GetActiveDirector() const; + void SetActiveDirector(IAnimNode* pDirectorNode) override; + IAnimNode* GetActiveDirector() const override; - virtual void SetFlags(int flags); - virtual int GetFlags() const; - virtual int GetCutSceneFlags(const bool localFlags = false) const; + void SetFlags(int flags) override; + int GetFlags() const override; + int GetCutSceneFlags(const bool localFlags = false) const override; - virtual void SetParentSequence(IAnimSequence* pParentSequence); - virtual const IAnimSequence* GetParentSequence() const; - virtual bool IsAncestorOf(const IAnimSequence* pSequence) const; + void SetParentSequence(IAnimSequence* pParentSequence) override; + const IAnimSequence* GetParentSequence() const override; + bool IsAncestorOf(const IAnimSequence* pSequence) const override; - void SetTimeRange(Range timeRange); - Range GetTimeRange() { return m_timeRange; }; + void SetTimeRange(Range timeRange) override; + Range GetTimeRange() override { return m_timeRange; }; - void AdjustKeysToTimeRange(const Range& timeRange); + void AdjustKeysToTimeRange(const Range& timeRange) override; //! Return number of animation nodes in sequence. - int GetNodeCount() const; + int GetNodeCount() const override; //! Get specified animation node. - IAnimNode* GetNode(int index) const; + IAnimNode* GetNode(int index) const override; - IAnimNode* FindNodeByName(const char* sNodeName, const IAnimNode* pParentDirector); + IAnimNode* FindNodeByName(const char* sNodeName, const IAnimNode* pParentDirector) override; IAnimNode* FindNodeById(int nNodeId); - virtual void ReorderNode(IAnimNode* node, IAnimNode* pPivotNode, bool next); + void ReorderNode(IAnimNode* node, IAnimNode* pPivotNode, bool next) override; - void Reset(bool bSeekToStart); - void ResetHard(); - void Pause(); - void Resume(); - bool IsPaused() const; + void Reset(bool bSeekToStart) override; + void ResetHard() override; + void Pause() override; + void Resume() override; + bool IsPaused() const override; virtual void OnStart(); virtual void OnStop(); @@ -90,49 +90,49 @@ public: void TimeChanged(float newTime) override; //! Add animation node to sequence. - bool AddNode(IAnimNode* node); - IAnimNode* CreateNode(AnimNodeType nodeType); - IAnimNode* CreateNode(XmlNodeRef node); + bool AddNode(IAnimNode* node) override; + IAnimNode* CreateNode(AnimNodeType nodeType) override; + IAnimNode* CreateNode(XmlNodeRef node) override; void RemoveNode(IAnimNode* node, bool removeChildRelationships=true) override; //! Add scene node to sequence. - void RemoveAll(); + void RemoveAll() override; - virtual void Activate(); - virtual bool IsActivated() const { return m_bActive; } - virtual void Deactivate(); + void Activate() override; + bool IsActivated() const override { return m_bActive; } + void Deactivate() override; - virtual void PrecacheData(float startTime); + void PrecacheData(float startTime) override; void PrecacheStatic(const float startTime); void PrecacheDynamic(float time); - void StillUpdate(); - void Animate(const SAnimContext& ec); - void Render(); + void StillUpdate() override; + void Animate(const SAnimContext& ec) override; + void Render() override; void InitPostLoad() override; - void CopyNodes(XmlNodeRef& xmlNode, IAnimNode** pSelectedNodes, uint32 count); - void PasteNodes(const XmlNodeRef& xmlNode, IAnimNode* pParent); + void CopyNodes(XmlNodeRef& xmlNode, IAnimNode** pSelectedNodes, uint32 count) override; + void PasteNodes(const XmlNodeRef& xmlNode, IAnimNode* pParent) override; //! Add/remove track events in sequence - virtual bool AddTrackEvent(const char* szEvent); - virtual bool RemoveTrackEvent(const char* szEvent); - virtual bool RenameTrackEvent(const char* szEvent, const char* szNewEvent); - virtual bool MoveUpTrackEvent(const char* szEvent); - virtual bool MoveDownTrackEvent(const char* szEvent); - virtual void ClearTrackEvents(); + bool AddTrackEvent(const char* szEvent) override; + bool RemoveTrackEvent(const char* szEvent) override; + bool RenameTrackEvent(const char* szEvent, const char* szNewEvent) override; + bool MoveUpTrackEvent(const char* szEvent) override; + bool MoveDownTrackEvent(const char* szEvent) override; + void ClearTrackEvents() override; //! Get the track events in the sequence - virtual int GetTrackEventsCount() const; - virtual char const* GetTrackEvent(int iIndex) const; - virtual IAnimStringTable* GetTrackEventStringTable() { return m_pEventStrings.get(); } + int GetTrackEventsCount() const override; + char const* GetTrackEvent(int iIndex) const override; + IAnimStringTable* GetTrackEventStringTable() override { return m_pEventStrings.get(); } //! Call to trigger a track event - virtual void TriggerTrackEvent(const char* event, const char* param = NULL); + void TriggerTrackEvent(const char* event, const char* param = NULL) override; //! Track event listener - virtual void AddTrackEventListener(ITrackEventListener* pListener); - virtual void RemoveTrackEventListener(ITrackEventListener* pListener); + void AddTrackEventListener(ITrackEventListener* pListener) override; + void RemoveTrackEventListener(ITrackEventListener* pListener) override; SequenceType GetSequenceType() const override { return m_sequenceType; } diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimSplineTrack.h b/Gems/Maestro/Code/Source/Cinematics/AnimSplineTrack.h index 46dcb63daa..6388c9709e 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimSplineTrack.h +++ b/Gems/Maestro/Code/Source/Cinematics/AnimSplineTrack.h @@ -52,24 +52,24 @@ public: ////////////////////////////////////////////////////////////////////////// - virtual int GetSubTrackCount() const { return 0; }; - virtual IAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const { return 0; }; - AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const { return AZStd::string(); }; - virtual void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) { assert(0); } + int GetSubTrackCount() const override { return 0; }; + IAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const override { return 0; }; + AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const override { return AZStd::string(); }; + void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) override { assert(0); } void SetNode(IAnimNode* node) override { m_node = node; } // Return Animation Node that owns this Track. IAnimNode* GetNode() override { return m_node; } - virtual const CAnimParamType& GetParameterType() const { return m_nParamType; }; - virtual void SetParameterType(CAnimParamType type) { m_nParamType = type; }; + const CAnimParamType& GetParameterType() const override { return m_nParamType; }; + void SetParameterType(CAnimParamType type) override { m_nParamType = type; }; - virtual void GetKeyValueRange(float& fMin, float& fMax) const { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; - virtual void SetKeyValueRange(float fMin, float fMax){ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; }; + void GetKeyValueRange(float& fMin, float& fMax) const override { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; + void SetKeyValueRange(float fMin, float fMax) override{ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; }; - ISplineInterpolator* GetSpline() const { return m_spline.get(); }; + ISplineInterpolator* GetSpline() const override { return m_spline.get(); }; - virtual bool IsKeySelected(int key) const + bool IsKeySelected(int key) const override { if (GetSpline() && GetSpline()->IsKeySelectedAtAnyDimension(key)) { @@ -78,7 +78,7 @@ public: return false; } - virtual void SelectKey(int key, bool select) + void SelectKey(int key, bool select) override { if (GetSpline()) { @@ -86,22 +86,22 @@ public: } } - int GetNumKeys() const + int GetNumKeys() const override { return m_spline->num_keys(); } - void SetNumKeys(int numKeys) + void SetNumKeys(int numKeys) override { m_spline->resize(numKeys); } - bool HasKeys() const + bool HasKeys() const override { return GetNumKeys() != 0; } - void RemoveKey(int num) + void RemoveKey(int num) override { if (m_spline && m_spline->num_keys() > num) { @@ -113,7 +113,7 @@ public: } } - void GetKey(int index, IKey* key) const + void GetKey(int index, IKey* key) const override { assert(index >= 0 && index < GetNumKeys()); assert(key != 0); @@ -131,7 +131,7 @@ public: tcbkey->SetValue(k.value); } - void SetKey(int index, IKey* key) + void SetKey(int index, IKey* key) override { assert(index >= 0 && index < GetNumKeys()); assert(key != 0); @@ -148,71 +148,71 @@ public: Invalidate(); } - float GetKeyTime(int index) const + float GetKeyTime(int index) const override { assert(index >= 0 && index < GetNumKeys()); return m_spline->time(index); } - void SetKeyTime(int index, float time) + void SetKeyTime(int index, float time) override { assert(index >= 0 && index < GetNumKeys()); m_spline->SetKeyTime(index, time); Invalidate(); } - int GetKeyFlags(int index) + int GetKeyFlags(int index) override { assert(index >= 0 && index < GetNumKeys()); return m_spline->key(index).flags; } - void SetKeyFlags(int index, int flags) + void SetKeyFlags(int index, int flags) override { assert(index >= 0 && index < GetNumKeys()); m_spline->key(index).flags = flags; } - virtual EAnimCurveType GetCurveType() { assert(0); return eAnimCurveType_Unknown; } - virtual AnimValueType GetValueType() { assert(0); return static_cast(0xFFFFFFFF); } + EAnimCurveType GetCurveType() override { assert(0); return eAnimCurveType_Unknown; } + AnimValueType GetValueType() override { assert(0); return static_cast(0xFFFFFFFF); } - virtual void GetValue(float time, float& value, bool applyMultiplier = false) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); } - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends& value) { assert(0); } + void GetValue(float time, float& value, bool applyMultiplier = false) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends& value) override { assert(0); } - virtual void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); } - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends& value, [[maybe_unused]] bool bDefault = false) { assert(0); } + void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } - virtual void OffsetKeyPosition([[maybe_unused]] const Vec3& value) { assert(0); }; - virtual void UpdateKeyDataAfterParentChanged([[maybe_unused]] const AZ::Transform& oldParentWorldTM, [[maybe_unused]] const AZ::Transform& newParentWorldTM) { assert(0); }; + void OffsetKeyPosition([[maybe_unused]] const Vec3& value) override { assert(0); }; + void UpdateKeyDataAfterParentChanged([[maybe_unused]] const AZ::Transform& oldParentWorldTM, [[maybe_unused]] const AZ::Transform& newParentWorldTM) override { assert(0); }; - bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks); - bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset); + bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override; + bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected, float fTimeOffset) override; - void GetKeyInfo(int key, const char*& description, float& duration) + void GetKeyInfo(int key, const char*& description, float& duration) override { description = 0; duration = 0; } //! Sort keys in track (after time of keys was modified). - void SortKeys() + void SortKeys() override { m_spline->sort_keys(); }; //! Get track flags. - int GetFlags() { return m_flags; }; + int GetFlags() override { return m_flags; }; //! Check if track is masked by mask - virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; } + bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; } //! Set track flags. - void SetFlags(int flags) + void SetFlags(int flags) override { m_flags = flags; if (m_flags & eAnimTrackFlags_Loop) @@ -234,12 +234,12 @@ public: m_spline->flag_set(Spline::MODIFIED); }; - void SetTimeRange(const Range& timeRange) + void SetTimeRange(const Range& timeRange) override { m_spline->SetRange(timeRange.start, timeRange.end); } - int FindKey(float time) + int FindKey(float time) override { // Find key with given time. int num = m_spline->num_keys(); @@ -255,7 +255,7 @@ public: } //! Create key at given time, and return its index. - int CreateKey(float time) + int CreateKey(float time) override { ValueType value; @@ -275,12 +275,12 @@ public: return m_spline->InsertKey(time, tmp); } - int CloneKey(int srcKey) + int CloneKey(int srcKey) override { return CopyKey(this, srcKey); } - int CopyKey(IAnimTrack* pFromTrack, int nFromKey) + int CopyKey(IAnimTrack* pFromTrack, int nFromKey) override { ITcbKey key; pFromTrack->GetKey(nFromKey, &key); @@ -329,16 +329,16 @@ public: m_defaultValue = value; } - virtual ColorB GetCustomColor() const + ColorB GetCustomColor() const { return m_customColor; } - virtual void SetCustomColor(ColorB color) + void SetCustomColor(ColorB color) { m_customColor = color; m_bCustomColorSet = true; } - virtual bool HasCustomColor() const + bool HasCustomColor() const { return m_bCustomColorSet; } - virtual void ClearCustomColor() + void ClearCustomColor() { m_bCustomColorSet = false; } void SetMultiplier(float trackMultiplier) override @@ -346,12 +346,12 @@ public: m_trackMultiplier = trackMultiplier; } - void SetExpanded([[maybe_unused]] bool expanded) + void SetExpanded([[maybe_unused]] bool expanded) override { AZ_Assert(false, "Not expected to be used."); } - bool GetExpanded() const + bool GetExpanded() const override { return false; } diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimTrack.h b/Gems/Maestro/Code/Source/Cinematics/AnimTrack.h index e16f64c7c1..e39ae3e2ee 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimTrack.h +++ b/Gems/Maestro/Code/Source/Cinematics/AnimTrack.h @@ -28,20 +28,20 @@ public: TAnimTrack(); - virtual EAnimCurveType GetCurveType() { return eAnimCurveType_Unknown; }; - virtual AnimValueType GetValueType() { return kAnimValueUnknown; } + EAnimCurveType GetCurveType() override { return eAnimCurveType_Unknown; }; + AnimValueType GetValueType() override { return kAnimValueUnknown; } void SetNode(IAnimNode* node) override { m_node = node; } // Return Animation Node that owns this Track. IAnimNode* GetNode() override { return m_node; } - virtual int GetSubTrackCount() const { return 0; }; - virtual IAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const { return 0; }; + int GetSubTrackCount() const override { return 0; }; + IAnimTrack* GetSubTrack([[maybe_unused]] int nIndex) const override { return 0; }; AZStd::string GetSubTrackName([[maybe_unused]] int nIndex) const override { return AZStd::string(); }; - virtual void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) { assert(0); } + void SetSubTrackName([[maybe_unused]] int nIndex, [[maybe_unused]] const char* name) override { assert(0); } - virtual const CAnimParamType& GetParameterType() const { return m_nParamType; }; - virtual void SetParameterType(CAnimParamType type) { m_nParamType = type; }; + const CAnimParamType& GetParameterType() const override { return m_nParamType; }; + void SetParameterType(CAnimParamType type) override { m_nParamType = type; }; ////////////////////////////////////////////////////////////////////////// // for intrusive_ptr support @@ -49,7 +49,7 @@ public: void release() override; ////////////////////////////////////////////////////////////////////////// - virtual bool IsKeySelected(int key) const + bool IsKeySelected(int key) const override { AZ_Assert(key >= 0 && key < (int)m_keys.size(), "Key index is out of range"); if (m_keys[key].flags & AKEY_SELECTED) @@ -59,7 +59,7 @@ public: return false; } - virtual void SelectKey(int key, bool select) + void SelectKey(int key, bool select) override { AZ_Assert(key >= 0 && key < (int)m_keys.size(), "Key index is out of range"); if (select) @@ -96,59 +96,59 @@ public: } //! Return number of keys in track. - virtual int GetNumKeys() const { return static_cast(m_keys.size()); }; + int GetNumKeys() const override { return static_cast(m_keys.size()); }; //! Return true if keys exists in this track - virtual bool HasKeys() const { return !m_keys.empty(); } + bool HasKeys() const override { return !m_keys.empty(); } //! Set number of keys in track. //! If needed adds empty keys at end or remove keys from end. - virtual void SetNumKeys(int numKeys) { m_keys.resize(numKeys); }; + void SetNumKeys(int numKeys) override { m_keys.resize(numKeys); }; //! Remove specified key. - virtual void RemoveKey(int num); + void RemoveKey(int num) override; - int CreateKey(float time); - int CloneKey(int fromKey); - int CopyKey(IAnimTrack* pFromTrack, int nFromKey); + int CreateKey(float time) override; + int CloneKey(int fromKey) override; + int CopyKey(IAnimTrack* pFromTrack, int nFromKey) override; //! Get key at specified location. //! @param key Must be valid pointer to compatible key structure, to be filled with specified key location. - virtual void GetKey(int index, IKey* key) const; + void GetKey(int index, IKey* key) const override; //! Get time of specified key. //! @return key time. - virtual float GetKeyTime(int index) const; + float GetKeyTime(int index) const override; //! Find key at given time. //! @return Index of found key, or -1 if key with this time not found. - virtual int FindKey(float time); + int FindKey(float time) override; //! Get flags of specified key. //! @return key time. - virtual int GetKeyFlags(int index); + int GetKeyFlags(int index) override; //! Set key at specified location. //! @param key Must be valid pointer to compatible key structure. - virtual void SetKey(int index, IKey* key); + void SetKey(int index, IKey* key) override; //! Set time of specified key. - virtual void SetKeyTime(int index, float time); + void SetKeyTime(int index, float time) override; //! Set flags of specified key. - virtual void SetKeyFlags(int index, int flags); + void SetKeyFlags(int index, int flags) override; //! Sort keys in track (after time of keys was modified). - virtual void SortKeys(); + void SortKeys() override; //! Get track flags. - virtual int GetFlags() { return m_flags; }; + int GetFlags() override { return m_flags; }; //! Check if track is masked - virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; } + bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; } //! Set track flags. - virtual void SetFlags(int flags) + void SetFlags(int flags) override { m_flags = flags; } @@ -157,37 +157,37 @@ public: // Get track value at specified time. // Interpolates keys if needed. ////////////////////////////////////////////////////////////////////////// - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] float& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends& value) { assert(0); } + void GetValue([[maybe_unused]] float time, [[maybe_unused]] float& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec3& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Vec4& value, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Quat& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends& value) override { assert(0); } ////////////////////////////////////////////////////////////////////////// // Set track value at specified time. // Adds new keys if required. ////////////////////////////////////////////////////////////////////////// - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const float& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends& value, [[maybe_unused]] bool bDefault = false) { assert(0); } + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const float& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec3& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Vec4& value, [[maybe_unused]] bool bDefault = false, [[maybe_unused]] bool applyMultiplier = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Quat& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } - virtual void OffsetKeyPosition([[maybe_unused]] const Vec3& value) { assert(0); }; - virtual void UpdateKeyDataAfterParentChanged([[maybe_unused]] const AZ::Transform& oldParentWorldTM, [[maybe_unused]] const AZ::Transform& newParentWorldTM) { assert(0); }; + void OffsetKeyPosition([[maybe_unused]] const Vec3& value) override { assert(0); }; + void UpdateKeyDataAfterParentChanged([[maybe_unused]] const AZ::Transform& oldParentWorldTM, [[maybe_unused]] const AZ::Transform& newParentWorldTM) override { assert(0); }; /** Assign active time range for this track. */ - virtual void SetTimeRange(const Range& timeRange) { m_timeRange = timeRange; }; + void SetTimeRange(const Range& timeRange) override { m_timeRange = timeRange; }; /** Serialize this animation track to XML. Do not override this method, prefer to override SerializeKey. */ - virtual bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true); + bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true) override; - virtual bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0); + bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0) override; /** Serialize single key of this track. @@ -204,33 +204,33 @@ public: int GetActiveKey(float time, KeyType* key); #ifdef MOVIESYSTEM_SUPPORT_EDITING - virtual ColorB GetCustomColor() const + ColorB GetCustomColor() const override { return m_customColor; } - virtual void SetCustomColor(ColorB color) + void SetCustomColor(ColorB color) override { m_customColor = color; m_bCustomColorSet = true; } - virtual bool HasCustomColor() const + bool HasCustomColor() const override { return m_bCustomColorSet; } - virtual void ClearCustomColor() + void ClearCustomColor() override { m_bCustomColorSet = false; } #endif - virtual void GetKeyValueRange(float& fMin, float& fMax) const { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; - virtual void SetKeyValueRange(float fMin, float fMax){ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; }; + void GetKeyValueRange(float& fMin, float& fMax) const override { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; + void SetKeyValueRange(float fMin, float fMax) override{ m_fMinKeyValue = fMin; m_fMaxKeyValue = fMax; }; void SetMultiplier(float trackMultiplier) override { m_trackMultiplier = trackMultiplier; } - void SetExpanded([[maybe_unused]] bool expanded) + void SetExpanded([[maybe_unused]] bool expanded) override { AZ_Assert(false, "Not expected to be used."); } - bool GetExpanded() const + bool GetExpanded() const override { return false; } diff --git a/Gems/Maestro/Code/Source/Cinematics/BoolTrack.h b/Gems/Maestro/Code/Source/Cinematics/BoolTrack.h index edee77437c..a24f695b56 100644 --- a/Gems/Maestro/Code/Source/Cinematics/BoolTrack.h +++ b/Gems/Maestro/Code/Source/Cinematics/BoolTrack.h @@ -28,14 +28,14 @@ public: CBoolTrack(); - virtual AnimValueType GetValueType(); + AnimValueType GetValueType() override; - virtual void GetValue(float time, bool& value); - virtual void SetValue(float time, const bool& value, bool bDefault = false); + void GetValue(float time, bool& value) override; + void SetValue(float time, const bool& value, bool bDefault = false) override; - void SerializeKey([[maybe_unused]] IBoolKey& key, [[maybe_unused]] XmlNodeRef& keyNode, [[maybe_unused]] bool bLoading) {}; - void GetKeyInfo(int key, const char*& description, float& duration); + void SerializeKey([[maybe_unused]] IBoolKey& key, [[maybe_unused]] XmlNodeRef& keyNode, [[maybe_unused]] bool bLoading) override {}; + void GetKeyInfo(int key, const char*& description, float& duration) override; void SetDefaultValue(const bool bDefaultValue); diff --git a/Gems/Maestro/Code/Source/Cinematics/CVarNode.h b/Gems/Maestro/Code/Source/Cinematics/CVarNode.h index 5068140f11..af5ce43b2f 100644 --- a/Gems/Maestro/Code/Source/Cinematics/CVarNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/CVarNode.h @@ -26,21 +26,21 @@ public: ////////////////////////////////////////////////////////////////////////// // Overrides from CAnimNode ////////////////////////////////////////////////////////////////////////// - void SetName(const char* name); - void Animate(SAnimContext& ec); - void CreateDefaultTracks(); - void OnReset(); - void OnResume(); + void SetName(const char* name) override; + void Animate(SAnimContext& ec) override; + void CreateDefaultTracks() override; + void OnReset() override; + void OnResume() override; - virtual unsigned int GetParamCount() const; - virtual CAnimParamType GetParamType(unsigned int nIndex) const; + unsigned int GetParamCount() const override; + CAnimParamType GetParamType(unsigned int nIndex) const override; int GetDefaultKeyTangentFlags() const override; static void Reflect(AZ::ReflectContext* context); protected: - virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const; + bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override; private: float m_value; diff --git a/Gems/Maestro/Code/Source/Cinematics/CompoundSplineTrack.h b/Gems/Maestro/Code/Source/Cinematics/CompoundSplineTrack.h index 443bad584b..4d7065a06d 100644 --- a/Gems/Maestro/Code/Source/Cinematics/CompoundSplineTrack.h +++ b/Gems/Maestro/Code/Source/Cinematics/CompoundSplineTrack.h @@ -36,41 +36,41 @@ public: // Return Animation Node that owns this Track. IAnimNode* GetNode() override { return m_node; } - virtual int GetSubTrackCount() const { return m_nDimensions; }; - virtual IAnimTrack* GetSubTrack(int nIndex) const; - AZStd::string GetSubTrackName(int nIndex) const; - virtual void SetSubTrackName(int nIndex, const char* name); + int GetSubTrackCount() const override { return m_nDimensions; }; + IAnimTrack* GetSubTrack(int nIndex) const override; + AZStd::string GetSubTrackName(int nIndex) const override; + void SetSubTrackName(int nIndex, const char* name) override; - virtual EAnimCurveType GetCurveType() { return eAnimCurveType_BezierFloat; }; - virtual AnimValueType GetValueType() { return m_valueType; }; + EAnimCurveType GetCurveType() override { return eAnimCurveType_BezierFloat; }; + AnimValueType GetValueType() override { return m_valueType; }; - virtual const CAnimParamType& GetParameterType() const { return m_nParamType; }; - virtual void SetParameterType(CAnimParamType type) { m_nParamType = type; } + const CAnimParamType& GetParameterType() const override { return m_nParamType; }; + void SetParameterType(CAnimParamType type) override { m_nParamType = type; } - virtual int GetNumKeys() const; - virtual void SetNumKeys([[maybe_unused]] int numKeys) { assert(0); }; - virtual bool HasKeys() const; - virtual void RemoveKey(int num); + int GetNumKeys() const override; + void SetNumKeys([[maybe_unused]] int numKeys) override { assert(0); }; + bool HasKeys() const override; + void RemoveKey(int num) override; - virtual void GetKeyInfo(int key, const char*& description, float& duration); - virtual int CreateKey([[maybe_unused]] float time) { assert(0); return 0; }; - virtual int CloneKey([[maybe_unused]] int fromKey) { assert(0); return 0; }; - virtual int CopyKey([[maybe_unused]] IAnimTrack* pFromTrack, [[maybe_unused]] int nFromKey) { assert(0); return 0; }; - virtual void GetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) const { assert(0); }; - virtual float GetKeyTime(int index) const; - virtual int FindKey([[maybe_unused]] float time) { assert(0); return 0; }; - virtual int GetKeyFlags([[maybe_unused]] int index) { assert(0); return 0; }; - virtual void SetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) { assert(0); }; - virtual void SetKeyTime(int index, float time); - virtual void SetKeyFlags([[maybe_unused]] int index, [[maybe_unused]] int flags) { assert(0); }; - virtual void SortKeys() { assert(0); }; + void GetKeyInfo(int key, const char*& description, float& duration) override; + int CreateKey([[maybe_unused]] float time) override { assert(0); return 0; }; + int CloneKey([[maybe_unused]] int fromKey) override { assert(0); return 0; }; + int CopyKey([[maybe_unused]] IAnimTrack* pFromTrack, [[maybe_unused]] int nFromKey) override { assert(0); return 0; }; + void GetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) const override { assert(0); }; + float GetKeyTime(int index) const override; + int FindKey([[maybe_unused]] float time) override { assert(0); return 0; }; + int GetKeyFlags([[maybe_unused]] int index) override { assert(0); return 0; }; + void SetKey([[maybe_unused]] int index, [[maybe_unused]] IKey* key) override { assert(0); }; + void SetKeyTime(int index, float time) override; + void SetKeyFlags([[maybe_unused]] int index, [[maybe_unused]] int flags) override { assert(0); }; + void SortKeys() override { assert(0); }; - virtual bool IsKeySelected(int key) const; - virtual void SelectKey(int key, bool select); + bool IsKeySelected(int key) const override; + void SelectKey(int key, bool select) override; - virtual int GetFlags() { return m_flags; }; - virtual bool IsMasked([[maybe_unused]] const uint32 mask) const { return false; } - virtual void SetFlags(int flags) + int GetFlags() override { return m_flags; }; + bool IsMasked([[maybe_unused]] const uint32 mask) const override { return false; } + void SetFlags(int flags) override { m_flags = flags; } @@ -79,59 +79,59 @@ public: // Get track value at specified time. // Interpolates keys if needed. ////////////////////////////////////////////////////////////////////////// - virtual void GetValue(float time, float& value, bool applyMultiplier = false); - virtual void GetValue(float time, Vec3& value, bool applyMultiplier = false); - virtual void GetValue(float time, Vec4& value, bool applyMultiplier = false); - virtual void GetValue(float time, Quat& value); - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) { assert(0); }; - virtual void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends& value) { assert(0); } + void GetValue(float time, float& value, bool applyMultiplier = false) override; + void GetValue(float time, Vec3& value, bool applyMultiplier = false) override; + void GetValue(float time, Vec4& value, bool applyMultiplier = false) override; + void GetValue(float time, Quat& value) override; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] bool& value) override { assert(0); }; + void GetValue([[maybe_unused]] float time, [[maybe_unused]] Maestro::AssetBlends& value) override { assert(0); } ////////////////////////////////////////////////////////////////////////// // Set track value at specified time. // Adds new keys if required. ////////////////////////////////////////////////////////////////////////// - virtual void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false); - virtual void SetValue(float time, const Vec3& value, bool bDefault = false, bool applyMultiplier = false); - void SetValue(float time, const Vec4& value, bool bDefault = false, bool applyMultiplier = false); - virtual void SetValue(float time, const Quat& value, bool bDefault = false); - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) { assert(0); }; - virtual void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends& value, [[maybe_unused]] bool bDefault = false) { assert(0); } + void SetValue(float time, const float& value, bool bDefault = false, bool applyMultiplier = false) override; + void SetValue(float time, const Vec3& value, bool bDefault = false, bool applyMultiplier = false) override; + void SetValue(float time, const Vec4& value, bool bDefault = false, bool applyMultiplier = false) override; + void SetValue(float time, const Quat& value, bool bDefault = false) override; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const bool& value, [[maybe_unused]] bool bDefault = false) override { assert(0); }; + void SetValue([[maybe_unused]] float time, [[maybe_unused]] const Maestro::AssetBlends& value, [[maybe_unused]] bool bDefault = false) override { assert(0); } - virtual void OffsetKeyPosition(const Vec3& value); - virtual void UpdateKeyDataAfterParentChanged(const AZ::Transform& oldParentWorldTM, const AZ::Transform& newParentWorldTM); + void OffsetKeyPosition(const Vec3& value) override; + void UpdateKeyDataAfterParentChanged(const AZ::Transform& oldParentWorldTM, const AZ::Transform& newParentWorldTM) override; - virtual void SetTimeRange(const Range& timeRange); + void SetTimeRange(const Range& timeRange) override; - virtual bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true); + bool Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks = true) override; - virtual bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0); + bool SerializeSelection(XmlNodeRef& xmlNode, bool bLoading, bool bCopySelected = false, float fTimeOffset = 0) override; - virtual int NextKeyByTime(int key) const; + int NextKeyByTime(int key) const override; void SetSubTrackName(const int i, const AZStd::string& name) { assert (i < MAX_SUBTRACKS); m_subTrackNames[i] = name; } #ifdef MOVIESYSTEM_SUPPORT_EDITING - virtual ColorB GetCustomColor() const + ColorB GetCustomColor() const override { return m_customColor; } - virtual void SetCustomColor(ColorB color) + void SetCustomColor(ColorB color) override { m_customColor = color; m_bCustomColorSet = true; } - virtual bool HasCustomColor() const + bool HasCustomColor() const override { return m_bCustomColorSet; } - virtual void ClearCustomColor() + void ClearCustomColor() override { m_bCustomColorSet = false; } #endif - virtual void GetKeyValueRange(float& fMin, float& fMax) const + void GetKeyValueRange(float& fMin, float& fMax) const override { if (GetSubTrackCount() > 0) { m_subTracks[0]->GetKeyValueRange(fMin, fMax); } }; - virtual void SetKeyValueRange(float fMin, float fMax) + void SetKeyValueRange(float fMin, float fMax) override { for (int i = 0; i < m_nDimensions; ++i) { diff --git a/Gems/Maestro/Code/Source/Cinematics/EventTrack.h b/Gems/Maestro/Code/Source/Cinematics/EventTrack.h index afe7eb6602..6430119e5e 100644 --- a/Gems/Maestro/Code/Source/Cinematics/EventTrack.h +++ b/Gems/Maestro/Code/Source/Cinematics/EventTrack.h @@ -33,9 +33,9 @@ public: ////////////////////////////////////////////////////////////////////////// // Overrides of IAnimTrack. ////////////////////////////////////////////////////////////////////////// - void GetKeyInfo(int key, const char*& description, float& duration); - void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading); - void SetKey(int index, IKey* key); + void GetKeyInfo(int key, const char*& description, float& duration) override; + void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading) override; + void SetKey(int index, IKey* key) override; void InitPostLoad(IAnimSequence* sequence) override; static void Reflect(AZ::ReflectContext* context); diff --git a/Gems/Maestro/Code/Source/Cinematics/MaterialNode.h b/Gems/Maestro/Code/Source/Cinematics/MaterialNode.h index fcc308e5c8..5878ee0269 100644 --- a/Gems/Maestro/Code/Source/Cinematics/MaterialNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/MaterialNode.h @@ -26,19 +26,19 @@ public: CAnimMaterialNode(const int id); static void Initialize(); - virtual void SetName(const char* name); + void SetName(const char* name) override; ////////////////////////////////////////////////////////////////////////// // Overrides from CAnimNode ////////////////////////////////////////////////////////////////////////// - void Animate(SAnimContext& ec); + void Animate(SAnimContext& ec) override; void AddTrack(IAnimTrack* track) override; ////////////////////////////////////////////////////////////////////////// // Supported tracks description. ////////////////////////////////////////////////////////////////////////// - virtual unsigned int GetParamCount() const; - virtual CAnimParamType GetParamType(unsigned int nIndex) const; + unsigned int GetParamCount() const override; + CAnimParamType GetParamType(unsigned int nIndex) const override; AZStd::string GetParamName(const CAnimParamType& paramType) const override; virtual void GetKeyValueRange(float& fMin, float& fMax) const { fMin = m_fMinKeyValue; fMax = m_fMaxKeyValue; }; @@ -49,7 +49,7 @@ public: static void Reflect(AZ::ReflectContext* context); protected: - virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const; + bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override; void UpdateDynamicParamsInternal() override; private: diff --git a/Gems/Maestro/Code/Source/Cinematics/Movie.h b/Gems/Maestro/Code/Source/Cinematics/Movie.h index 8ab888178d..15295da353 100644 --- a/Gems/Maestro/Code/Source/Cinematics/Movie.h +++ b/Gems/Maestro/Code/Source/Cinematics/Movie.h @@ -42,7 +42,7 @@ class CLightAnimWrapper { public: // ILightAnimWrapper interface - virtual bool Resolve(); + bool Resolve() override; public: static CLightAnimWrapper* Create(const char* name); @@ -80,116 +80,116 @@ public: CMovieSystem(ISystem* system); CMovieSystem(); - void Release() { delete this; }; + void Release() override { delete this; }; - void SetUser(IMovieUser* pUser) { m_pUser = pUser; } - IMovieUser* GetUser() { return m_pUser; } + void SetUser(IMovieUser* pUser) override { m_pUser = pUser; } + IMovieUser* GetUser() override { return m_pUser; } - ISystem* GetSystem() { return m_pSystem; } + ISystem* GetSystem() override { return m_pSystem; } - IAnimSequence* CreateSequence(const char* sequence, bool bLoad = false, uint32 id = 0, SequenceType = kSequenceTypeDefault, AZ::EntityId entityId = AZ::EntityId()); + IAnimSequence* CreateSequence(const char* sequence, bool bLoad = false, uint32 id = 0, SequenceType = kSequenceTypeDefault, AZ::EntityId entityId = AZ::EntityId()) override; - void AddSequence(IAnimSequence* pSequence); - void RemoveSequence(IAnimSequence* pSequence); + void AddSequence(IAnimSequence* pSequence) override; + void RemoveSequence(IAnimSequence* pSequence) override; IAnimSequence* FindLegacySequenceByName(const char* sequence) const override; IAnimSequence* FindSequence(const AZ::EntityId& componentEntitySequenceId) const override; IAnimSequence* FindSequenceById(uint32 id) const override; - IAnimSequence* GetSequence(int i) const; - int GetNumSequences() const; - IAnimSequence* GetPlayingSequence(int i) const; - int GetNumPlayingSequences() const; - bool IsCutScenePlaying() const; + IAnimSequence* GetSequence(int i) const override; + int GetNumSequences() const override; + IAnimSequence* GetPlayingSequence(int i) const override; + int GetNumPlayingSequences() const override; + bool IsCutScenePlaying() const override; uint32 GrabNextSequenceId() override { return m_nextSequenceId++; } void OnSetSequenceId(uint32 sequenceId) override; - int OnSequenceRenamed(const char* before, const char* after); - int OnCameraRenamed(const char* before, const char* after); + int OnSequenceRenamed(const char* before, const char* after) override; + int OnCameraRenamed(const char* before, const char* after) override; - bool AddMovieListener(IAnimSequence* pSequence, IMovieListener* pListener); - bool RemoveMovieListener(IAnimSequence* pSequence, IMovieListener* pListener); + bool AddMovieListener(IAnimSequence* pSequence, IMovieListener* pListener) override; + bool RemoveMovieListener(IAnimSequence* pSequence, IMovieListener* pListener) override; - void RemoveAllSequences(); + void RemoveAllSequences() override; ////////////////////////////////////////////////////////////////////////// // Sequence playback. ////////////////////////////////////////////////////////////////////////// void PlaySequence(const char* sequence, IAnimSequence* parentSeq = NULL, bool bResetFX = true, - bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX); + bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX) override; void PlaySequence(IAnimSequence* seq, IAnimSequence* parentSeq = NULL, bool bResetFX = true, - bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX); - void PlayOnLoadSequences(); + bool bTrackedSequence = false, float startTime = -FLT_MAX, float endTime = -FLT_MAX) override; + void PlayOnLoadSequences() override; - bool StopSequence(const char* sequence); - bool StopSequence(IAnimSequence* seq); - bool AbortSequence(IAnimSequence* seq, bool bLeaveTime = false); + bool StopSequence(const char* sequence) override; + bool StopSequence(IAnimSequence* seq) override; + bool AbortSequence(IAnimSequence* seq, bool bLeaveTime = false) override; - void StopAllSequences(); - void StopAllCutScenes(); + void StopAllSequences() override; + void StopAllCutScenes() override; void Pause(bool bPause); - void Reset(bool bPlayOnReset, bool bSeekToStart); - void StillUpdate(); - void PreUpdate(const float dt); - void PostUpdate(const float dt); - void Render(); + void Reset(bool bPlayOnReset, bool bSeekToStart) override; + void StillUpdate() override; + void PreUpdate(const float dt) override; + void PostUpdate(const float dt) override; + void Render() override; - void EnableFixedStepForCapture(float step); - void DisableFixedStepForCapture(); - void StartCapture(const ICaptureKey& key, int frame); - void EndCapture(); - void ControlCapture(); - bool IsCapturing() const; + void EnableFixedStepForCapture(float step) override; + void DisableFixedStepForCapture() override; + void StartCapture(const ICaptureKey& key, int frame) override; + void EndCapture() override; + void ControlCapture() override; + bool IsCapturing() const override; - bool IsPlaying(IAnimSequence* seq) const; + bool IsPlaying(IAnimSequence* seq) const override; - void Pause(); - void Resume(); + void Pause() override; + void Resume() override; - virtual void PauseCutScenes(); - virtual void ResumeCutScenes(); + void PauseCutScenes() override; + void ResumeCutScenes() override; - void SetRecording(bool recording) { m_bRecording = recording; }; - bool IsRecording() const { return m_bRecording; }; + void SetRecording(bool recording) override { m_bRecording = recording; }; + bool IsRecording() const override { return m_bRecording; }; - void EnableCameraShake(bool bEnabled){ m_bEnableCameraShake = bEnabled; }; + void EnableCameraShake(bool bEnabled) override{ m_bEnableCameraShake = bEnabled; }; - void SetCallback(IMovieCallback* pCallback) { m_pCallback = pCallback; } - IMovieCallback* GetCallback() { return m_pCallback; } + void SetCallback(IMovieCallback* pCallback) override { m_pCallback = pCallback; } + IMovieCallback* GetCallback() override { return m_pCallback; } void Callback(IMovieCallback::ECallbackReason Reason, IAnimNode* pNode); - const SCameraParams& GetCameraParams() const { return m_ActiveCameraParams; } - void SetCameraParams(const SCameraParams& Params); + const SCameraParams& GetCameraParams() const override { return m_ActiveCameraParams; } + void SetCameraParams(const SCameraParams& Params) override; - void SendGlobalEvent(const char* pszEvent); - void SetSequenceStopBehavior(ESequenceStopBehavior behavior); - IMovieSystem::ESequenceStopBehavior GetSequenceStopBehavior(); + void SendGlobalEvent(const char* pszEvent) override; + void SetSequenceStopBehavior(ESequenceStopBehavior behavior) override; + IMovieSystem::ESequenceStopBehavior GetSequenceStopBehavior() override; - float GetPlayingTime(IAnimSequence* pSeq); - bool SetPlayingTime(IAnimSequence* pSeq, float fTime); + float GetPlayingTime(IAnimSequence* pSeq) override; + bool SetPlayingTime(IAnimSequence* pSeq, float fTime) override; - float GetPlayingSpeed(IAnimSequence* pSeq); - bool SetPlayingSpeed(IAnimSequence* pSeq, float fTime); + float GetPlayingSpeed(IAnimSequence* pSeq) override; + bool SetPlayingSpeed(IAnimSequence* pSeq, float fTime) override; - bool GetStartEndTime(IAnimSequence* pSeq, float& fStartTime, float& fEndTime); - bool SetStartEndTime(IAnimSequence* pSeq, const float fStartTime, const float fEndTime); + bool GetStartEndTime(IAnimSequence* pSeq, float& fStartTime, float& fEndTime) override; + bool SetStartEndTime(IAnimSequence* pSeq, const float fStartTime, const float fEndTime) override; - void GoToFrame(const char* seqName, float targetFrame); + void GoToFrame(const char* seqName, float targetFrame) override; - const char* GetOverrideCamName() const + const char* GetOverrideCamName() const override { return m_mov_overrideCam->GetString(); } - virtual bool IsPhysicsEventsEnabled() const { return m_bPhysicsEventsEnabled; } - virtual void EnablePhysicsEvents(bool enable) { m_bPhysicsEventsEnabled = enable; } + bool IsPhysicsEventsEnabled() const override { return m_bPhysicsEventsEnabled; } + void EnablePhysicsEvents(bool enable) override { m_bPhysicsEventsEnabled = enable; } - virtual void EnableBatchRenderMode(bool bOn) { m_bBatchRenderMode = bOn; } - virtual bool IsInBatchRenderMode() const { return m_bBatchRenderMode; } + void EnableBatchRenderMode(bool bOn) override { m_bBatchRenderMode = bOn; } + bool IsInBatchRenderMode() const override { return m_bBatchRenderMode; } void SerializeNodeType(AnimNodeType& animNodeType, XmlNodeRef& xmlNode, bool bLoading, const uint version, int flags) override; - virtual void LoadParamTypeFromXml(CAnimParamType& animParamType, const XmlNodeRef& xmlNode, const uint version) override; - virtual void SaveParamTypeToXml(const CAnimParamType& animParamType, XmlNodeRef& xmlNode) override; - virtual void SerializeParamType(CAnimParamType& animParamType, XmlNodeRef& xmlNode, bool bLoading, const uint version); + void LoadParamTypeFromXml(CAnimParamType& animParamType, const XmlNodeRef& xmlNode, const uint version) override; + void SaveParamTypeToXml(const CAnimParamType& animParamType, XmlNodeRef& xmlNode) override; + void SerializeParamType(CAnimParamType& animParamType, XmlNodeRef& xmlNode, bool bLoading, const uint version) override; static const char* GetParamTypeName(const CAnimParamType& animParamType); @@ -226,8 +226,8 @@ private: void UpdateInternal(const float dt, const bool bPreUpdate); #ifdef MOVIESYSTEM_SUPPORT_EDITING - virtual AnimNodeType GetNodeTypeFromString(const char* pString) const; - virtual CAnimParamType GetParamTypeFromString(const char* pString) const; + AnimNodeType GetNodeTypeFromString(const char* pString) const override; + CAnimParamType GetParamTypeFromString(const char* pString) const override; #endif ISystem* m_pSystem; diff --git a/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp b/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp index 10014a8700..b93215d397 100644 --- a/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp @@ -89,13 +89,13 @@ namespace { AZ::Quaternion quat = LYQuaternionToAZQuaternion(localRotation); AZ::TransformBus::Event(m_cameraEntityId, &AZ::TransformBus::Events::SetLocalRotationQuaternion, quat); } - float GetFoV() const + float GetFoV() const override { float retFoV = DEFAULT_FOV; Camera::CameraRequestBus::EventResult(retFoV, m_cameraEntityId, &Camera::CameraComponentRequests::GetFovDegrees); return retFoV; } - float GetNearZ() const + float GetNearZ() const override { float retNearZ = DEFAULT_NEAR; Camera::CameraRequestBus::EventResult(retNearZ, m_cameraEntityId, &Camera::CameraComponentRequests::GetNearClipDistance); diff --git a/Gems/Maestro/Code/Source/Cinematics/SceneNode.h b/Gems/Maestro/Code/Source/Cinematics/SceneNode.h index d4d0410728..c577839fce 100644 --- a/Gems/Maestro/Code/Source/Cinematics/SceneNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/SceneNode.h @@ -65,12 +65,12 @@ public: ////////////////////////////////////////////////////////////////////////// // Overrides from CAnimNode ////////////////////////////////////////////////////////////////////////// - void Animate(SAnimContext& ec); - void CreateDefaultTracks(); + void Animate(SAnimContext& ec) override; + void CreateDefaultTracks() override; - virtual void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks); + void Serialize(XmlNodeRef& xmlNode, bool bLoading, bool bLoadEmptyTracks) override; - virtual void Activate(bool bActivate); + void Activate(bool bActivate) override; // overridden from IAnimNode/CAnimNode void OnStart() override; @@ -80,11 +80,11 @@ public: void OnLoop() override; ////////////////////////////////////////////////////////////////////////// - virtual unsigned int GetParamCount() const; - virtual CAnimParamType GetParamType(unsigned int nIndex) const; + unsigned int GetParamCount() const override; + CAnimParamType GetParamType(unsigned int nIndex) const override; - virtual void PrecacheStatic(float startTime) override; - virtual void PrecacheDynamic(float time) override; + void PrecacheStatic(float startTime) override; + void PrecacheDynamic(float time) override; static void Reflect(AZ::ReflectContext* context); @@ -92,7 +92,7 @@ public: static IAnimSequence* GetSequenceFromSequenceKey(const ISequenceKey& sequenceKey); protected: - virtual bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const; + bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override; void ResetSounds() override; void ReleaseSounds(); // Stops audio @@ -111,7 +111,7 @@ private: void InterpolateCameras(SCameraParams& retInterpolatedCameraParams, ISceneCamera* firstCamera, ISelectKey& firstKey, ISelectKey& secondKey, float time); - virtual void InitializeTrackDefaultValue(IAnimTrack* pTrack, const CAnimParamType& paramType) override; + void InitializeTrackDefaultValue(IAnimTrack* pTrack, const CAnimParamType& paramType) override; // Cached parameters of node at given time. float m_time = 0.0f; diff --git a/Gems/Maestro/Code/Source/Cinematics/ScreenFaderTrack.h b/Gems/Maestro/Code/Source/Cinematics/ScreenFaderTrack.h index 410dd41e2c..b5cb81dbc6 100644 --- a/Gems/Maestro/Code/Source/Cinematics/ScreenFaderTrack.h +++ b/Gems/Maestro/Code/Source/Cinematics/ScreenFaderTrack.h @@ -30,8 +30,8 @@ public: //----------------------------------------------------------------------------- //! IAnimTrack Method Overriding. //----------------------------------------------------------------------------- - virtual void GetKeyInfo(int key, const char*& description, float& duration); - virtual void SerializeKey(IScreenFaderKey& key, XmlNodeRef& keyNode, bool bLoading); + void GetKeyInfo(int key, const char*& description, float& duration) override; + void SerializeKey(IScreenFaderKey& key, XmlNodeRef& keyNode, bool bLoading) override; void SetFlags(int flags) override; void PreloadTextures(); diff --git a/Gems/Maestro/Code/Source/Cinematics/SoundTrack.h b/Gems/Maestro/Code/Source/Cinematics/SoundTrack.h index c55b2de520..435eccfb0b 100644 --- a/Gems/Maestro/Code/Source/Cinematics/SoundTrack.h +++ b/Gems/Maestro/Code/Source/Cinematics/SoundTrack.h @@ -29,11 +29,11 @@ public: AZ_CLASS_ALLOCATOR(CSoundTrack, AZ::SystemAllocator, 0); AZ_RTTI(CSoundTrack, "{B87D8805-F583-4154-B554-45518BC487F4}", IAnimTrack); - void GetKeyInfo(int key, const char*& description, float& duration); - void SerializeKey(ISoundKey& key, XmlNodeRef& keyNode, bool bLoading); + void GetKeyInfo(int key, const char*& description, float& duration) override; + void SerializeKey(ISoundKey& key, XmlNodeRef& keyNode, bool bLoading) override; //! Check if track is masked - virtual bool IsMasked(const uint32 mask) const { return (mask & eTrackMask_MaskSound) != 0; } + bool IsMasked(const uint32 mask) const override { return (mask & eTrackMask_MaskSound) != 0; } bool UsesMute() const override { return true; } diff --git a/Gems/Maestro/Code/Source/Cinematics/TrackEventTrack.h b/Gems/Maestro/Code/Source/Cinematics/TrackEventTrack.h index 13a6549220..b0a7de63a7 100644 --- a/Gems/Maestro/Code/Source/Cinematics/TrackEventTrack.h +++ b/Gems/Maestro/Code/Source/Cinematics/TrackEventTrack.h @@ -70,9 +70,9 @@ public: ////////////////////////////////////////////////////////////////////////// // Overrides of IAnimTrack. ////////////////////////////////////////////////////////////////////////// - void GetKeyInfo(int key, const char*& description, float& duration); - void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading); - void SetKey(int index, IKey* key); + void GetKeyInfo(int key, const char*& description, float& duration) override; + void SerializeKey(IEventKey& key, XmlNodeRef& keyNode, bool bLoading) override; + void SetKey(int index, IKey* key) override; void InitPostLoad(IAnimSequence* sequence) override; static void Reflect(AZ::ReflectContext* context); diff --git a/Gems/Maestro/Code/Source/Components/EditorSequenceComponent.h b/Gems/Maestro/Code/Source/Components/EditorSequenceComponent.h index 83caaeea19..76b21faff4 100644 --- a/Gems/Maestro/Code/Source/Components/EditorSequenceComponent.h +++ b/Gems/Maestro/Code/Source/Components/EditorSequenceComponent.h @@ -78,7 +78,7 @@ namespace Maestro ////////////////////////////////////////////////////////////////////////// // TickBus - used to refresh property displays when values are animated - virtual void OnTick(float deltaTime, AZ::ScriptTimePoint time); + void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; ////////////////////////////////////////////////////////////////////////// // TODO - this should be on a Bus, right? diff --git a/Gems/Maestro/Code/Source/Components/SequenceAgent.h b/Gems/Maestro/Code/Source/Components/SequenceAgent.h index 892e4ee7d1..333679f372 100644 --- a/Gems/Maestro/Code/Source/Components/SequenceAgent.h +++ b/Gems/Maestro/Code/Source/Components/SequenceAgent.h @@ -20,6 +20,8 @@ namespace Maestro friend class AZ::SerializeContext; protected: + virtual ~SequenceAgent() = default; + // This pure virtual is required for the Editor and RunTime to find the componentTypeId - in the Editor // it accounts for the GenericComponentWrapper component virtual const AZ::Uuid& GetComponentTypeUuid(const AZ::Component& component) const = 0; diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicationManager.h b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicationManager.h index 731a1a7556..ef05e22e3e 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicationManager.h +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicationManager.h @@ -153,6 +153,7 @@ namespace Multiplayer { public: OrphanedEntityRpcs(EntityReplicationManager& replicationManager); + virtual ~OrphanedEntityRpcs() = default; void Update(); bool DispatchOrphanedRpcs(EntityReplicator& entityReplicator); void AddOrphanedRpc(NetEntityId entityId, NetworkEntityRpcMessage& entityRpcMessage); 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/PhysX/Code/Source/EditorColliderComponent.h b/Gems/PhysX/Code/Source/EditorColliderComponent.h index 50cf9d0c8b..1331fd08b6 100644 --- a/Gems/PhysX/Code/Source/EditorColliderComponent.h +++ b/Gems/PhysX/Code/Source/EditorColliderComponent.h @@ -144,7 +144,7 @@ namespace PhysX void OnDeselected() override; // DisplayCallback - void Display(AzFramework::DebugDisplayRequests& debugDisplay) const; + void Display(AzFramework::DebugDisplayRequests& debugDisplay) const override; void DisplayMeshCollider(AzFramework::DebugDisplayRequests& debugDisplay) const; void DisplayUnscaledPrimitiveCollider(AzFramework::DebugDisplayRequests& debugDisplay) const; void DisplayScaledPrimitiveCollider(AzFramework::DebugDisplayRequests& debugDisplay) const; diff --git a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.h b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.h index 47da6eb772..792d3c4327 100644 --- a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.h +++ b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.h @@ -129,7 +129,7 @@ namespace PhysX void OnShapeChanged(LmbrCentral::ShapeComponentNotifications::ShapeChangeReasons changeReason) override; // DisplayCallback - void Display(AzFramework::DebugDisplayRequests& debugDisplay) const; + void Display(AzFramework::DebugDisplayRequests& debugDisplay) const override; // ColliderShapeRequestBus AZ::Aabb GetColliderShapeAabb() override; diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/Components/CharacterControllerComponent.h b/Gems/PhysX/Code/Source/PhysXCharacters/Components/CharacterControllerComponent.h index a5b64c9c76..02de77568e 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/Components/CharacterControllerComponent.h +++ b/Gems/PhysX/Code/Source/PhysXCharacters/Components/CharacterControllerComponent.h @@ -108,7 +108,7 @@ namespace PhysX // CharacterControllerRequestBus void Resize(float height) override; float GetHeight() override; - void SetHeight(float height); + void SetHeight(float height) override; float GetRadius() override; void SetRadius(float radius) override; float GetHalfSideExtent() override; diff --git a/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.h b/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.h index eb99a7e306..b1f55027b8 100644 --- a/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.h +++ b/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.h @@ -52,7 +52,7 @@ namespace PhysX // AZ::AssetTypeInfoBus AZ::Data::AssetType GetAssetType() const override; void GetAssetTypeExtensions(AZStd::vector& extensions) override; - const char* GetAssetTypeDisplayName() const; + const char* GetAssetTypeDisplayName() const override; const char* GetBrowserIcon() const override; const char* GetGroup() const override; AZ::Uuid GetComponentTypeId() const override; diff --git a/Gems/PhysX/Code/Source/Pipeline/MeshAssetHandler.h b/Gems/PhysX/Code/Source/Pipeline/MeshAssetHandler.h index ccaddc0c86..0cb8a58b65 100644 --- a/Gems/PhysX/Code/Source/Pipeline/MeshAssetHandler.h +++ b/Gems/PhysX/Code/Source/Pipeline/MeshAssetHandler.h @@ -48,7 +48,7 @@ namespace PhysX // AZ::AssetTypeInfoBus AZ::Data::AssetType GetAssetType() const override; void GetAssetTypeExtensions(AZStd::vector& extensions) override; - const char* GetAssetTypeDisplayName() const; + const char* GetAssetTypeDisplayName() const override; const char* GetBrowserIcon() const override; const char* GetGroup() const override; AZ::Uuid GetComponentTypeId() const override; diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersBenchmarks.cpp index 200cbeafde..cd9e3c0395 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersBenchmarks.cpp @@ -85,8 +85,7 @@ namespace PhysX::Benchmarks class PhysXCharactersBenchmarkFixture : public PhysX::Benchmarks::PhysXBaseBenchmarkFixture { - public: - virtual void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { PhysX::Benchmarks::PhysXBaseBenchmarkFixture::SetUpInternal(); //need to get the Physics::System to be able to spawn the rigid bodies @@ -95,12 +94,31 @@ namespace PhysX::Benchmarks m_terrainEntity = PhysX::TestUtils::CreateFlatTestTerrain(m_testSceneHandle, CharacterConstants::TerrainSize, CharacterConstants::TerrainSize); } - virtual void TearDown([[maybe_unused]] const ::benchmark::State& state) override + void internalTearDown() { m_terrainEntity = nullptr; PhysX::Benchmarks::PhysXBaseBenchmarkFixture::TearDownInternal(); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); + } + protected: // PhysXBaseBenchmarkFixture Overrides ... AzPhysics::SceneConfiguration GetDefaultSceneConfiguration() override diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp index 8febfcddfc..c82d222e80 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXCharactersRagdollBenchmarks.cpp @@ -70,8 +70,7 @@ namespace PhysX::Benchmarks class PhysXCharactersRagdollBenchmarkFixture : public PhysX::Benchmarks::PhysXBaseBenchmarkFixture { - public: - virtual void SetUp([[maybe_unused]] const ::benchmark::State& state) override + void internalSetUp() { PhysX::Benchmarks::PhysXBaseBenchmarkFixture::SetUpInternal(); //need to get the Physics::System to be able to spawn the rigid bodies @@ -80,12 +79,31 @@ namespace PhysX::Benchmarks m_terrainEntity = PhysX::TestUtils::CreateFlatTestTerrain(m_testSceneHandle, RagdollConstants::TerrainSize, RagdollConstants::TerrainSize); } - virtual void TearDown([[maybe_unused]] const ::benchmark::State& state) override + void internalTearDown() { m_terrainEntity = nullptr; PhysX::Benchmarks::PhysXBaseBenchmarkFixture::TearDownInternal(); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); + } + protected: // PhysXBaseBenchmarkFixture Overrides ... AzPhysics::SceneConfiguration GetDefaultSceneConfiguration() override diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp index 17468b5cc6..de8a9d2146 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXJointBenchmarks.cpp @@ -183,18 +183,35 @@ namespace PhysX::Benchmarks class PhysXJointBenchmarkFixture : public PhysXBaseBenchmarkFixture { - public: - virtual void SetUp([[maybe_unused]] const ::benchmark::State &state) override + void internalSetUp() { PhysXBaseBenchmarkFixture::SetUpInternal(); } - virtual void TearDown([[maybe_unused]] const ::benchmark::State &state) override + void internalTearDown() { PhysXBaseBenchmarkFixture::TearDownInternal(); } - protected: + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); + } + // PhysXBaseBenchmarkFixture Interface --------- AzPhysics::SceneConfiguration GetDefaultSceneConfiguration() override { diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp index 0117e9737b..58cbd0da23 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXRigidBodyBenchmarks.cpp @@ -136,8 +136,8 @@ namespace PhysX::Benchmarks class PhysXRigidbodyBenchmarkFixture : public PhysXBaseBenchmarkFixture { - public: - virtual void SetUp([[maybe_unused]] const ::benchmark::State &state) override + protected: + virtual void internalSetUp() { PhysXBaseBenchmarkFixture::SetUpInternal(); //need to get the Physics::System to be able to spawn the rigid bodies @@ -146,11 +146,29 @@ namespace PhysX::Benchmarks m_terrainEntity = PhysX::TestUtils::CreateFlatTestTerrain(m_testSceneHandle, RigidBodyConstants::TerrainSize, RigidBodyConstants::TerrainSize); } - virtual void TearDown([[maybe_unused]] const ::benchmark::State &state) override + virtual void internalTearDown() { m_terrainEntity = nullptr; PhysXBaseBenchmarkFixture::TearDownInternal(); } + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); + } protected: // PhysXBaseBenchmarkFixture Interface --------- @@ -312,10 +330,9 @@ namespace PhysX::Benchmarks class PhysXRigidbodyCollisionsBenchmarkFixture : public PhysXRigidbodyBenchmarkFixture { - public: - void SetUp(const ::benchmark::State& state) override + void internalSetUp() override { - PhysXRigidbodyBenchmarkFixture::SetUp(state); + PhysXRigidbodyBenchmarkFixture::internalSetUp(); m_collisionBeginCount = 0; m_collisionPersistCount = 0; @@ -346,11 +363,30 @@ namespace PhysX::Benchmarks m_defaultScene->RegisterSceneCollisionEventHandler(m_onSceneCollisionHandler); } - void TearDown(const ::benchmark::State& state) override + void internalTearDown() override { m_onSceneCollisionHandler.Disconnect(); - PhysXRigidbodyBenchmarkFixture::TearDown(state); + PhysXRigidbodyBenchmarkFixture::internalTearDown(); + } + + public: + void SetUp(const benchmark::State&) override + { + internalSetUp(); + } + void SetUp(benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); } protected: diff --git a/Gems/PhysX/Code/Tests/Benchmarks/PhysXSceneQueryBenchmarks.cpp b/Gems/PhysX/Code/Tests/Benchmarks/PhysXSceneQueryBenchmarks.cpp index 4a6cbae99b..9a8a28a85e 100644 --- a/Gems/PhysX/Code/Tests/Benchmarks/PhysXSceneQueryBenchmarks.cpp +++ b/Gems/PhysX/Code/Tests/Benchmarks/PhysXSceneQueryBenchmarks.cpp @@ -47,14 +47,12 @@ namespace PhysX::Benchmarks , public PhysX::GenericPhysicsFixture { - public: - //! Spawns box entities in unique locations in 1/8 of sphere with all non-negative dimensions between radii[2, max radius]. //! Accepts 2 parameters from \state. //! //! \state.range(0) - number of box entities to spawn //! \state.range(1) - max radius - void SetUp(const ::benchmark::State& state) override + void internalSetUp(const ::benchmark::State& state) { PhysX::GenericPhysicsFixture::SetUpInternal(); @@ -100,13 +98,32 @@ namespace PhysX::Benchmarks } } - void TearDown([[maybe_unused]] const ::benchmark::State& state) override + void internalTearDown() { m_boxes.clear(); m_entities.clear(); PhysX::GenericPhysicsFixture::TearDownInternal(); } + public: + void SetUp(const benchmark::State& state) override + { + internalSetUp(state); + } + void SetUp(benchmark::State& state) override + { + internalSetUp(state); + } + + void TearDown(const benchmark::State&) override + { + internalTearDown(); + } + void TearDown(benchmark::State&) override + { + internalTearDown(); + } + protected: std::vector m_entities; std::vector m_boxes; diff --git a/Gems/PhysX/Code/Tests/TestColliderComponent.h b/Gems/PhysX/Code/Tests/TestColliderComponent.h index 4df96a9ff1..91d3f16122 100644 --- a/Gems/PhysX/Code/Tests/TestColliderComponent.h +++ b/Gems/PhysX/Code/Tests/TestColliderComponent.h @@ -49,7 +49,7 @@ namespace UnitTest m_componentModeDelegate.Disconnect(); } - void SetColliderOffset(const AZ::Vector3& offset) { m_offset = offset; } + void SetColliderOffset(const AZ::Vector3& offset) override { m_offset = offset; } AZ::Vector3 GetColliderOffset() override { return m_offset; } void SetColliderRotation(const AZ::Quaternion& rotation) override { m_rotation = rotation; } AZ::Quaternion GetColliderRotation() override { return m_rotation; } 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/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderTestShared.h b/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderTestShared.h index 3a16e28ee0..eb01d5011b 100644 --- a/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderTestShared.h +++ b/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderTestShared.h @@ -37,7 +37,7 @@ namespace UnitTest return response; } - AssetBuilderSDK::ProcessJobResponse OnProcessJobRequest(const AssetBuilderSDK::ProcessJobRequest& request) + AssetBuilderSDK::ProcessJobResponse OnProcessJobRequest(const AssetBuilderSDK::ProcessJobRequest& request) override { if (request.m_sourceFileUUID.IsNull()) { @@ -49,12 +49,12 @@ namespace UnitTest return response; } - void OnShutdown() + void OnShutdown() override { ++m_onShutdownCount; } - void OnCancel() + void OnCancel() override { ++m_onCancelCount; } diff --git a/Gems/SceneLoggingExample/Code/Behaviors/LoggingGroupBehavior.h b/Gems/SceneLoggingExample/Code/Behaviors/LoggingGroupBehavior.h index ae1989a284..a3ed7c1b20 100644 --- a/Gems/SceneLoggingExample/Code/Behaviors/LoggingGroupBehavior.h +++ b/Gems/SceneLoggingExample/Code/Behaviors/LoggingGroupBehavior.h @@ -28,8 +28,8 @@ namespace SceneLoggingExample ~LoggingGroupBehavior() override = default; - void Activate(); - void Deactivate(); + void Activate() override; + void Deactivate() override; static void Reflect(AZ::ReflectContext* context); void GetCategoryAssignments(CategoryRegistrationList& categories, const AZ::SceneAPI::Containers::Scene& scene) override; diff --git a/Gems/SceneLoggingExample/Code/Processors/LoadingTrackingProcessor.h b/Gems/SceneLoggingExample/Code/Processors/LoadingTrackingProcessor.h index d6480b7dcd..959098cb97 100644 --- a/Gems/SceneLoggingExample/Code/Processors/LoadingTrackingProcessor.h +++ b/Gems/SceneLoggingExample/Code/Processors/LoadingTrackingProcessor.h @@ -34,7 +34,7 @@ namespace SceneLoggingExample RequestingApplication requester) override; AZ::SceneAPI::Events::LoadingResult LoadAsset(AZ::SceneAPI::Containers::Scene& scene, const AZStd::string& path, const AZ::Uuid& guid, RequestingApplication requester) override; - void FinalizeAssetLoading(AZ::SceneAPI::Containers::Scene& scene, RequestingApplication requester); + void FinalizeAssetLoading(AZ::SceneAPI::Containers::Scene& scene, RequestingApplication requester) override; AZ::SceneAPI::Events::ProcessingResult UpdateManifest(AZ::SceneAPI::Containers::Scene& scene, ManifestAction action, RequestingApplication requester) override; diff --git a/Gems/SceneProcessing/Code/Source/Config/SettingsObjects/FileSoftNameSetting.h b/Gems/SceneProcessing/Code/Source/Config/SettingsObjects/FileSoftNameSetting.h index d6dcdb9de9..15c407a0cb 100644 --- a/Gems/SceneProcessing/Code/Source/Config/SettingsObjects/FileSoftNameSetting.h +++ b/Gems/SceneProcessing/Code/Source/Config/SettingsObjects/FileSoftNameSetting.h @@ -68,7 +68,7 @@ namespace AZ const char* virtualType, bool inclusive, std::initializer_list graphTypes); ~FileSoftNameSetting() override = default; - bool IsVirtualType(const SceneAPI::Containers::Scene& scene, SceneAPI::Containers::SceneGraph::NodeIndex node) const; + bool IsVirtualType(const SceneAPI::Containers::Scene& scene, SceneAPI::Containers::SceneGraph::NodeIndex node) const override; static void Reflect(AZ::ReflectContext* context); diff --git a/Gems/SceneProcessing/Code/Source/Config/Widgets/GraphTypeSelector.h b/Gems/SceneProcessing/Code/Source/Config/Widgets/GraphTypeSelector.h index 19ab410384..813f791310 100644 --- a/Gems/SceneProcessing/Code/Source/Config/Widgets/GraphTypeSelector.h +++ b/Gems/SceneProcessing/Code/Source/Config/Widgets/GraphTypeSelector.h @@ -32,7 +32,7 @@ namespace AZ QWidget* CreateGUI(QWidget* parent) override; u32 GetHandlerName() const override; - bool AutoDelete() const; + bool AutoDelete() const override; bool IsDefaultHandler() const override; diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h index 6101f292a1..4850e669ff 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h @@ -86,7 +86,7 @@ namespace ScriptCanvasEditor void UpdateFileState(AZ::Data::AssetId assetId, Tracker::ScriptCanvasFileState state) override; AssetTrackerRequests::AssetList GetUnsavedAssets() override; - AssetTrackerRequests::AssetList GetAssets(); + AssetTrackerRequests::AssetList GetAssets() override; AssetTrackerRequests::AssetList GetAssetsIf(AZStd::function pred = []() { return true; }) override; AZ::EntityId GetSceneEntityIdFromEditorEntityId(AZ::Data::AssetId assetId, AZ::EntityId editorEntityId) override; diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index e9a850a2a4..a87f4450c2 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -128,15 +128,15 @@ namespace ScriptCanvasEditor } } - bool OnPreAssert(const char*, int, const char*, const char*) { return suppressPreAssert; } - bool OnAssert(const char*) { return suppressAssert; } - bool OnException(const char*) { return suppressException; } - bool OnPreError(const char*, const char*, int, const char*, const char*) { return suppressPreError; } - bool OnError(const char*, const char*) { return suppressError; } - bool OnPreWarning(const char*, const char*, int, const char*, const char*) { return suppressPreWarning; } - bool OnWarning(const char*, const char*) { return suppressWarning; } - bool OnPrintf(const char*, const char*) { return suppressPrintf; } - bool OnOutput(const char*, const char*) { return suppressAllOutput; } + bool OnPreAssert(const char*, int, const char*, const char*) override { return suppressPreAssert; } + bool OnAssert(const char*) override { return suppressAssert; } + bool OnException(const char*) override { return suppressException; } + bool OnPreError(const char*, const char*, int, const char*, const char*) override { return suppressPreError; } + bool OnError(const char*, const char*) override { return suppressError; } + bool OnPreWarning(const char*, const char*, int, const char*, const char*) override { return suppressPreWarning; } + bool OnWarning(const char*, const char*) override { return suppressWarning; } + bool OnPrintf(const char*, const char*) override { return suppressPrintf; } + bool OnOutput(const char*, const char*) override { return suppressAllOutput; } void SuppressPreAssert(bool suppress) override { suppressPreAssert = suppress; } void SuppressAssert(bool suppress)override { suppressAssert = suppress; } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/DynamicSlotComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/DynamicSlotComponent.h index 5f1372d8c3..a30e6c999f 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/DynamicSlotComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/DynamicSlotComponent.h @@ -33,9 +33,9 @@ namespace ScriptCanvasEditor ~DynamicSlotComponent() override = default; // AZ::Component - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // GraphCanvas::SceneMemberNotificationBus diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/MappingComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/MappingComponent.h index f5345f8bc8..fdc5ebc9fa 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/MappingComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/MappingComponent.h @@ -31,8 +31,8 @@ namespace ScriptCanvasEditor SceneMemberMappingComponent(const AZ::EntityId& sourceId); ~SceneMemberMappingComponent() = default; - void Activate(); - void Deactivate(); + void Activate() override; + void Deactivate() override; // SceneMemberMappingConfigurationRequestBus void ConfigureMapping(const AZ::EntityId& scriptCanvasMemberId) override; @@ -68,8 +68,8 @@ namespace ScriptCanvasEditor SlotMappingComponent(const AZ::EntityId& sourceId); ~SlotMappingComponent() = default; - void Activate(); - void Deactivate(); + void Activate() override; + void Deactivate() override; // GraphCanvas::NodeNotificationBus void OnAddedToScene(const AZ::EntityId&) override; diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/NodeDescriptorComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/NodeDescriptorComponent.h index c885c26624..1c42d1bdb0 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/NodeDescriptorComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/NodeDescriptorComponent.h @@ -33,9 +33,9 @@ namespace ScriptCanvasEditor ~NodeDescriptorComponent() override = default; // Component - void Init(); - void Activate(); - void Deactivate(); + void Init() override; + void Activate() override; + void Deactivate() override; //// // NodeDescriptorBus::Handler diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.h index 7a991fc791..4a75432ad9 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.h @@ -74,7 +74,7 @@ namespace ScriptCanvasEditor //// // ScriptEventReceiveNodeDescriptorNotifications - void OnScriptEventReloaded(const AZ::Data::Asset& asset); + void OnScriptEventReloaded(const AZ::Data::Asset& asset) override; //// protected: diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/VariableNodeDescriptorComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/VariableNodeDescriptorComponent.h index 9a14a7ca23..be5eacc397 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/VariableNodeDescriptorComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/VariableNodeDescriptorComponent.h @@ -52,7 +52,7 @@ namespace ScriptCanvasEditor //// // VariableNodeDescriptorBus - ScriptCanvas::VariableId GetVariableId() const; + ScriptCanvas::VariableId GetVariableId() const override; //// protected: diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasColorDataInterface.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasColorDataInterface.h index b7db5a4e08..37d5ba0181 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasColorDataInterface.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasColorDataInterface.h @@ -131,7 +131,7 @@ namespace ScriptCanvasEditor return "vectorized"; } - virtual AZStd::string GetElementStyle(int index) const + AZStd::string GetElementStyle(int index) const override { return AZStd::string::format("vector_%i", index); } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasVariableDataInterface.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasVariableDataInterface.h index 7b93dc3a71..29dc17deca 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasVariableDataInterface.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasVariableDataInterface.h @@ -88,12 +88,12 @@ namespace ScriptCanvasEditor //// // GeneralEditorNotifications - void OnUndoRedoBegin() + void OnUndoRedoBegin() override { ScriptCanvas::GraphVariableManagerNotificationBus::Handler::BusDisconnect(); } - void OnUndoRedoEnd() + void OnUndoRedoEnd() override { FinalizeActivation(); } @@ -250,7 +250,7 @@ namespace ScriptCanvasEditor } // SystemTickBus - void OnSystemTick() + void OnSystemTick() override { AZ::SystemTickBus::Handler::BusDisconnect(); AssignIndex(m_variableTypeModel.GetDefaultIndex()); @@ -440,7 +440,7 @@ namespace ScriptCanvasEditor } // SystemTickBus - void OnSystemTick() + void OnSystemTick() override { AZ::SystemTickBus::Handler::BusDisconnect(); AssignIndex(m_variableTypeModel.GetDefaultIndex()); @@ -449,7 +449,7 @@ namespace ScriptCanvasEditor //// // NodeNotificationBus - void OnSlotDisplayTypeChanged(const ScriptCanvas::SlotId& slotId, [[maybe_unused]] const ScriptCanvas::Data::Type& slotType) + void OnSlotDisplayTypeChanged(const ScriptCanvas::SlotId& slotId, [[maybe_unused]] const ScriptCanvas::Data::Type& slotType) override { if (slotId == GetSlotId()) { @@ -482,7 +482,7 @@ namespace ScriptCanvasEditor //// // EndpointNotificationBus - void OnEndpointReferenceChanged(const ScriptCanvas::VariableId& variableId) + void OnEndpointReferenceChanged(const ScriptCanvas::VariableId& variableId) override { ScriptCanvas::VariableNotificationBus::Handler::BusDisconnect(); ScriptCanvas::VariableNotificationBus::Handler::BusConnect(ScriptCanvas::GraphScopedVariableId(GetScriptCanvasId(), variableId)); @@ -490,7 +490,7 @@ namespace ScriptCanvasEditor SignalValueChanged(); } - void OnSlotRecreated() + void OnSlotRecreated() override { ScriptCanvas::Slot* slot = GetSlot(); diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasVectorDataInterface.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasVectorDataInterface.h index 717022c19d..6d76d5504a 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasVectorDataInterface.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/DataInterfaces/ScriptCanvasVectorDataInterface.h @@ -103,7 +103,7 @@ namespace ScriptCanvasEditor return "???"; } - AZStd::string GetStyle() const + AZStd::string GetStyle() const override { return "vectorized"; } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/PropertyInterfaces/ScriptCanvasEnumComboBoxPropertyDataInterface.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/PropertyInterfaces/ScriptCanvasEnumComboBoxPropertyDataInterface.h index 6faac13659..c283fc8802 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/PropertyInterfaces/ScriptCanvasEnumComboBoxPropertyDataInterface.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/PropertyInterfaces/ScriptCanvasEnumComboBoxPropertyDataInterface.h @@ -50,7 +50,7 @@ namespace ScriptCanvasEditor return m_comboBoxModel.GetIndexForValue(dataValue); } - QString GetDisplayString() const + QString GetDisplayString() const override { int32_t dataValue = GetValue(); return m_comboBoxModel.GetNameForValue(dataValue); diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/PropertyInterfaces/ScriptCanvasPropertyDataInterface.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/PropertyInterfaces/ScriptCanvasPropertyDataInterface.h index 768773e676..f69315bc86 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/PropertyInterfaces/ScriptCanvasPropertyDataInterface.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/PropertyInterfaces/ScriptCanvasPropertyDataInterface.h @@ -177,7 +177,7 @@ namespace ScriptCanvasEditor return m_comboBoxModel.GetIndexForValue(dataValue); } - QString GetDisplayString() const + QString GetDisplayString() const override { DataType dataValue = this->GetValue(); return m_comboBoxModel.GetNameForValue(dataValue); diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h index 9942e349c5..fdc8cbc1d8 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h @@ -81,8 +81,8 @@ namespace ScriptCanvasEditor ScriptCanvas::Graph* GetScriptCanvasGraph() const; using Description = ScriptCanvasAssetDescription; - ScriptCanvas::ScriptCanvasData& GetScriptCanvasData(); - const ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() const; + ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() override; + const ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() const override; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h index cb6689091b..6f73e84493 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h @@ -248,8 +248,8 @@ namespace ScriptCanvasEditor GraphCanvas::GraphId GetGraphCanvasGraphId() const override; - AZStd::unordered_map< AZ::EntityId, GraphCanvas::EntitySaveDataContainer* > GetGraphCanvasSaveData(); - void UpdateGraphCanvasSaveData(const AZStd::unordered_map< AZ::EntityId, GraphCanvas::EntitySaveDataContainer* >& saveData); + AZStd::unordered_map< AZ::EntityId, GraphCanvas::EntitySaveDataContainer* > GetGraphCanvasSaveData() override; + void UpdateGraphCanvasSaveData(const AZStd::unordered_map< AZ::EntityId, GraphCanvas::EntitySaveDataContainer* >& saveData) override; NodeIdPair CreateCustomNode(const AZ::Uuid& typeId, const AZ::Vector2& position) override; @@ -325,7 +325,7 @@ namespace ScriptCanvasEditor } protected: - void PostRestore(const UndoData& restoredData); + void PostRestore(const UndoData& restoredData) override; void UnregisterToast(const GraphCanvas::ToastId& toastId); diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h index 89ee0f3b55..fb6e109156 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h @@ -82,7 +82,7 @@ namespace ScriptCanvasEditor StateMachine* GetStateMachine() override { return m_stateMachine; } - virtual int GetStateId() const { return Traits::StateID(); } + int GetStateId() const override { return Traits::StateID(); } static int StateID() { return Traits::StateID(); } diff --git a/Gems/ScriptCanvas/Code/Editor/Settings.h b/Gems/ScriptCanvas/Code/Editor/Settings.h index b282e114ac..7eff40ec43 100644 --- a/Gems/ScriptCanvas/Code/Editor/Settings.h +++ b/Gems/ScriptCanvas/Code/Editor/Settings.h @@ -40,7 +40,7 @@ namespace ScriptCanvasEditor ScriptCanvasConstructPresets(); ~ScriptCanvasConstructPresets() override = default; - void InitializeConstructType(GraphCanvas::ConstructType constructType); + void InitializeConstructType(GraphCanvas::ConstructType constructType) override; }; class EditorWorkspace diff --git a/Gems/ScriptCanvas/Code/Editor/Static/Include/ScriptCanvas/View/EditCtrls/GenericLineEditCtrl.h b/Gems/ScriptCanvas/Code/Editor/Static/Include/ScriptCanvas/View/EditCtrls/GenericLineEditCtrl.h index 9b83819860..950fa8ef2e 100644 --- a/Gems/ScriptCanvas/Code/Editor/Static/Include/ScriptCanvas/View/EditCtrls/GenericLineEditCtrl.h +++ b/Gems/ScriptCanvas/Code/Editor/Static/Include/ScriptCanvas/View/EditCtrls/GenericLineEditCtrl.h @@ -59,7 +59,7 @@ namespace ScriptCanvasEditor void onChildLineEditValueChange(const QString& value); protected: - virtual void focusInEvent(QFocusEvent* e); + void focusInEvent(QFocusEvent* e) override; private: QLineEdit* m_pLineEdit; diff --git a/Gems/ScriptCanvas/Code/Editor/SystemComponent.h b/Gems/ScriptCanvas/Code/Editor/SystemComponent.h index ba850401d6..3e18262c98 100644 --- a/Gems/ScriptCanvas/Code/Editor/SystemComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/SystemComponent.h @@ -65,7 +65,7 @@ namespace ScriptCanvasEditor //////////////////////////////////////////////////////////////////////// // SystemRequestBus::Handler... void AddAsyncJob(AZStd::function&& jobFunc) override; - void GetEditorCreatableTypes(AZStd::unordered_set& outCreatableTypes); + void GetEditorCreatableTypes(AZStd::unordered_set& outCreatableTypes) override; void CreateEditorComponentsOnEntity(AZ::Entity* entity, const AZ::Data::AssetType& assetType) override; //////////////////////////////////////////////////////////////////////// @@ -110,7 +110,7 @@ namespace ScriptCanvasEditor //////////////////////////////////////////////////////////////////////// // IUpgradeRequests... - void ClearGraphsThatNeedUpgrade() + void ClearGraphsThatNeedUpgrade() override { m_assetsThatNeedManualUpgrade.clear(); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h index 2ebc71f785..9abb41aacc 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h @@ -61,7 +61,7 @@ namespace ScriptCanvasEditor protected: - void resizeEvent(QResizeEvent *ev); + void resizeEvent(QResizeEvent *ev) override; void OnClicked(); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/AssetWindowSession/LoggingAssetDataAggregator.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/AssetWindowSession/LoggingAssetDataAggregator.h index ae92586c4d..71efcbb017 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/AssetWindowSession/LoggingAssetDataAggregator.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/AssetWindowSession/LoggingAssetDataAggregator.h @@ -27,15 +27,15 @@ namespace ScriptCanvasEditor bool IsCapturingData() const override { return false; } protected: - void Visit(ScriptCanvas::AnnotateNodeSignal&); - void Visit(ScriptCanvas::ExecutionThreadEnd&); - void Visit(ScriptCanvas::ExecutionThreadBeginning&); - void Visit(ScriptCanvas::GraphActivation&); - void Visit(ScriptCanvas::GraphDeactivation&); - void Visit(ScriptCanvas::NodeStateChange&); - void Visit(ScriptCanvas::InputSignal&); - void Visit(ScriptCanvas::OutputSignal&); - void Visit(ScriptCanvas::VariableChange&); + void Visit(ScriptCanvas::AnnotateNodeSignal&) override; + void Visit(ScriptCanvas::ExecutionThreadEnd&) override; + void Visit(ScriptCanvas::ExecutionThreadBeginning&) override; + void Visit(ScriptCanvas::GraphActivation&) override; + void Visit(ScriptCanvas::GraphDeactivation&) override; + void Visit(ScriptCanvas::NodeStateChange&) override; + void Visit(ScriptCanvas::InputSignal&) override; + void Visit(ScriptCanvas::OutputSignal&) override; + void Visit(ScriptCanvas::VariableChange&) override; private: diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LiveWindowSession/LiveLoggingDataAggregator.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LiveWindowSession/LiveLoggingDataAggregator.h index d26939a217..8efeba4613 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LiveWindowSession/LiveLoggingDataAggregator.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LiveWindowSession/LiveLoggingDataAggregator.h @@ -38,8 +38,8 @@ namespace ScriptCanvasEditor void OnCurrentTargetChanged() override; //// - bool CanCaptureData() const; - bool IsCapturingData() const; + bool CanCaptureData() const override; + bool IsCapturingData() const override; void StartCaptureData(); void StopCaptureData(); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LiveWindowSession/LiveLoggingWindowSession.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LiveWindowSession/LiveLoggingWindowSession.h index ba2e5b4a56..3fa0cf8d01 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LiveWindowSession/LiveLoggingWindowSession.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LiveWindowSession/LiveLoggingWindowSession.h @@ -97,8 +97,8 @@ namespace ScriptCanvasEditor //// // AzToolsFramework::EditorEntityContextNotificationBus::Handler - void OnStartPlayInEditorBegin(); - void OnStopPlayInEditor(); + void OnStartPlayInEditorBegin() override; + void OnStopPlayInEditor() override; //// // ScriptCavnas::Debugger::ServiceNotificationsBus diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingDataAggregator.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingDataAggregator.h index 0e4d35e270..9892245fa4 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingDataAggregator.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingDataAggregator.h @@ -88,7 +88,7 @@ namespace ScriptCanvasEditor AZ::NamedEntityId FindNamedEntityId(const AZ::EntityId& entityId) override; //// - virtual bool IsCapturingData() const = 0; + bool IsCapturingData() const override = 0; virtual bool CanCaptureData() const = 0; // Should be bus methods, but don't want to copy data diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h index 751c1c30b7..862b231f3a 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h @@ -115,7 +115,7 @@ namespace ScriptCanvasEditor protected: - bool OnMatchesFilter([[maybe_unused]] const DebugLogFilter& treeFilter) { return true; } + bool OnMatchesFilter([[maybe_unused]] const DebugLogFilter& treeFilter) override { return true; } UpdatePolicy m_updatePolicy; QTimer m_additionTimer; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h index b03efa5813..479fed1097 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h @@ -59,8 +59,8 @@ namespace ScriptCanvasEditor FunctionPaletteTreeItem(const char* name, const ScriptCanvas::Grammar::FunctionSourceId& sourceId, AZ::Data::Asset asset); ~FunctionPaletteTreeItem() = default; - GraphCanvas::GraphCanvasMimeEvent* CreateMimeEvent() const; - QVariant OnData(const QModelIndex& index, int role) const; + GraphCanvas::GraphCanvasMimeEvent* CreateMimeEvent() const override; + QVariant OnData(const QModelIndex& index, int role) const override; ScriptCanvas::Grammar::FunctionSourceId GetFunctionSourceId() const; AZ::Data::AssetId GetSourceAssetId() const; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/ScriptEventsNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/ScriptEventsNodePaletteTreeItemTypes.h index c3b37369ca..f47a224564 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/ScriptEventsNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/ScriptEventsNodePaletteTreeItemTypes.h @@ -232,8 +232,8 @@ namespace ScriptCanvasEditor ScriptEventsEventNodePaletteTreeItem(const AZ::Data::AssetId& m_assetId, const ScriptEvents::Method& methodDefinition, const ScriptCanvas::EBusEventId& eventId); ~ScriptEventsEventNodePaletteTreeItem() = default; - GraphCanvas::GraphCanvasMimeEvent* CreateMimeEvent() const; - QVariant OnData(const QModelIndex& index, int role) const; + GraphCanvas::GraphCanvasMimeEvent* CreateMimeEvent() const override; + QVariant OnData(const QModelIndex& index, int role) const override; ScriptCanvas::EBusBusId GetBusIdentifier() const; ScriptCanvas::EBusEventId GetEventIdentifier() const; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h index cfc056e705..244e2bf645 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h @@ -25,7 +25,7 @@ namespace ScriptCanvasEditor CreateCommentNodeMimeEvent() = default; ~CreateCommentNodeMimeEvent() = default; - NodeIdPair ConstructNode(const AZ::EntityId& sceneId, const AZ::Vector2& scenePosition); + NodeIdPair ConstructNode(const AZ::EntityId& sceneId, const AZ::Vector2& scenePosition) override; bool ExecuteEvent(const AZ::Vector2& mousePosition, AZ::Vector2& sceneDropPosition, const AZ::EntityId& sceneId) override; }; @@ -54,7 +54,7 @@ namespace ScriptCanvasEditor CreateNodeGroupMimeEvent() = default; ~CreateNodeGroupMimeEvent() = default; - NodeIdPair ConstructNode(const GraphCanvas::GraphId& sceneId, const AZ::Vector2& scenePosition); + NodeIdPair ConstructNode(const GraphCanvas::GraphId& sceneId, const AZ::Vector2& scenePosition) override; bool ExecuteEvent(const AZ::Vector2& mousePosition, AZ::Vector2& sceneDropPosition, const GraphCanvas::GraphId& sceneId) override; }; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.h index 27923fbe63..962aadb8c8 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.h @@ -160,7 +160,7 @@ namespace ScriptCanvasEditor //// // GraphCanvas::SceneNotifications - void OnSelectionChanged(); + void OnSelectionChanged() override; //// void ApplyPreferenceSort(); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h index d11d2f0052..ba5ff7f97f 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h @@ -272,7 +272,7 @@ namespace ScriptCanvasEditor private: // UIRequestBus QMainWindow* GetMainWindow() override { return qobject_cast(this); } - void OpenValidationPanel(); + void OpenValidationPanel() override; // // Undo Handlers @@ -299,9 +299,9 @@ namespace ScriptCanvasEditor bool ContainsGraph(const GraphCanvas::GraphId& graphId) const override; bool CloseGraph(const GraphCanvas::GraphId& graphId) override; - void CustomizeConnectionEntity(AZ::Entity* connectionEntity); + void CustomizeConnectionEntity(AZ::Entity* connectionEntity) override; - void ShowAssetPresetsMenu(GraphCanvas::ConstructType constructType); + void ShowAssetPresetsMenu(GraphCanvas::ConstructType constructType) override; GraphCanvas::ContextMenuAction::SceneReaction ShowSceneContextMenuWithGroup(const QPoint& screenPoint, const QPointF& scenePoint, AZ::EntityId groupTarget) override; @@ -327,8 +327,8 @@ namespace ScriptCanvasEditor //// //! ScriptCanvas::BatchOperationsNotificationBus - void OnCommandStarted(AZ::Crc32 commandTag); - void OnCommandFinished(AZ::Crc32 commandTag); + void OnCommandStarted(AZ::Crc32 commandTag) override; + void OnCommandFinished(AZ::Crc32 commandTag) override; // File menu void OnFileNew(); @@ -427,7 +427,7 @@ namespace ScriptCanvasEditor QVariant GetTabData(const AZ::Data::AssetId& assetId); //! GeneralRequestBus - AZ::Outcome OpenScriptCanvasAssetId(const AZ::Data::AssetId& assetId); + AZ::Outcome OpenScriptCanvasAssetId(const AZ::Data::AssetId& assetId) override; AZ::Outcome OpenScriptCanvasAsset(AZ::Data::AssetId scriptCanvasAssetId, int tabIndex = -1) override; AZ::Outcome OpenScriptCanvasAsset(const ScriptCanvasMemoryAsset& scriptCanvasAsset, int tabIndex = -1); int CloseScriptCanvasAsset(const AZ::Data::AssetId& assetId) override; @@ -497,7 +497,7 @@ namespace ScriptCanvasEditor float GetEdgePanningScrollSpeed() const override; GraphCanvas::EditorConstructPresets* GetConstructPresets() const override; - const GraphCanvas::ConstructTypePresetBucket* GetConstructTypePresetBucket(GraphCanvas::ConstructType constructType) const; + const GraphCanvas::ConstructTypePresetBucket* GetConstructTypePresetBucket(GraphCanvas::ConstructType constructType) const override; GraphCanvas::Styling::ConnectionCurveType GetConnectionCurveType() const override; GraphCanvas::Styling::ConnectionCurveType GetDataConnectionCurveType() const override; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h index f95ca6c80b..e8e2a8ee4f 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h @@ -61,7 +61,10 @@ namespace ScriptCanvasEditor bool IsInSubMenu() const override; AZStd::string GetSubMenuPath() const override; + using GraphCanvas::SceneContextMenuAction::RefreshAction; void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override; + + using GraphCanvas::SceneContextMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override; }; @@ -77,7 +80,10 @@ namespace ScriptCanvasEditor GraphCanvas::ActionGroupId GetActionGroupId() const override; + using GraphCanvas::ContextMenuAction::RefreshAction; void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override; + + using GraphCanvas::ContextMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override; private: @@ -110,7 +116,10 @@ namespace ScriptCanvasEditor GraphCanvas::ActionGroupId GetActionGroupId() const override; + using SlotManipulationMenuAction::RefreshAction; void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override; + + using SlotManipulationMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override; private: @@ -127,7 +136,10 @@ namespace ScriptCanvasEditor ExposeSlotMenuAction(QObject* parent); virtual ~ExposeSlotMenuAction() = default; + using GraphCanvas::SlotContextMenuAction::RefreshAction; void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override; + + using GraphCanvas::SlotContextMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override; protected: @@ -145,7 +157,10 @@ namespace ScriptCanvasEditor virtual ~SetDataSlotTypeMenuAction() = default; static bool IsSupportedSlotType(const AZ::EntityId& slotId); + using GraphCanvas::SlotContextMenuAction::RefreshAction; void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override; + + using GraphCanvas::SlotContextMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override; private: @@ -164,7 +179,10 @@ namespace ScriptCanvasEditor CreateAzEventHandlerSlotMenuAction(QObject* parent); + using GraphCanvas::SlotContextMenuAction::RefreshAction; void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override; + + using GraphCanvas::SlotContextMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override; static const AZ::BehaviorMethod* FindBehaviorMethodWithAzEventReturn(const GraphCanvas::GraphId& graphId, AZ::EntityId targetId); @@ -239,7 +257,10 @@ namespace ScriptCanvasEditor RenameFunctionDefinitionNodeAction(NodeDescriptorComponent* descriptor, QObject* parent); virtual ~RenameFunctionDefinitionNodeAction() = default; + using GraphCanvas::NodeContextMenuAction::RefreshAction; void RefreshAction(const GraphCanvas::GraphId& graphId, const AZ::EntityId& targetId) override; + + using GraphCanvas::NodeContextMenuAction::TriggerAction; GraphCanvas::ContextMenuAction::SceneReaction TriggerAction(const GraphCanvas::GraphId& graphId, const AZ::Vector2& scenePos) override; NodeDescriptorComponent* m_descriptor; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h index bb1ea21f30..46e8a103bb 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h @@ -109,11 +109,11 @@ namespace ScriptCanvas //! NOTE: There can be multiple Graph components on the same entity so calling FindComponent may not not return this GraphComponent AZ::Entity* GetGraphEntity() const override { return GetEntity(); } - Graph* GetGraph() { return this; } + Graph* GetGraph() override { return this; } GraphData* GetGraphData() override { return &m_graphData; } const GraphData* GetGraphDataConst() const override { return &m_graphData; } - const VariableData* GetVariableDataConst() const { return const_cast(this)->GetVariableData(); } + const VariableData* GetVariableDataConst() const override { return const_cast(this)->GetVariableData(); } bool AddGraphData(const GraphData&) override; void RemoveGraphData(const GraphData&) override; @@ -131,7 +131,7 @@ namespace ScriptCanvas /////////////////////////////////////////////////////////// // StatusRequestBus - void ValidateGraph(ValidationResults& validationEvents); + void ValidateGraph(ValidationResults& validationEvents) override; void ReportValidationResults(ValidationResults&) override { } //// diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h index 27f0b3862d..a54f330e18 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h @@ -69,14 +69,14 @@ namespace ScriptCanvas { public: /// Called right before we start reading from the instance pointed by classPtr. - void OnReadBegin(void* objectPtr) + void OnReadBegin(void* objectPtr) override { t_Class* deserializedObject = reinterpret_cast(objectPtr); deserializedObject->OnReadBegin(); } /// Called after we are done reading from the instance pointed by classPtr. - void OnReadEnd(void* objectPtr) + void OnReadEnd(void* objectPtr) override { t_Class* deserializedObject = reinterpret_cast(objectPtr); deserializedObject->OnReadEnd(); @@ -178,8 +178,8 @@ namespace ScriptCanvas NodePropertyInterface() = default; public: - AZ_RTTI(NodePropertyInterface, "{265A2163-D3AE-4C4E-BDCC-37BA0084BF88}"); + virtual ~NodePropertyInterface() = default; virtual Data::Type GetDataType() = 0; @@ -217,14 +217,14 @@ namespace ScriptCanvas AZ_RTTI((TypedNodePropertyInterface, "{24248937-86FB-406C-8DD5-023B10BD0B60}", DataType), NodePropertyInterface); TypedNodePropertyInterface() = default; - ~TypedNodePropertyInterface() = default; + virtual ~TypedNodePropertyInterface() = default; void SetPropertyReference(DataType* dataReference) { m_dataType = dataReference; } - virtual Data::Type GetDataType() override + Data::Type GetDataType() override { return Data::FromAZType(azrtti_typeid()); } @@ -283,7 +283,7 @@ namespace ScriptCanvas AZ_RTTI((TypedComboBoxNodePropertyInterface, "{24248937-86FB-406C-8DD5-023B10BD0B60}", DataType), TypedNodePropertyInterface, ComboBoxPropertyInterface); TypedComboBoxNodePropertyInterface() = default; - ~TypedComboBoxNodePropertyInterface() = default; + virtual ~TypedComboBoxNodePropertyInterface() = default; // TypedNodePropertyInterface void ResetToDefault() override @@ -310,7 +310,7 @@ namespace ScriptCanvas } // ComboBoxPropertyInterface - int GetSelectedIndex() const + int GetSelectedIndex() const override { int counter = -1; @@ -328,7 +328,7 @@ namespace ScriptCanvas return counter; } - void SetSelectedIndex(int index) + void SetSelectedIndex(int index) override { if (index >= 0 || index < m_displaySet.size()) { @@ -354,6 +354,7 @@ namespace ScriptCanvas { public: AZ_RTTI(EnumComboBoxNodePropertyInterface, "{7D46B998-9E05-401A-AC92-37A90BAF8F60}", TypedComboBoxNodePropertyInterface); + virtual ~EnumComboBoxNodePropertyInterface() = default; // No way of identifying Enum types properly yet. Going to fake a BCO object type for now. static const AZ::Uuid k_EnumUUID; @@ -512,13 +513,13 @@ namespace ScriptCanvas //! Node internal initialization, for custom init, use OnInit - void Init() override final; + void Init() final; //! Node internal activation and housekeeping, for custom activation configuration use OnActivate - void Activate() override final; + void Activate() final; //! Node internal deactivation and housekeeping, for custom deactivation configuration use OnDeactivate - void Deactivate() override final; + void Deactivate() final; void PostActivate(); @@ -590,7 +591,7 @@ namespace ScriptCanvas NodeDisabledFlag GetNodeDisabledFlag() const; void SetNodeDisabledFlag(NodeDisabledFlag disabledFlag); - bool RemoveVariableReferences(const AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds); + bool RemoveVariableReferences(const AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) override; //// Slot* GetSlotByName(AZStd::string_view slotName) const; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ClientTransceiver.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ClientTransceiver.h index 23406fbf56..78e293c4b0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ClientTransceiver.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ClientTransceiver.h @@ -78,7 +78,7 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// // TargetManagerClient void DesiredTargetConnected(bool connected) override; - void DesiredTargetChanged(AZ::u32 newId, AZ::u32 oldId); + void DesiredTargetChanged(AZ::u32 newId, AZ::u32 oldId) override; void TargetJoinedNetwork(AzFramework::TargetInfo info) override; void TargetLeftNetwork(AzFramework::TargetInfo info) override; ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/InvalidVariableTypeEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/InvalidVariableTypeEvent.h index 85ce975968..602e6626a1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/InvalidVariableTypeEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/InvalidVariableTypeEvent.h @@ -31,12 +31,12 @@ namespace ScriptCanvas SetDescription(AZStd::string::format("Variable with id %s has an invalid type.", variableId.ToString().c_str())); } - bool CanAutoFix() const + bool CanAutoFix() const override { return true; } - AZStd::string GetIdentifier() const + AZStd::string GetIdentifier() const override { return DataValidationIds::InvalidVariableTypeId; } @@ -46,12 +46,12 @@ namespace ScriptCanvas return m_variableId; } - AZ::Crc32 GetIdCrc() const + AZ::Crc32 GetIdCrc() const override { return DataValidationIds::InvalidVariableTypeCrc; } - AZStd::string_view GetTooltip() const + AZStd::string_view GetTooltip() const override { return "Invalid type for variable, auto fixing will remove all invalid variable nodes."; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScopedDataConnectionEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScopedDataConnectionEvent.h index 09c372da9a..0b2150448b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScopedDataConnectionEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScopedDataConnectionEvent.h @@ -59,17 +59,17 @@ namespace ScriptCanvas , targetNode.GetNodeName().data())); } - bool CanAutoFix() const + bool CanAutoFix() const override { return false; } - AZStd::string GetIdentifier() const + AZStd::string GetIdentifier() const override { return DataValidationIds::ScopedDataConnectionId; } - AZ::Crc32 GetIdCrc() const + AZ::Crc32 GetIdCrc() const override { return DataValidationIds::ScopedDataConnectionCrc; } @@ -79,7 +79,7 @@ namespace ScriptCanvas return m_connectionId; } - AZStd::string_view GetTooltip() const + AZStd::string_view GetTooltip() const override { return "Out of Scope Data Connection"; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScriptEventVersionMismatch.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScriptEventVersionMismatch.h index b23c241967..c0443f9cc2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScriptEventVersionMismatch.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScriptEventVersionMismatch.h @@ -37,17 +37,17 @@ namespace ScriptCanvas SetDescription("The Script Event asset this node uses has changed. This node is no longer valid. You can fix this by deleting this node, re-adding it and reconnecting it."); } - bool CanAutoFix() const + bool CanAutoFix() const override { return false; } - AZStd::string GetIdentifier() const + AZStd::string GetIdentifier() const override { return DataValidationIds::ScriptEventVersionMismatchId; } - AZ::Crc32 GetIdCrc() const + AZ::Crc32 GetIdCrc() const override { return DataValidationIds::ScriptEventVersionMismatchCrc; } @@ -57,7 +57,7 @@ namespace ScriptCanvas return m_definition; } - AZStd::string_view GetTooltip() const + AZStd::string_view GetTooltip() const override { return "The Script Event asset has changed, you can fix this problem by deleting the out of date node and re-adding it to your graph."; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/UnknownEndpointEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/UnknownEndpointEvent.h index b654448dc6..36f12527a2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/UnknownEndpointEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/UnknownEndpointEvent.h @@ -86,7 +86,7 @@ namespace ScriptCanvas return DataValidationIds::UnknownSourceEndpointCrc; } - AZStd::string_view GetTooltip() const + AZStd::string_view GetTooltip() const override { return "Unknown Source Endpoint"; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/ExecutionValidation/UnusedNodeEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/ExecutionValidation/UnusedNodeEvent.h index a49998e555..d2c028985f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/ExecutionValidation/UnusedNodeEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/ExecutionValidation/UnusedNodeEvent.h @@ -60,7 +60,7 @@ namespace ScriptCanvas } // HighlightEntityEffect - AZ::EntityId GetHighlightTarget() const + AZ::EntityId GetHighlightTarget() const override { return m_nodeId; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/ParsingValidation/ParsingValidations.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/ParsingValidation/ParsingValidations.h index ac8f41862e..a862cca2eb 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/ParsingValidation/ParsingValidations.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Debugger/ValidationEvents/ParsingValidation/ParsingValidations.h @@ -43,7 +43,7 @@ namespace ScriptCanvas } // HighlightEntityEffect - AZ::EntityId GetHighlightTarget() const + AZ::EntityId GetHighlightTarget() const override { return m_nodeId; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/StringFormatted.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/StringFormatted.h index 205ae4ea60..2a327bd37d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/StringFormatted.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/StringFormatted.h @@ -40,7 +40,7 @@ namespace ScriptCanvas return true; } - AZ::Outcome GetDependencies() const + AZ::Outcome GetDependencies() const override { return AZ::Success(DependencyReport{}); } @@ -49,8 +49,6 @@ namespace ScriptCanvas AZ_INLINE const NamedSlotIdMap& GetNamedSlotIdMap() const { return m_formatSlotMap; } AZ_INLINE const int GetPostDecimalPrecision() const { return m_numericPrecision; } - - protected: // This is a map that binds the index into m_unresolvedString to the SlotId that needs to be checked for a valid datum. diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h index c6d4a8b512..05419f3ec3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h @@ -102,7 +102,7 @@ namespace ScriptCanvas AZ::Outcome GetFunctionCallName(const Slot* /*slot*/) const override; bool IsEBusAddressed() const override; - AZStd::optional GetEventIndex(AZStd::string eventName) const; + AZStd::optional GetEventIndex(AZStd::string eventName) const override; const EBusEventEntry* FindEvent(const AZStd::string& name) const; AZStd::string GetEBusName() const override; bool IsAutoConnected() const override; @@ -138,7 +138,7 @@ namespace ScriptCanvas void SetAutoConnectToGraphOwner(bool enabled); - void OnDeserialize(); + void OnDeserialize() override; #if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)//// void OnWriteEnd(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h index 5584212048..1f1daddc71 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h @@ -107,7 +107,7 @@ namespace ScriptCanvas SlotId GetBusSlotId() const; - void OnDeserialize(); + void OnDeserialize() override; #if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)//// void OnWriteEnd(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h index 17c203626f..7edd83794a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h @@ -36,9 +36,9 @@ namespace ScriptCanvas void OnConfigured() override; void ConfigureVisualExtensions() override; - bool CanDeleteSlot(const SlotId& slotId) const; + bool CanDeleteSlot(const SlotId& slotId) const override; - SlotId HandleExtension(AZ::Crc32 extensionId); + SlotId HandleExtension(AZ::Crc32 extensionId) override; AZ::Outcome GetDependencies() const override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h index 71ea8870c2..24bcd8e5e5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h @@ -29,7 +29,7 @@ namespace ScriptCanvas IsNull(); - AZ::Outcome GetDependencies() const; + AZ::Outcome GetDependencies() const override; bool IsIfBranch() const override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h index 10517502a5..0547f59db0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h @@ -30,13 +30,13 @@ namespace ScriptCanvas OrderedSequencer(); - bool CanDeleteSlot(const SlotId& slotId) const; + bool CanDeleteSlot(const SlotId& slotId) const override; AZ::Outcome GetDependencies() const override; ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& executionSlot, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override; - SlotId HandleExtension(AZ::Crc32 extensionId); + SlotId HandleExtension(AZ::Crc32 extensionId) override; void OnInit() override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h index a2c4d93ef8..f4f590751a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h @@ -33,9 +33,9 @@ namespace ScriptCanvas void OnConfigured() override; void ConfigureVisualExtensions() override; - bool CanDeleteSlot(const SlotId& slotId) const; + bool CanDeleteSlot(const SlotId& slotId) const override; - SlotId HandleExtension(AZ::Crc32 extensionId); + SlotId HandleExtension(AZ::Crc32 extensionId) override; // Script Canvas Translation... bool IsSwitchStatement() const override { return true; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h index f9cbaac652..b51327b65d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h @@ -39,7 +39,7 @@ namespace ScriptCanvas void OnInit() override; void ConfigureVisualExtensions() override; - bool OnValidateNode(ValidationResults& validationResults); + bool OnValidateNode(ValidationResults& validationResults) override; SlotId HandleExtension(AZ::Crc32 extensionId) override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/SystemComponent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/SystemComponent.h index f208e3b9d4..7dbde3224e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/SystemComponent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/SystemComponent.h @@ -74,7 +74,7 @@ namespace ScriptCanvas ScriptCanvasId FindScriptCanvasId(AZ::Entity* graphEntity) override; ScriptCanvas::Node* GetNode(const AZ::EntityId&, const AZ::Uuid&) override; ScriptCanvas::Node* CreateNodeOnEntity(const AZ::EntityId& entityId, ScriptCanvasId scriptCanvasId, const AZ::Uuid& nodeType) override; - SystemComponentConfiguration GetSystemComponentConfiguration() + SystemComponentConfiguration GetSystemComponentConfiguration() override { SystemComponentConfiguration configuration; configuration.m_maxIterationsForInfiniteLoopDetection = m_infiniteLoopDetectionMaxIterations; diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_debugger_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_debugger_files.cmake index 38182dc251..0a68a9b175 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_debugger_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_debugger_files.cmake @@ -35,6 +35,7 @@ set(FILES Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/DynamicDataTypeEvent.h Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/InvalidExpressionEvent.h Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/InvalidRandomSignalEvent.h + Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/InvalidVariableTypeEvent.h Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/ScopedDataConnectionEvent.h Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/SlotReferenceEvent.h Include/ScriptCanvas/Debugger/ValidationEvents/DataValidation/UnknownEndpointEvent.h diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.h index d2f1feb0d1..c9eda4c0bc 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.h @@ -139,7 +139,7 @@ namespace ScriptCanvasDeveloper protected: - void OnActionsComplete(); + void OnActionsComplete() override; private: @@ -222,7 +222,7 @@ namespace ScriptCanvasDeveloper CreateGroupAction(GraphCanvas::EditorId editorGraph, GraphCanvas::GraphId graphId, CreationType creationType = CreationType::Hotkey); ~CreateGroupAction() override = default; - void SetupAction(); + void SetupAction() override; // GraphCanvas::SceneNotificationBus::Handler void OnNodeAdded(const AZ::EntityId& groupId, bool isPaste = false) override; @@ -236,7 +236,7 @@ namespace ScriptCanvasDeveloper void SetupToolbarAction(); void SetupHotkeyAction(); - void OnActionsComplete(); + void OnActionsComplete() override; private: diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/ElementInteractions.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/ElementInteractions.h index 4a83ab2637..b7498ff56e 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/ElementInteractions.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/ElementInteractions.h @@ -32,7 +32,7 @@ namespace ScriptCanvasDeveloper bool IsMissingPrecondition() override; EditorAutomationAction* GenerateMissingPreconditionAction() override; - void SetupAction(); + void SetupAction() override; private: @@ -66,9 +66,9 @@ namespace ScriptCanvasDeveloper ActionReport GenerateReport() const override; // SceneNotificaitonBus - void OnNodeRemoved(const AZ::EntityId& nodeId); + void OnNodeRemoved(const AZ::EntityId& nodeId) override; - void OnConnectionRemoved(const AZ::EntityId& connectionId); + void OnConnectionRemoved(const AZ::EntityId& connectionId) override; //// protected: @@ -98,7 +98,7 @@ namespace ScriptCanvasDeveloper MouseToNodePropertyEditorAction(GraphCanvas::SlotId slotId); ~MouseToNodePropertyEditorAction() override = default; - void SetupAction(); + void SetupAction() override; private: diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/VariableActions.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/VariableActions.h index 2ce49ba3ed..a8d7165feb 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/VariableActions.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/VariableActions.h @@ -96,7 +96,7 @@ namespace ScriptCanvasDeveloper bool IsMissingPrecondition() override; EditorAutomationAction* GenerateMissingPreconditionAction() override; - void SetupAction(); + void SetupAction() override; // GraphCanvas::SceneNotificationBus void OnNodeAdded(const AZ::EntityId& nodeId, bool isPaste) override; @@ -146,7 +146,7 @@ namespace ScriptCanvasDeveloper ShowGraphVariablesAction() = default; ~ShowGraphVariablesAction() override = default; - void SetupAction(); + void SetupAction() override; ActionReport GenerateReport() const override; }; diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/EditorViewStates.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/EditorViewStates.h index fa7db8ce9f..daba20b8c8 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/EditorViewStates.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/EditorViewStates.h @@ -70,7 +70,7 @@ namespace ScriptCanvasDeveloper FindViewCenterState(AutomationStateModelId outputId); ~FindViewCenterState() override = default; - void OnCustomAction(); + void OnCustomAction() override; private: diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/Mock.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/Mock.h index 221aa501a9..41eddbfc02 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/Mock.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/Mock.h @@ -118,7 +118,7 @@ namespace ScriptCanvasDeveloper private: //// ScriptCanvasEditor::EditorGraphNotificationBus - void OnGraphCanvasNodeDisplayed(AZ::EntityId graphCanvasEntityId); + void OnGraphCanvasNodeDisplayed(AZ::EntityId graphCanvasEntityId) override; //// AZStd::string m_nodeTitle; diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/WrapperMock.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/WrapperMock.h index 4ffafbd2a5..4b0155ec29 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/WrapperMock.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/WrapperMock.h @@ -52,7 +52,7 @@ namespace ScriptCanvasDeveloper void OnActionNameChanged(); - void OnClear(); + void OnClear() override; void OnNodeDisplayed(const GraphCanvas::NodeId& graphCanvasNodeId) override; private: diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/DynamicSlotFullCreation.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/DynamicSlotFullCreation.cpp index 83ece831eb..090622646a 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/DynamicSlotFullCreation.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/DynamicSlotFullCreation.cpp @@ -39,13 +39,14 @@ namespace ScriptCanvasDeveloperEditor { public: - DynamicSlotFullCreationInterface(DeveloperUtils::ConnectionStyle connectionStyle) + DynamicSlotFullCreationInterface(DeveloperUtils::ConnectionStyle connectionStyle) { m_chainConfig.m_connectionStyle = connectionStyle; m_chainConfig.m_skipHandlers = true; } + virtual ~DynamicSlotFullCreationInterface() = default; - void SetupInterface(const AZ::EntityId& activeGraphCanvasGraphId, const ScriptCanvas::ScriptCanvasId& scriptCanvasId) + void SetupInterface(const AZ::EntityId& activeGraphCanvasGraphId, const ScriptCanvas::ScriptCanvasId& scriptCanvasId) override { m_graphCanvasGraphId = activeGraphCanvasGraphId; m_scriptCanvasId = scriptCanvasId; @@ -142,12 +143,12 @@ namespace ScriptCanvasDeveloperEditor } } - bool ShouldProcessItem([[maybe_unused]] const GraphCanvas::NodePaletteTreeItem* nodePaletteTreeItem) const + bool ShouldProcessItem([[maybe_unused]] const GraphCanvas::NodePaletteTreeItem* nodePaletteTreeItem) const override { return !m_availableVariableIds.empty(); } - void ProcessItem(const GraphCanvas::NodePaletteTreeItem* nodePaletteTreeItem) + void ProcessItem(const GraphCanvas::NodePaletteTreeItem* nodePaletteTreeItem) override { AZStd::unordered_set createdPairs; GraphCanvas::GraphCanvasMimeEvent* mimeEvent = nodePaletteTreeItem->CreateMimeEvent(); diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/VariableListFullCreation.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/VariableListFullCreation.cpp index c443c57010..4b457e99e2 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/VariableListFullCreation.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/AutomationActions/VariableListFullCreation.cpp @@ -37,9 +37,7 @@ namespace ScriptCanvasDeveloperEditor m_variableNameFormat += " %i"; } - ~VariablePaletteFullCreationInterface() - { - } + virtual ~VariablePaletteFullCreationInterface() = default; void SetupInterface([[maybe_unused]] const AZ::EntityId& graphCanvasId, const ScriptCanvas::ScriptCanvasId& scriptCanvasId) { diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTestDialog.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTestDialog.h index 84597a991c..865738eadc 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTestDialog.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTestDialog.h @@ -101,7 +101,7 @@ namespace ScriptCanvasDeveloper void RunTest(QModelIndex index); // SystemTickBus - void OnSystemTick(); + void OnSystemTick() override; //// // EditorAutomationTestDialogRequestBus::Handler diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.h index c09f219da0..c02d5cf081 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.h @@ -55,8 +55,8 @@ namespace ScriptCanvasDeveloper protected: - void OnSetupStateActions(EditorAutomationActionRunner& actionRunner); - void OnStateActionsComplete(); + void OnSetupStateActions(EditorAutomationActionRunner& actionRunner) override; + void OnStateActionsComplete() override; private: diff --git a/Gems/ScriptCanvasPhysics/Code/Tests/ScriptCanvasPhysicsTest.cpp b/Gems/ScriptCanvasPhysics/Code/Tests/ScriptCanvasPhysicsTest.cpp index ac6109ce30..70d8857b1c 100644 --- a/Gems/ScriptCanvasPhysics/Code/Tests/ScriptCanvasPhysicsTest.cpp +++ b/Gems/ScriptCanvasPhysics/Code/Tests/ScriptCanvasPhysicsTest.cpp @@ -175,7 +175,7 @@ namespace ScriptCanvasPhysicsTests MOCK_CONST_METHOD0(GetNativePointer, void*()); }; - class MockShape + class MockShape : public Physics::Shape { public: @@ -203,10 +203,12 @@ namespace ScriptCanvasPhysicsTests MOCK_METHOD1(SetContactOffset, void(float)); }; - class MockPhysicsMaterial + class MockPhysicsMaterial : public Physics::Material { public: + virtual ~MockPhysicsMaterial() = default; + MOCK_CONST_METHOD0(GetSurfaceType, AZ::Crc32()); MOCK_CONST_METHOD0(GetSurfaceTypeName, const AZStd::string&()); MOCK_METHOD1(SetSurfaceTypeName, void(const AZStd::string&)); diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h index 56ecdc33a1..8272e647a3 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h @@ -548,7 +548,7 @@ namespace ScriptCanvasTests bool DestroyEntityById(AZ::EntityId entityId) override; AZ::Entity* CloneEntity(const AZ::Entity& sourceEntity) override; void ResetContext() override; - AZ::EntityId FindLoadedEntityIdMapping(const AZ::EntityId& staticId) const; + AZ::EntityId FindLoadedEntityIdMapping(const AZ::EntityId& staticId) const override; //// void AddEntity(AZ::EntityId entityId); diff --git a/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp b/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp index 7ab7fa2540..c8db1169ed 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp @@ -237,7 +237,7 @@ namespace ScriptCanvasTesting return result; } - void Void(AZStd::string_view value) + void Void(AZStd::string_view value) override { Call(FN_Void, value); } diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_MethodOverload.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_MethodOverload.cpp index 13f6657d62..d7e5bbfb02 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_MethodOverload.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_MethodOverload.cpp @@ -99,7 +99,7 @@ public: } } - void ConfigureSlots() + void ConfigureSlots() override { ScriptCanvas::SlotExecution::Ins ins; { diff --git a/Gems/ScriptEvents/Code/Source/Editor/ScriptEventsSystemEditorComponent.h b/Gems/ScriptEvents/Code/Source/Editor/ScriptEventsSystemEditorComponent.h index 4365873b3a..9463b2a047 100644 --- a/Gems/ScriptEvents/Code/Source/Editor/ScriptEventsSystemEditorComponent.h +++ b/Gems/ScriptEvents/Code/Source/Editor/ScriptEventsSystemEditorComponent.h @@ -46,7 +46,7 @@ namespace ScriptEventsEditor // AssetEditorValidationRequestBus::Handler AZ::Outcome IsAssetDataValid(const AZ::Data::Asset& asset) override; - void PreAssetSave(AZ::Data::Asset asset); + void PreAssetSave(AZ::Data::Asset asset) override; void BeforePropertyEdit(AzToolsFramework::InstanceDataNode* node, AZ::Data::Asset asset) override; void SetSaveAsBinary(bool saveAsBinary) { m_saveAsBinary = saveAsBinary; } diff --git a/Gems/ScriptedEntityTweener/Code/Source/ScriptedEntityTweenerModule.cpp b/Gems/ScriptedEntityTweener/Code/Source/ScriptedEntityTweenerModule.cpp index 8d5057e17f..20f59b94a9 100644 --- a/Gems/ScriptedEntityTweener/Code/Source/ScriptedEntityTweenerModule.cpp +++ b/Gems/ScriptedEntityTweener/Code/Source/ScriptedEntityTweenerModule.cpp @@ -39,7 +39,7 @@ namespace ScriptedEntityTweener }; } - void OnSystemEvent(ESystemEvent systemEvent, UINT_PTR wparam, UINT_PTR lparam) + void OnSystemEvent(ESystemEvent systemEvent, UINT_PTR wparam, UINT_PTR lparam) override { CryHooksModule::OnSystemEvent(systemEvent, wparam, lparam); diff --git a/Gems/ScriptedEntityTweener/Code/Source/ScriptedEntityTweenerSystemComponent.cpp b/Gems/ScriptedEntityTweener/Code/Source/ScriptedEntityTweenerSystemComponent.cpp index f1f4977164..67a5038aec 100644 --- a/Gems/ScriptedEntityTweener/Code/Source/ScriptedEntityTweenerSystemComponent.cpp +++ b/Gems/ScriptedEntityTweener/Code/Source/ScriptedEntityTweenerSystemComponent.cpp @@ -47,7 +47,7 @@ namespace ScriptedEntityTweener Call(FN_RemoveCallback, callbackId); } - void OnTimelineAnimationStart(int timelineId, const AZ::Uuid& uuid, const AZStd::string& componentName, const AZStd::string& propertyName) + void OnTimelineAnimationStart(int timelineId, const AZ::Uuid& uuid, const AZStd::string& componentName, const AZStd::string& propertyName) override { Call(FN_OnTimelineAnimationStart, timelineId, uuid, componentName, propertyName); } diff --git a/Gems/SurfaceData/Code/Source/Components/SurfaceDataShapeComponent.h b/Gems/SurfaceData/Code/Source/Components/SurfaceDataShapeComponent.h index 31b960c2b6..f2c478ed27 100644 --- a/Gems/SurfaceData/Code/Source/Components/SurfaceDataShapeComponent.h +++ b/Gems/SurfaceData/Code/Source/Components/SurfaceDataShapeComponent.h @@ -64,7 +64,7 @@ namespace SurfaceData ////////////////////////////////////////////////////////////////////////// // SurfaceDataProviderRequestBus - void GetSurfacePoints(const AZ::Vector3& inPosition, SurfacePointList& surfacePointList) const; + void GetSurfacePoints(const AZ::Vector3& inPosition, SurfacePointList& surfacePointList) const override; ////////////////////////////////////////////////////////////////////////// // SurfaceDataModifierRequestBus diff --git a/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.h b/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.h index a742eab78c..d9c7893c77 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.h @@ -56,7 +56,7 @@ namespace Terrain ////////////////////////////////////////////////////////////////////////// // SurfaceDataProviderRequestBus - void GetSurfacePoints(const AZ::Vector3& inPosition, SurfaceData::SurfacePointList& surfacePointList) const; + void GetSurfacePoints(const AZ::Vector3& inPosition, SurfaceData::SurfacePointList& surfacePointList) const override; ////////////////////////////////////////////////////////////////////////// // AzFramework::Terrain::TerrainDataNotificationBus diff --git a/Gems/Twitch/Code/Source/TwitchReflection.cpp b/Gems/Twitch/Code/Source/TwitchReflection.cpp index 618fb6814a..510d1d94f5 100644 --- a/Gems/Twitch/Code/Source/TwitchReflection.cpp +++ b/Gems/Twitch/Code/Source/TwitchReflection.cpp @@ -595,137 +595,137 @@ namespace Twitch StartChannelCommercial, ResetChannelStreamKey); - void UserIDNotify(const StringValue& userID) + void UserIDNotify(const StringValue& userID) override { Call(FN_UserIDNotify, userID); } - void OAuthTokenNotify(const StringValue& token) + void OAuthTokenNotify(const StringValue& token) override { Call(FN_OAuthTokenNotify, token); } - void GetUser(const UserInfoValue& result) + void GetUser(const UserInfoValue& result) override { Call(FN_GetUser, result); } - void ResetFriendsNotificationCountNotify(const Int64Value& result) + void ResetFriendsNotificationCountNotify(const Int64Value& result) override { Call(FN_ResetFriendsNotificationCountNotify, result); } - void GetFriendNotificationCount(const Int64Value& result) + void GetFriendNotificationCount(const Int64Value& result) override { Call(FN_GetFriendNotificationCount, result); } - void GetFriendRecommendations(const FriendRecommendationValue& result) + void GetFriendRecommendations(const FriendRecommendationValue& result) override { Call(FN_GetFriendRecommendations, result); } - void GetFriends(const GetFriendValue& result) + void GetFriends(const GetFriendValue& result) override { Call(FN_GetFriends, result); } - void GetFriendStatus(const FriendStatusValue& result) + void GetFriendStatus(const FriendStatusValue& result) override { Call(FN_GetFriendStatus, result); } - void AcceptFriendRequest(const Int64Value& result) + void AcceptFriendRequest(const Int64Value& result) override { Call(FN_AcceptFriendRequest, result); } - void GetFriendRequests(const FriendRequestValue& result) + void GetFriendRequests(const FriendRequestValue& result) override { Call(FN_GetFriendRequests, result); } - void CreateFriendRequest(const Int64Value& result) + void CreateFriendRequest(const Int64Value& result) override { Call(FN_CreateFriendRequest, result); } - void DeclineFriendRequest(const Int64Value& result) + void DeclineFriendRequest(const Int64Value& result) override { Call(FN_DeclineFriendRequest, result); } - void UpdatePresenceStatus(const Int64Value& result) + void UpdatePresenceStatus(const Int64Value& result) override { Call(FN_UpdatePresenceStatus, result); } - void GetPresenceStatusofFriends(const PresenceStatusValue& result) + void GetPresenceStatusofFriends(const PresenceStatusValue& result) override { Call(FN_GetPresenceStatusofFriends, result); } - void GetPresenceSettings(const PresenceSettingsValue& result) + void GetPresenceSettings(const PresenceSettingsValue& result) override { Call(FN_GetPresenceSettings, result); } - void UpdatePresenceSettings(const PresenceSettingsValue& result) + void UpdatePresenceSettings(const PresenceSettingsValue& result) override { Call(FN_UpdatePresenceSettings, result); } - void GetChannelbyID(const ChannelInfoValue& result) + void GetChannelbyID(const ChannelInfoValue& result) override { Call(FN_GetChannelbyID, result); } - void GetChannel(const ChannelInfoValue& result) + void GetChannel(const ChannelInfoValue& result) override { Call(FN_GetChannel, result); } - void UpdateChannel(const ChannelInfoValue& result) + void UpdateChannel(const ChannelInfoValue& result) override { Call(FN_UpdateChannel, result); } - void GetChannelEditors(const UserInfoListValue& result) + void GetChannelEditors(const UserInfoListValue& result) override { Call(FN_GetChannelEditors, result); } - void GetChannelFollowers(const FollowerResultValue& result) + void GetChannelFollowers(const FollowerResultValue& result) override { Call(FN_GetChannelFollowers, result); } - void GetChannelTeams(const ChannelTeamValue& result) + void GetChannelTeams(const ChannelTeamValue& result) override { Call(FN_GetChannelTeams, result); } - void GetChannelSubscribers(const SubscriberValue& result) + void GetChannelSubscribers(const SubscriberValue& result) override { Call(FN_GetChannelSubscribers, result); } - void CheckChannelSubscriptionbyUser(const SubscriberbyUserValue& result) + void CheckChannelSubscriptionbyUser(const SubscriberbyUserValue& result) override { Call(FN_CheckChannelSubscriptionbyUser, result); } - void GetChannelVideos(const VideoReturnValue& result) + void GetChannelVideos(const VideoReturnValue& result) override { Call(FN_GetChannelVideos, result); } - void StartChannelCommercial(const StartChannelCommercialValue& result) + void StartChannelCommercial(const StartChannelCommercialValue& result) override { Call(FN_StartChannelCommercial, result); } - void ResetChannelStreamKey(const ChannelInfoValue& result) + void ResetChannelStreamKey(const ChannelInfoValue& result) override { Call(FN_ResetChannelStreamKey, result); } diff --git a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorAreaComponentBase.h b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorAreaComponentBase.h index 60ef04b46e..87a1546ad0 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorAreaComponentBase.h +++ b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorAreaComponentBase.h @@ -63,7 +63,7 @@ namespace Vegetation AZ::Aabb GetPreviewBounds() const override; bool GetConstrainToShape() const override; - GradientSignal::GradientPreviewContextPriority GetPreviewContextPriority() const; + GradientSignal::GradientPreviewContextPriority GetPreviewContextPriority() const override; ////////////////////////////////////////////////////////////////////////// // AzToolsFramework::EntitySelectionEvents::Bus::Handler diff --git a/Gems/Vegetation/Code/Tests/DynamicSliceInstanceSpawnerTests.cpp b/Gems/Vegetation/Code/Tests/DynamicSliceInstanceSpawnerTests.cpp index 01a2e059e6..9838a7b6a1 100644 --- a/Gems/Vegetation/Code/Tests/DynamicSliceInstanceSpawnerTests.cpp +++ b/Gems/Vegetation/Code/Tests/DynamicSliceInstanceSpawnerTests.cpp @@ -191,7 +191,7 @@ namespace UnitTest AZ::Data::AssetHandler::LoadResult LoadAssetData( const AZ::Data::Asset& asset, AZStd::shared_ptr stream, - [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) + [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) override { MockAssetData* temp = reinterpret_cast(asset.GetData()); temp->SetStatus(AZ::Data::AssetData::AssetStatus::Ready); diff --git a/Gems/Vegetation/Code/Tests/PrefabInstanceSpawnerTests.cpp b/Gems/Vegetation/Code/Tests/PrefabInstanceSpawnerTests.cpp index ed48aec134..b0d88f2d63 100644 --- a/Gems/Vegetation/Code/Tests/PrefabInstanceSpawnerTests.cpp +++ b/Gems/Vegetation/Code/Tests/PrefabInstanceSpawnerTests.cpp @@ -185,7 +185,7 @@ namespace UnitTest AZ::Data::AssetHandler::LoadResult LoadAssetData( const AZ::Data::Asset& asset, AZStd::shared_ptr stream, - [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) + [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) override { MockAssetData* temp = reinterpret_cast(asset.GetData()); temp->SetStatus(AZ::Data::AssetData::AssetStatus::Ready); diff --git a/Gems/Vegetation/Code/Tests/VegetationMocks.h b/Gems/Vegetation/Code/Tests/VegetationMocks.h index 97eaa50b69..ee620c81a2 100644 --- a/Gems/Vegetation/Code/Tests/VegetationMocks.h +++ b/Gems/Vegetation/Code/Tests/VegetationMocks.h @@ -268,7 +268,7 @@ namespace UnitTest } } - void GetSystemConfig(AZ::ComponentConfig* config) const + void GetSystemConfig(AZ::ComponentConfig* config) const override { if (azrtti_typeid(m_areaSystemConfig) == azrtti_typeid(*config)) { diff --git a/cmake/LYTestWrappers.cmake b/cmake/LYTestWrappers.cmake index a305f0be38..87649c5be6 100644 --- a/cmake/LYTestWrappers.cmake +++ b/cmake/LYTestWrappers.cmake @@ -231,7 +231,7 @@ function(ly_add_test) # For test projects that are custom targets, pass a props file that sets the project as "Console" so # it leaves the console open when it finishes - set_target_properties(${unaliased_test_name} PROPERTIES VS_USER_PROPS "${LY_ROOT_FOLDER}/cmake/Platform/Common/TestProject.props") + set_target_properties(${unaliased_test_name} PROPERTIES VS_USER_PROPS "${LY_ROOT_FOLDER}/cmake/Platform/Common/MSVC/TestProject.props") # Include additional dependencies if (ly_add_test_RUNTIME_DEPENDENCIES) diff --git a/cmake/Platform/Common/Clang/Configurations_clang.cmake b/cmake/Platform/Common/Clang/Configurations_clang.cmake index 8b6c7e611b..2a311d6079 100644 --- a/cmake/Platform/Common/Clang/Configurations_clang.cmake +++ b/cmake/Platform/Common/Clang/Configurations_clang.cmake @@ -16,14 +16,23 @@ ly_append_configurations_options( -Wall -Werror - # Disabled warnings (please do not disable any others without first consulting ly-warnings) + ################### + # Disabled warnings (please do not disable any others without first consulting sig-build) + ################### + -Wno-inconsistent-missing-override # unfortunately there is no warning in MSVC to detect missing overrides, + # MSVC's static analyzer can, but that is a different run that most developers are not aware of. A pass + # was done to fix all hits. Leaving this disabled until there is a matching warning in MSVC. + -Wrange-loop-analysis -Wno-unknown-warning-option # used as a way to mark warnings that are MSVC only - -Wno-inconsistent-missing-override -Wno-parentheses -Wno-reorder -Wno-switch -Wno-undefined-var-template + + ################### + # Enabled warnings (that are disabled by default) + ################### COMPILATION_DEBUG -O0 # No optimization diff --git a/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset b/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset new file mode 100644 index 0000000000..2a248b216b --- /dev/null +++ b/cmake/Platform/Common/MSVC/CodeAnalysis.ruleset @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake index 237db5a2ce..a4d8533626 100644 --- a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake +++ b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake @@ -13,7 +13,7 @@ endif() unset(minimum_supported_toolset) include(cmake/Platform/Common/Configurations_common.cmake) -include(cmake/Platform/Common/VisualStudio_common.cmake) +include(cmake/Platform/Common/MSVC/VisualStudio_common.cmake) # Verify that it wasn't invoked with an unsupported target/host architecture. Currently only supports x64/x64 if(CMAKE_VS_PLATFORM_NAME AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "x64") @@ -35,13 +35,22 @@ ly_append_configurations_options( /WX # Warnings as errors /permissive- # Conformance with standard - # Disabling some warnings + ################### + # Disabled warnings (please do not disable any others without first consulting sig-build) + ################### /wd4201 # nonstandard extension used: nameless struct/union. This actually became part of the C++11 std, MS has an open issue: https://developercommunity.visualstudio.com/t/warning-level-4-generates-a-bogus-warning-c4201-no/103064 - # Enabling warnings that are disabled by default from /W4 + ################### + # Enabled warnings (that are disabled by default from /W4) + ################### # https://docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default?view=vs-2019 + /we4263 # 'function': member function does not override any base class virtual member function + /we4264 # 'virtual_function': no override available for virtual member function from base 'class'; function is hidden + /we4265 # 'class': class has virtual functions, but destructor is not virtual + /we4266 # 'function': no override available for virtual member function from base 'type'; function is hidden /we4296 # 'operator': expression is always false /we4426 # optimization flags changed after including header, may be due to #pragma optimize() + /we4437 # dynamic_cast from virtual base 'class1' to 'class2' could fail in some contexts #/we4619 # #pragma warning: there is no warning number 'number'. Unfortunately some versions of MSVC 16.X dont filter this warning coming from external headers and Qt has a bad warning in QtCore/qvector.h(340,12) /we4774 # 'string' : format string expected in argument number is not a string literal /we4777 # 'function' : format string 'string' requires an argument of type 'type1', but variadic argument number has type 'type2 @@ -49,7 +58,6 @@ ly_append_configurations_options( /we5032 # detected #pragma warning(push) with no corresponding #pragma warning(pop) /we5233 # explicit lambda capture 'identifier' is not used - /Zc:forScope # Force Conformance in for Loop Scope /diagnostics:caret # Compiler diagnostic options: includes the column where the issue was found and places a caret (^) under the location in the line of code where the issue was detected. /Zc:__cplusplus diff --git a/cmake/Platform/Common/Directory.Build.props b/cmake/Platform/Common/MSVC/Directory.Build.props similarity index 84% rename from cmake/Platform/Common/Directory.Build.props rename to cmake/Platform/Common/MSVC/Directory.Build.props index 76e4b28922..b8e9b716d9 100644 --- a/cmake/Platform/Common/Directory.Build.props +++ b/cmake/Platform/Common/MSVC/Directory.Build.props @@ -14,6 +14,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT @VCPKG_CONFIGURATION_MAPPING@ false + $(MSBuildThisFileDirectory)CodeAnalysis.ruleset @@ -21,8 +22,10 @@ SPDX-License-Identifier: Apache-2.0 OR MIT handles external headers in MSVC, we can remove that code and this --> TurnOffAllWarnings + + true - \ No newline at end of file + diff --git a/cmake/Platform/Common/TestProject.props b/cmake/Platform/Common/MSVC/TestProject.props similarity index 100% rename from cmake/Platform/Common/TestProject.props rename to cmake/Platform/Common/MSVC/TestProject.props diff --git a/cmake/Platform/Common/VisualStudio_common.cmake b/cmake/Platform/Common/MSVC/VisualStudio_common.cmake similarity index 88% rename from cmake/Platform/Common/VisualStudio_common.cmake rename to cmake/Platform/Common/MSVC/VisualStudio_common.cmake index 9124758b18..843b3dcd9d 100644 --- a/cmake/Platform/Common/VisualStudio_common.cmake +++ b/cmake/Platform/Common/MSVC/VisualStudio_common.cmake @@ -15,4 +15,4 @@ foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES) endforeach() configure_file("${CMAKE_CURRENT_LIST_DIR}/Directory.Build.props" "${CMAKE_BINARY_DIR}/Directory.Build.props" @ONLY) - +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CodeAnalysis.ruleset" DESTINATION "${CMAKE_BINARY_DIR}") diff --git a/cmake/Platform/Windows/platform_windows_files.cmake b/cmake/Platform/Windows/platform_windows_files.cmake index a1e26bd992..fcc47ab6eb 100644 --- a/cmake/Platform/Windows/platform_windows_files.cmake +++ b/cmake/Platform/Windows/platform_windows_files.cmake @@ -7,10 +7,12 @@ # set(FILES - ../Common/Directory.Build.props - ../Common/VisualStudio_common.cmake ../Common/Configurations_common.cmake ../Common/MSVC/Configurations_msvc.cmake + ../Common/MSVC/CodeAnalysis.ruleset + ../Common/MSVC/Directory.Build.props + ../Common/MSVC/TestProject.props + ../Common/MSVC/VisualStudio_common.cmake ../Common/Install_common.cmake ../Common/LYWrappers_default.cmake ../Common/TargetIncludeSystemDirectories_unsupported.cmake