Enables override/virtual warnings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
monroegm-disable-blank-issue-2
Esteban Papp 4 years ago committed by GitHub
commit bbe437819b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,32 +35,32 @@ public:
Q2DViewport(QWidget* parent = nullptr); Q2DViewport(QWidget* parent = nullptr);
virtual ~Q2DViewport(); virtual ~Q2DViewport();
virtual void SetType(EViewportType type); void SetType(EViewportType type) override;
virtual EViewportType GetType() const { return m_viewType; } EViewportType GetType() const override { return m_viewType; }
virtual float GetAspectRatio() const { return 1.0f; }; float GetAspectRatio() const override { return 1.0f; };
virtual void ResetContent(); void ResetContent() override;
virtual void UpdateContent(int flags); void UpdateContent(int flags) override;
public slots: public slots:
// Called every frame to update viewport. // Called every frame to update viewport.
virtual void Update(); void Update() override;
public: public:
//! Map world space position to viewport position. //! 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. //! 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. //! 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; void OnTitleMenu(QMenu* menu) override;
virtual bool HitTest(const QPoint& point, HitContext& hitInfo) override; bool HitTest(const QPoint& point, HitContext& hitInfo) override;
virtual bool IsBoundsVisible(const AABB& box) const; bool IsBoundsVisible(const AABB& box) const override;
// ovverided from CViewport. // ovverided from CViewport.
float GetScreenScaleFactor(const Vec3& worldPoint) const override; float GetScreenScaleFactor(const Vec3& worldPoint) const override;
@ -111,8 +111,8 @@ protected:
virtual void SetZoom(float fZoomFactor, const QPoint& center); virtual void SetZoom(float fZoomFactor, const QPoint& center);
// overrides from CViewport. // overrides from CViewport.
virtual void MakeConstructionPlane(int axis); void MakeConstructionPlane(int axis) override;
virtual const Matrix34& GetConstructionMatrix(RefCoordSys coordSys); const Matrix34& GetConstructionMatrix(RefCoordSys coordSys) override;
//! Calculate view transformation matrix. //! Calculate view transformation matrix.
virtual void CalculateViewTM(); virtual void CalculateViewTM();
@ -146,9 +146,9 @@ protected:
void showEvent(QShowEvent* event) override; void showEvent(QShowEvent* event) override;
void paintEvent(QPaintEvent* event) override; void paintEvent(QPaintEvent* event) override;
int OnCreate(); int OnCreate();
void OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point); void OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) override;
void OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point); void OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) override;
void OnMouseWheel(Qt::KeyboardModifiers modifiers, short zDelta, const QPoint& pt); void OnMouseWheel(Qt::KeyboardModifiers modifiers, short zDelta, const QPoint& pt) override;
void OnDestroy(); void OnDestroy();
protected: protected:

@ -353,7 +353,7 @@ public:
m_actionHandlers[id] = std::bind(method, object, id); 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 // returns false if the action was already inserted, indicating that the action should not be processed again
bool InsertActionExecuting(int id); bool InsertActionExecuting(int id);

@ -197,7 +197,7 @@ private:
virtual void OnSequenceRemoved(CTrackViewSequence* pSequence) override; virtual void OnSequenceRemoved(CTrackViewSequence* pSequence) override;
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event); virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
void AnimateActiveSequence(); void AnimateActiveSequence();

@ -40,57 +40,57 @@ public:
//! Set library name. //! Set library name.
virtual void SetName(const QString& name); virtual void SetName(const QString& name);
//! Get library name. //! Get library name.
const QString& GetName() const; const QString& GetName() const override;
//! Set new filename for this library. //! Set new filename for this library.
virtual bool SetFilename(const QString& filename, [[maybe_unused]] bool checkForUnique = true) { m_filename = filename.toLower(); return true; }; 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; bool Save() override = 0;
virtual bool Load(const QString& filename) = 0; bool Load(const QString& filename) override = 0;
virtual void Serialize(XmlNodeRef& node, bool bLoading) = 0; void Serialize(XmlNodeRef& node, bool bLoading) override = 0;
//! Mark library as modified. //! Mark library as modified.
void SetModified(bool bModified = true); void SetModified(bool bModified = true) override;
//! Check if library was modified. //! Check if library was modified.
bool IsModified() const { return m_bModified; }; bool IsModified() const override { return m_bModified; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Working with items. // Working with items.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Add a new prototype to library. //! 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. //! Get number of known prototypes.
int GetItemCount() const { return static_cast<int>(m_items.size()); } int GetItemCount() const override { return static_cast<int>(m_items.size()); }
//! Get prototype by index. //! Get prototype by index.
IDataBaseItem* GetItem(int index); IDataBaseItem* GetItem(int index) override;
//! Delete item by pointer of item. //! Delete item by pointer of item.
void RemoveItem(IDataBaseItem* item); void RemoveItem(IDataBaseItem* item) override;
//! Delete all items from library. //! Delete all items from library.
void RemoveAllItems(); void RemoveAllItems() override;
//! Find library item by name. //! Find library item by name.
//! Using linear search. //! Using linear search.
IDataBaseItem* FindItem(const QString& name); IDataBaseItem* FindItem(const QString& name) override;
//! Check if this library is local level library. //! 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. //! 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. //! Return manager for this library.
IBaseLibraryManager* GetManager(); IBaseLibraryManager* GetManager() override;
// Saves the library with the main tag defined by the parameter name // Saves the library with the main tag defined by the parameter name
bool SaveLibrary(const char* name, bool saveEmptyLibrary = false); bool SaveLibrary(const char* name, bool saveEmptyLibrary = false);
//CONFETTI BEGIN //CONFETTI BEGIN
// Used to change the library item order // 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 //CONFETTI END
signals: signals:

@ -35,112 +35,112 @@ public:
~CBaseLibraryManager(); ~CBaseLibraryManager();
//! Clear all libraries. //! Clear all libraries.
virtual void ClearAll() override; void ClearAll() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// IDocListener implementation. // IDocListener implementation.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override; void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Library items. // Library items.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Make a new item in specified library. //! Make a new item in specified library.
virtual IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) override; IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) override;
//! Delete item from library and manager. //! Delete item from library and manager.
virtual void DeleteItem(IDataBaseItem* pItem) override; void DeleteItem(IDataBaseItem* pItem) override;
//! Find Item by its GUID. //! Find Item by its GUID.
virtual IDataBaseItem* FindItem(REFGUID guid) const; IDataBaseItem* FindItem(REFGUID guid) const override;
virtual IDataBaseItem* FindItemByName(const QString& fullItemName); IDataBaseItem* FindItemByName(const QString& fullItemName) override;
virtual IDataBaseItem* LoadItemByName(const QString& fullItemName); IDataBaseItem* LoadItemByName(const QString& fullItemName) override;
virtual IDataBaseItem* FindItemByName(const char* fullItemName); virtual IDataBaseItem* FindItemByName(const char* fullItemName);
virtual IDataBaseItem* LoadItemByName(const char* fullItemName); virtual IDataBaseItem* LoadItemByName(const char* fullItemName);
virtual IDataBaseItemEnumerator* GetItemEnumerator() override; IDataBaseItemEnumerator* GetItemEnumerator() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Set item currently selected. // Set item currently selected.
virtual void SetSelectedItem(IDataBaseItem* pItem) override; void SetSelectedItem(IDataBaseItem* pItem) override;
// Get currently selected item. // Get currently selected item.
virtual IDataBaseItem* GetSelectedItem() const override; IDataBaseItem* GetSelectedItem() const override;
virtual IDataBaseItem* GetSelectedParentItem() const override; IDataBaseItem* GetSelectedParentItem() const override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Libraries. // Libraries.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Add Item library. //! Add Item library.
virtual IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override; IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override;
virtual void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override; void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override;
//! Get number of libraries. //! Get number of libraries.
virtual int GetLibraryCount() const override { return static_cast<int>(m_libs.size()); }; int GetLibraryCount() const override { return static_cast<int>(m_libs.size()); };
//! Get number of modified libraries. //! Get number of modified libraries.
virtual int GetModifiedLibraryCount() const override; int GetModifiedLibraryCount() const override;
//! Get Item library by index. //! Get Item library by index.
virtual IDataBaseLibrary* GetLibrary(int index) const override; IDataBaseLibrary* GetLibrary(int index) const override;
//! Get Level Item library. //! Get Level Item library.
virtual IDataBaseLibrary* GetLevelLibrary() const override; IDataBaseLibrary* GetLevelLibrary() const override;
//! Find Items Library by name. //! 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. //! Find Items Library's index by name.
int FindLibraryIndex(const QString& library) override; int FindLibraryIndex(const QString& library) override;
//! Load Items library. //! 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. //! Save all modified libraries.
virtual void SaveAllLibs() override; void SaveAllLibs() override;
//! Serialize property manager. //! Serialize property manager.
virtual void Serialize(XmlNodeRef& node, bool bLoading) override; void Serialize(XmlNodeRef& node, bool bLoading) override;
//! Export items to game. //! 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. //! Returns unique name base on input name.
virtual QString MakeUniqueItemName(const QString& name, const QString& libName = "") override; QString MakeUniqueItemName(const QString& name, const QString& libName = "") override;
virtual QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) override; QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) override;
//! Root node where this library will be saved. //! Root node where this library will be saved.
virtual QString GetRootNodeName() override = 0; QString GetRootNodeName() override = 0;
//! Path to libraries in this manager. //! Path to libraries in this manager.
virtual QString GetLibsPath() override = 0; QString GetLibsPath() override = 0;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Validate library items for errors. //! 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; void AddListener(IDataBaseManagerListener* pListener) override;
virtual void RemoveListener(IDataBaseManagerListener* pListener) override; void RemoveListener(IDataBaseManagerListener* pListener) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) override; void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) override;
virtual void RegisterItem(CBaseLibraryItem* pItem) override; void RegisterItem(CBaseLibraryItem* pItem) override;
virtual void UnregisterItem(CBaseLibraryItem* pItem) override; void UnregisterItem(CBaseLibraryItem* pItem) override;
// Only Used internally. // 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. // Called by items to indicated that they have been modified.
// Sends item changed event to listeners. // Sends item changed event to listeners.
virtual void OnItemChanged(IDataBaseItem* pItem) override; void OnItemChanged(IDataBaseItem* pItem) override;
virtual void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) override; void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) override;
QString MakeFilename(const QString& library); QString MakeFilename(const QString& library);
virtual bool IsUniqueFilename(const QString& library) override; bool IsUniqueFilename(const QString& library) override;
//CONFETTI BEGIN //CONFETTI BEGIN
// Used to change the library item order // 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: protected:
void SplitFullItemName(const QString& fullItemName, QString& libraryName, QString& itemName); void SplitFullItemName(const QString& fullItemName, QString& libraryName, QString& itemName);
@ -199,8 +199,8 @@ public:
m_pMap = pMap; m_pMap = pMap;
m_iterator = m_pMap->begin(); m_iterator = m_pMap->begin();
} }
virtual void Release() { delete this; }; void Release() override { delete this; };
virtual IDataBaseItem* GetFirst() IDataBaseItem* GetFirst() override
{ {
m_iterator = m_pMap->begin(); m_iterator = m_pMap->begin();
if (m_iterator == m_pMap->end()) if (m_iterator == m_pMap->end())
@ -209,7 +209,7 @@ public:
} }
return m_iterator->second; return m_iterator->second;
} }
virtual IDataBaseItem* GetNext() IDataBaseItem* GetNext() override
{ {
if (m_iterator != m_pMap->end()) if (m_iterator != m_pMap->end())
{ {

@ -81,7 +81,7 @@ protected:
HIT_SPLINE, HIT_SPLINE,
}; };
void paintEvent(QPaintEvent* e); void paintEvent(QPaintEvent* e) override;
void resizeEvent(QResizeEvent* event) override; void resizeEvent(QResizeEvent* event) override;
void mousePressEvent(QMouseEvent* event) override; void mousePressEvent(QMouseEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override; void mouseReleaseEvent(QMouseEvent* event) override;

@ -83,7 +83,7 @@ protected Q_SLOTS:
void OnIndexDoubleClicked(const QModelIndex& index); void OnIndexDoubleClicked(const QModelIndex& index);
protected: protected:
virtual void OnFileMonitorChange(const SFileChangeInfo& rChange); void OnFileMonitorChange(const SFileChangeInfo& rChange) override;
void contextMenuEvent(QContextMenuEvent* e) override; void contextMenuEvent(QContextMenuEvent* e) override;
void InitTree(); void InitTree();

@ -123,7 +123,7 @@ public:
void SetVariable(IVariable* pVariable) override; void SetVariable(IVariable* pVariable) override;
void SyncReflectedVarToIVar(IVariable* pVariable) override; void SyncReflectedVarToIVar(IVariable* pVariable) override;
void SyncIVarToReflectedVar(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(); } CReflectedVar* GetReflectedVar() override { return m_reflectedVar.data(); }
protected: protected:

@ -159,15 +159,15 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// IKeyTimeSet Implementation // IKeyTimeSet Implementation
virtual int GetKeyTimeCount() const; int GetKeyTimeCount() const override;
virtual float GetKeyTime(int index) const; float GetKeyTime(int index) const override;
virtual void MoveKeyTimes(int numChanges, int* indices, float scale, float offset, bool copyKeys); void MoveKeyTimes(int numChanges, int* indices, float scale, float offset, bool copyKeys) override;
virtual bool GetKeyTimeSelected(int index) const; bool GetKeyTimeSelected(int index) const override;
virtual void SetKeyTimeSelected(int index, bool selected); void SetKeyTimeSelected(int index, bool selected) override;
virtual int GetKeyCount(int index) const; int GetKeyCount(int index) const override;
virtual int GetKeyCountBound() const; int GetKeyCountBound() const override;
virtual void BeginEdittingKeyTimes(); void BeginEdittingKeyTimes() override;
virtual void EndEdittingKeyTimes(); void EndEdittingKeyTimes() override;
void SetEditLock(bool bLock) { m_bEditLock = bLock; } void SetEditLock(bool bLock) { m_bEditLock = bLock; }
@ -361,8 +361,8 @@ public:
SplineWidget(QWidget* parent); SplineWidget(QWidget* parent);
virtual ~SplineWidget(); virtual ~SplineWidget();
void update() { QWidget::update(); } void update() override { QWidget::update(); }
void update(const QRect& rect) { QWidget::update(rect); } void update(const QRect& rect) override { QWidget::update(rect); }
QPoint mapFromGlobal(const QPoint& point) const override { return QWidget::mapFromGlobal(point); } QPoint mapFromGlobal(const QPoint& point) const override { return QWidget::mapFromGlobal(point); }

@ -56,7 +56,7 @@ public:
void setGeometry(const QRect& r) override { QWidget::setGeometry(r); } void setGeometry(const QRect& r) override { QWidget::setGeometry(r); }
void SetTimeRange(const Range& r) { m_timeRange = r; } void SetTimeRange(const Range& r) { m_timeRange = r; }
void SetTimeMarker(float fTime); void SetTimeMarker(float fTime) override;
float GetTimeMarker() const { return m_fTimeMarker; } float GetTimeMarker() const { return m_fTimeMarker; }
void SetZoom(float fZoom); void SetZoom(float fZoom);
@ -113,7 +113,7 @@ protected:
void OnLButtonUp(const QPoint& point, Qt::KeyboardModifiers modifiers); void OnLButtonUp(const QPoint& point, Qt::KeyboardModifiers modifiers);
void OnRButtonDown(const QPoint& point, Qt::KeyboardModifiers modifiers); void OnRButtonDown(const QPoint& point, Qt::KeyboardModifiers modifiers);
void OnRButtonUp(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 // Drawing functions
float ClientToTime(int x); float ClientToTime(int x);

@ -462,6 +462,7 @@ class CCryDocManager
CCrySingleDocTemplate* m_pDefTemplate = nullptr; CCrySingleDocTemplate* m_pDefTemplate = nullptr;
public: public:
CCryDocManager(); CCryDocManager();
virtual ~CCryDocManager() = default;
CCrySingleDocTemplate* SetDefaultTemplate(CCrySingleDocTemplate* pNew); CCrySingleDocTemplate* SetDefaultTemplate(CCrySingleDocTemplate* pNew);
// Copied from MFC to get rid of the silly ugly unoverridable doc-type pick dialog // Copied from MFC to get rid of the silly ugly unoverridable doc-type pick dialog
virtual void OnFileNew(); virtual void OnFileNew();

@ -79,6 +79,8 @@ CPythonScriptsDialog::CPythonScriptsDialog(QWidget* parent)
GetGemSourcePathsVisitor(AZ::SettingsRegistryInterface& settingsRegistry) GetGemSourcePathsVisitor(AZ::SettingsRegistryInterface& settingsRegistry)
: m_settingsRegistry(settingsRegistry) : m_settingsRegistry(settingsRegistry)
{} {}
using AZ::SettingsRegistryInterface::Visitor::Visit;
void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type, void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type,
AZStd::string_view value) override AZStd::string_view value) override
{ {

@ -28,7 +28,7 @@ namespace EditorInternal
void RegisterCoreComponents() override; void RegisterCoreComponents() override;
AZ::ComponentTypeList GetRequiredSystemComponents() const; AZ::ComponentTypeList GetRequiredSystemComponents() const override;
void StartCommon(AZ::Entity* systemEntity) override; void StartCommon(AZ::Entity* systemEntity) override;

@ -36,8 +36,8 @@ namespace Export
public: public:
CMesh(); CMesh();
virtual int GetFaceCount() const { return static_cast<int>(m_faces.size()); } int GetFaceCount() const override { return static_cast<int>(m_faces.size()); }
virtual const Face* GetFaceBuffer() const { return m_faces.size() ? &m_faces[0] : 0; } const Face* GetFaceBuffer() const override { return !m_faces.empty() ? &m_faces[0] : nullptr; }
private: private:
std::vector<Face> m_faces; std::vector<Face> m_faces;
@ -54,13 +54,13 @@ namespace Export
CObject(const char* pName); CObject(const char* pName);
int GetVertexCount() const override { return static_cast<int>(m_vertices.size()); } int GetVertexCount() const override { return static_cast<int>(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<int>(m_normals.size()); } int GetNormalCount() const override { return static_cast<int>(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<int>(m_texCoords.size()); } int GetTexCoordCount() const override { return static_cast<int>(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<int>(m_meshes.size()); } int GetMeshCount() const override { return static_cast<int>(m_meshes.size()); }
Mesh* GetMesh(int index) const override { return m_meshes[index]; } Mesh* GetMesh(int index) const override { return m_meshes[index]; }
@ -68,9 +68,9 @@ namespace Export
size_t MeshHash() const override{return m_MeshHash; } size_t MeshHash() const override{return m_MeshHash; }
void SetMaterialName(const char* pName); void SetMaterialName(const char* pName);
virtual int GetEntityAnimationDataCount() const {return static_cast<int>(m_entityAnimData.size()); } int GetEntityAnimationDataCount() const override {return static_cast<int>(m_entityAnimData.size()); }
virtual const EntityAnimData* GetEntityAnimationData(int index) const {return &m_entityAnimData[index]; } const EntityAnimData* GetEntityAnimationData(int index) const override {return &m_entityAnimData[index]; }
virtual void SetEntityAnimationData(EntityAnimData entityData){ m_entityAnimData.push_back(entityData); }; void SetEntityAnimationData(EntityAnimData entityData) override{ m_entityAnimData.push_back(entityData); };
void SetLastPtr(CBaseObject* pObject){m_pLastObject = pObject; }; void SetLastPtr(CBaseObject* pObject){m_pLastObject = pObject; };
CBaseObject* GetLastObjectPtr(){return m_pLastObject; }; CBaseObject* GetLastObjectPtr(){return m_pLastObject; };
@ -92,9 +92,11 @@ namespace Export
: public IData : public IData
{ {
public: public:
virtual int GetObjectCount() const { return static_cast<int>(m_objects.size()); } virtual ~CData() = default;
virtual Object* GetObject(int index) const { return m_objects[index]; }
virtual Object* AddObject(const char* objectName); int GetObjectCount() const override { return static_cast<int>(m_objects.size()); }
Object* GetObject(int index) const override { return m_objects[index]; }
Object* AddObject(const char* objectName) override;
void Clear(); void Clear();
private: private:
@ -117,7 +119,7 @@ public:
//! Register exporter //! Register exporter
//! return true if succeed, otherwise false //! return true if succeed, otherwise false
virtual bool RegisterExporter(IExporter* pExporter); bool RegisterExporter(IExporter* pExporter) override;
//! Export specified geometry //! Export specified geometry
//! return true if succeed, otherwise false //! return true if succeed, otherwise false
@ -139,15 +141,15 @@ public:
//! Exports the stat obj to the obj file specified //! Exports the stat obj to the obj file specified
//! returns true if succeeded, otherwise false //! 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 SetBakedKeysSequenceExport(bool bBaked){m_bBakedKeysSequenceExport = bBaked; };
void SaveNodeKeysTimeToXML(); void SaveNodeKeysTimeToXML();
private: private:
void AddMesh(Export::CObject* pObj, const IIndexedMesh* pIndMesh, Matrix34A* pTm = 0); void AddMesh(Export::CObject* pObj, const IIndexedMesh* pIndMesh, Matrix34A* pTm = nullptr);
bool AddStatObj(Export::CObject* pObj, IStatObj* pStatObj, Matrix34A* pTm = 0); bool AddStatObj(Export::CObject* pObj, IStatObj* pStatObj, Matrix34A* pTm = nullptr);
bool AddMeshes(Export::CObject* pObj); bool AddMeshes(Export::CObject* pObj);
bool AddObject(CBaseObject* pBaseObj); bool AddObject(CBaseObject* pBaseObj);
void SolveHierarchy(); void SolveHierarchy();

@ -79,70 +79,70 @@ public:
void SetGameEngine(CGameEngine* ge); void SetGameEngine(CGameEngine* ge);
void DeleteThis() { delete this; }; void DeleteThis() override { delete this; };
IEditorClassFactory* GetClassFactory(); IEditorClassFactory* GetClassFactory() override;
CEditorCommandManager* GetCommandManager() { return m_pCommandManager; }; CEditorCommandManager* GetCommandManager() override { return m_pCommandManager; };
ICommandManager* GetICommandManager() { return m_pCommandManager; } ICommandManager* GetICommandManager() override { return m_pCommandManager; }
void ExecuteCommand(const char* sCommand, ...); void ExecuteCommand(const char* sCommand, ...) override;
void ExecuteCommand(const QString& command); void ExecuteCommand(const QString& command) override;
void SetDocument(CCryEditDoc* pDoc); void SetDocument(CCryEditDoc* pDoc) override;
CCryEditDoc* GetDocument() const; CCryEditDoc* GetDocument() const override;
bool IsLevelLoaded() const override; bool IsLevelLoaded() const override;
void SetModifiedFlag(bool modified = true); void SetModifiedFlag(bool modified = true) override;
void SetModifiedModule(EModifiedModule eModifiedModule, bool boSet = true); void SetModifiedModule(EModifiedModule eModifiedModule, bool boSet = true) override;
bool IsLevelExported() const; bool IsLevelExported() const override;
bool SetLevelExported(bool boExported = true); bool SetLevelExported(bool boExported = true) override;
void InitFinished(); void InitFinished();
bool IsModified(); bool IsModified() override;
bool IsInitialized() const{ return m_bInitialized; } bool IsInitialized() const override{ return m_bInitialized; }
bool SaveDocument(); bool SaveDocument() override;
ISystem* GetSystem(); ISystem* GetSystem() override;
void WriteToConsole(const char* string) { CLogFile::WriteLine(string); }; void WriteToConsole(const char* string) override { CLogFile::WriteLine(string); };
void WriteToConsole(const QString& string) { CLogFile::WriteLine(string); }; void WriteToConsole(const QString& string) override { CLogFile::WriteLine(string); };
// Change the message in the status bar // Change the message in the status bar
void SetStatusText(const QString& pszString); void SetStatusText(const QString& pszString) override;
virtual IMainStatusBar* GetMainStatusBar() override; IMainStatusBar* GetMainStatusBar() override;
bool ShowConsole([[maybe_unused]] bool show) bool ShowConsole([[maybe_unused]] bool show) override
{ {
//if (AfxGetMainWnd())return ((CMainFrame *) (AfxGetMainWnd()))->ShowConsole(show); //if (AfxGetMainWnd())return ((CMainFrame *) (AfxGetMainWnd()))->ShowConsole(show);
return false; return false;
} }
void SetConsoleVar(const char* var, float value); void SetConsoleVar(const char* var, float value) override;
float GetConsoleVar(const char* var); float GetConsoleVar(const char* var) override;
//! Query main window of the editor //! Query main window of the editor
QMainWindow* GetEditorMainWindow() const override QMainWindow* GetEditorMainWindow() const override
{ {
return MainWindow::instance(); return MainWindow::instance();
}; };
QString GetPrimaryCDFolder(); QString GetPrimaryCDFolder() override;
QString GetLevelName() override; QString GetLevelName() override;
QString GetLevelFolder(); QString GetLevelFolder() override;
QString GetLevelDataFolder(); QString GetLevelDataFolder() override;
QString GetSearchPath(EEditorPathName path); QString GetSearchPath(EEditorPathName path) override;
QString GetResolvedUserFolder(); QString GetResolvedUserFolder() override;
bool ExecuteConsoleApp(const QString& CommandLine, QString& OutputText, bool bNoTimeOut = false, bool bShowWindow = false); bool ExecuteConsoleApp(const QString& CommandLine, QString& OutputText, bool bNoTimeOut = false, bool bShowWindow = false) override;
virtual bool IsInGameMode() override; bool IsInGameMode() override;
virtual void SetInGameMode(bool inGame) override; void SetInGameMode(bool inGame) override;
virtual bool IsInSimulationMode() override; bool IsInSimulationMode() override;
virtual bool IsInTestMode() override; bool IsInTestMode() override;
virtual bool IsInPreviewMode() override; bool IsInPreviewMode() override;
virtual bool IsInConsolewMode() override; bool IsInConsolewMode() override;
virtual bool IsInLevelLoadTestMode() override; bool IsInLevelLoadTestMode() override;
virtual bool IsInMatEditMode() override { return m_bMatEditMode; } bool IsInMatEditMode() override { return m_bMatEditMode; }
//! Enables/Disable updates of editor. //! 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). //! Enable/Disable accelerator table, (Enabled by default).
void EnableAcceleratos(bool bEnable); void EnableAcceleratos(bool bEnable) override;
CGameEngine* GetGameEngine() { return m_pGameEngine; }; CGameEngine* GetGameEngine() override { return m_pGameEngine; };
CDisplaySettings* GetDisplaySettings() { return m_pDisplaySettings; }; CDisplaySettings* GetDisplaySettings() override { return m_pDisplaySettings; };
const SGizmoParameters& GetGlobalGizmoParameters(); 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); 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); void DeleteObject(CBaseObject* obj) override;
CBaseObject* CloneObject(CBaseObject* obj); CBaseObject* CloneObject(CBaseObject* obj) override;
IObjectManager* GetObjectManager(); IObjectManager* GetObjectManager() override;
// This will return a null pointer if CrySystem is not loaded before // This will return a null pointer if CrySystem is not loaded before
// Global Sandbox Settings are loaded from the registry before CrySystem // Global Sandbox Settings are loaded from the registry before CrySystem
// At that stage GetSettingsManager will return null and xml node in // 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 // After m_IEditor is created and CrySystem loaded, it is possible
// to feed memory node with all necessary data needed for export // to feed memory node with all necessary data needed for export
// (gSettings.Load() and CXTPDockingPaneManager/CXTPDockingPaneLayout Sandbox layout management) // (gSettings.Load() and CXTPDockingPaneManager/CXTPDockingPaneLayout Sandbox layout management)
CSettingsManager* GetSettingsManager(); CSettingsManager* GetSettingsManager() override;
CSelectionGroup* GetSelection(); CSelectionGroup* GetSelection() override;
int ClearSelection(); int ClearSelection() override;
CBaseObject* GetSelectedObject(); CBaseObject* GetSelectedObject() override;
void SelectObject(CBaseObject* obj); void SelectObject(CBaseObject* obj) override;
void LockSelection(bool bLock); void LockSelection(bool bLock) override;
bool IsSelectionLocked(); bool IsSelectionLocked() override;
IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType); IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) override;
CMusicManager* GetMusicManager() { return m_pMusicManager; }; CMusicManager* GetMusicManager() override { return m_pMusicManager; };
IEditorFileMonitor* GetFileMonitor() override; IEditorFileMonitor* GetFileMonitor() override;
void RegisterEventLoopHook(IEventLoopHook* pHook) override; void RegisterEventLoopHook(IEventLoopHook* pHook) override;
void UnregisterEventLoopHook(IEventLoopHook* pHook) override; void UnregisterEventLoopHook(IEventLoopHook* pHook) override;
IIconManager* GetIconManager(); IIconManager* GetIconManager() override;
float GetTerrainElevation(float x, float y); float GetTerrainElevation(float x, float y) override;
Editor::EditorQtApplication* GetEditorQtApplication() { return m_QtApplication; } Editor::EditorQtApplication* GetEditorQtApplication() override { return m_QtApplication; }
const QColor& GetColorByName(const QString& name) override; const QColor& GetColorByName(const QString& name) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
IMovieSystem* GetMovieSystem() IMovieSystem* GetMovieSystem() override
{ {
if (m_pSystem) if (m_pSystem)
{ {
@ -179,37 +179,37 @@ public:
return nullptr; return nullptr;
}; };
CPluginManager* GetPluginManager() { return m_pPluginManager; } CPluginManager* GetPluginManager() override { return m_pPluginManager; }
CViewManager* GetViewManager(); CViewManager* GetViewManager() override;
CViewport* GetActiveView(); CViewport* GetActiveView() override;
void SetActiveView(CViewport* viewport); void SetActiveView(CViewport* viewport) override;
CLevelIndependentFileMan* GetLevelIndependentFileMan() { return m_pLevelIndependentFileMan; } CLevelIndependentFileMan* GetLevelIndependentFileMan() override { return m_pLevelIndependentFileMan; }
void UpdateViews(int flags, const AABB* updateRegion); void UpdateViews(int flags, const AABB* updateRegion) override;
void ResetViews(); void ResetViews() override;
void ReloadTrackView(); void ReloadTrackView() override;
Vec3 GetMarkerPosition() { return m_marker; }; Vec3 GetMarkerPosition() override { return m_marker; };
void SetMarkerPosition(const Vec3& pos) { m_marker = pos; }; void SetMarkerPosition(const Vec3& pos) override { m_marker = pos; };
void SetSelectedRegion(const AABB& box); void SetSelectedRegion(const AABB& box) override;
void GetSelectedRegion(AABB& box); void GetSelectedRegion(AABB& box) override;
bool AddToolbarItem(uint8 iId, IUIEvent* pIHandler); bool AddToolbarItem(uint8 iId, IUIEvent* pIHandler);
void SetDataModified(); void SetDataModified() override;
void SetOperationMode(EOperationMode mode); void SetOperationMode(EOperationMode mode) override;
EOperationMode GetOperationMode(); EOperationMode GetOperationMode() override;
ITransformManipulator* ShowTransformManipulator(bool bShow); ITransformManipulator* ShowTransformManipulator(bool bShow) override;
ITransformManipulator* GetTransformManipulator(); ITransformManipulator* GetTransformManipulator() override;
void SetAxisConstraints(AxisConstrains axis); void SetAxisConstraints(AxisConstrains axis) override;
AxisConstrains GetAxisConstrains(); AxisConstrains GetAxisConstrains() override;
void SetAxisVectorLock(bool bAxisVectorLock) { m_bAxisVectorLock = bAxisVectorLock; } void SetAxisVectorLock(bool bAxisVectorLock) override { m_bAxisVectorLock = bAxisVectorLock; }
bool IsAxisVectorLocked() { return m_bAxisVectorLock; } bool IsAxisVectorLocked() override { return m_bAxisVectorLock; }
void SetTerrainAxisIgnoreObjects(bool bIgnore); void SetTerrainAxisIgnoreObjects(bool bIgnore) override;
bool IsTerrainAxisIgnoreObjects(); bool IsTerrainAxisIgnoreObjects() override;
void SetReferenceCoordSys(RefCoordSys refCoords); void SetReferenceCoordSys(RefCoordSys refCoords) override;
RefCoordSys GetReferenceCoordSys(); RefCoordSys GetReferenceCoordSys() override;
XmlNodeRef FindTemplate(const QString& templateName); XmlNodeRef FindTemplate(const QString& templateName) override;
void AddTemplate(const QString& templateName, XmlNodeRef& tmpl); void AddTemplate(const QString& templateName, XmlNodeRef& tmpl) override;
const QtViewPane* OpenView(QString sViewClassName, bool reuseOpened = true) override; const QtViewPane* OpenView(QString sViewClassName, bool reuseOpened = true) override;
@ -220,87 +220,87 @@ public:
*/ */
QWidget* FindView(QString viewClassName) override; QWidget* FindView(QString viewClassName) override;
bool CloseView(const char* sViewClassName); bool CloseView(const char* sViewClassName) override;
bool SetViewFocus(const char* sViewClassName); bool SetViewFocus(const char* sViewClassName) override;
virtual QWidget* OpenWinWidget(WinWidgetId openId) override; QWidget* OpenWinWidget(WinWidgetId openId) override;
virtual WinWidget::WinWidgetManager* GetWinWidgetManager() const override; WinWidget::WinWidgetManager* GetWinWidgetManager() const override;
// close ALL panels related to classId, used when unloading plugins. // 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; bool SelectColor(QColor &color, QWidget *parent = 0) override;
void Update(); void Update();
SFileVersion GetFileVersion() { return m_fileVersion; }; SFileVersion GetFileVersion() override { return m_fileVersion; };
SFileVersion GetProductVersion() { return m_productVersion; }; SFileVersion GetProductVersion() override { return m_productVersion; };
//! Get shader enumerator. //! Get shader enumerator.
CUndoManager* GetUndoManager() { return m_pUndoManager; }; CUndoManager* GetUndoManager() override { return m_pUndoManager; };
void BeginUndo(); void BeginUndo() override;
void RestoreUndo(bool undo); void RestoreUndo(bool undo) override;
void AcceptUndo(const QString& name); void AcceptUndo(const QString& name) override;
void CancelUndo(); void CancelUndo() override;
void SuperBeginUndo(); void SuperBeginUndo() override;
void SuperAcceptUndo(const QString& name); void SuperAcceptUndo(const QString& name) override;
void SuperCancelUndo(); void SuperCancelUndo() override;
void SuspendUndo(); void SuspendUndo() override;
void ResumeUndo(); void ResumeUndo() override;
void Undo(); void Undo() override;
void Redo(); void Redo() override;
bool IsUndoRecording(); bool IsUndoRecording() override;
bool IsUndoSuspended(); bool IsUndoSuspended() override;
void RecordUndo(IUndoObject* obj); void RecordUndo(IUndoObject* obj) override;
bool FlushUndo(bool isShowMessage = false); bool FlushUndo(bool isShowMessage = false) override;
bool ClearLastUndoSteps(int steps); bool ClearLastUndoSteps(int steps) override;
bool ClearRedoStack(); bool ClearRedoStack() override;
//! Retrieve current animation context. //! Retrieve current animation context.
CAnimationContext* GetAnimation(); CAnimationContext* GetAnimation() override;
CTrackViewSequenceManager* GetSequenceManager() override; CTrackViewSequenceManager* GetSequenceManager() override;
ITrackViewSequenceManager* GetSequenceManagerInterface() override; ITrackViewSequenceManager* GetSequenceManagerInterface() override;
CToolBoxManager* GetToolBoxManager() { return m_pToolBoxManager; }; CToolBoxManager* GetToolBoxManager() override { return m_pToolBoxManager; };
IErrorReport* GetErrorReport() { return m_pErrorReport; } IErrorReport* GetErrorReport() override { return m_pErrorReport; }
IErrorReport* GetLastLoadedLevelErrorReport() { return m_pLasLoadedLevelErrorReport; } IErrorReport* GetLastLoadedLevelErrorReport() override { return m_pLasLoadedLevelErrorReport; }
void StartLevelErrorReportRecording() override; void StartLevelErrorReportRecording() override;
void CommitLevelErrorReport() {SAFE_DELETE(m_pLasLoadedLevelErrorReport); m_pLasLoadedLevelErrorReport = new CErrorReport(*m_pErrorReport); } void CommitLevelErrorReport() override {SAFE_DELETE(m_pLasLoadedLevelErrorReport); m_pLasLoadedLevelErrorReport = new CErrorReport(*m_pErrorReport); }
virtual IFileUtil* GetFileUtil() override { return m_pFileUtil; } IFileUtil* GetFileUtil() override { return m_pFileUtil; }
void Notify(EEditorNotifyEvent event); void Notify(EEditorNotifyEvent event) override;
void NotifyExcept(EEditorNotifyEvent event, IEditorNotifyListener* listener); void NotifyExcept(EEditorNotifyEvent event, IEditorNotifyListener* listener) override;
void RegisterNotifyListener(IEditorNotifyListener* listener); void RegisterNotifyListener(IEditorNotifyListener* listener) override;
void UnregisterNotifyListener(IEditorNotifyListener* listener); void UnregisterNotifyListener(IEditorNotifyListener* listener) override;
//! Register document notifications listener. //! Register document notifications listener.
void RegisterDocListener(IDocListener* listener); void RegisterDocListener(IDocListener* listener) override;
//! Unregister document notifications listener. //! Unregister document notifications listener.
void UnregisterDocListener(IDocListener* listener); void UnregisterDocListener(IDocListener* listener) override;
//! Retrieve interface to the source control. //! Retrieve interface to the source control.
ISourceControl* GetSourceControl(); ISourceControl* GetSourceControl() override;
//! Retrieve true if source control is provided and enabled in settings //! Retrieve true if source control is provided and enabled in settings
bool IsSourceControlAvailable() override; bool IsSourceControlAvailable() override;
//! Only returns true if source control is both available AND currently connected and functioning //! Only returns true if source control is both available AND currently connected and functioning
bool IsSourceControlConnected() override; bool IsSourceControlConnected() override;
//! Setup Material Editor mode //! Setup Material Editor mode
void SetMatEditMode(bool bIsMatEditMode); void SetMatEditMode(bool bIsMatEditMode);
CUIEnumsDatabase* GetUIEnumsDatabase() { return m_pUIEnumsDatabase; }; CUIEnumsDatabase* GetUIEnumsDatabase() override { return m_pUIEnumsDatabase; };
void AddUIEnums(); void AddUIEnums() override;
void ReduceMemory(); void ReduceMemory() override;
// Get Export manager // Get Export manager
IExportManager* GetExportManager(); IExportManager* GetExportManager() override;
// Set current configuration spec of the editor. // Set current configuration spec of the editor.
void SetEditorConfigSpec(ESystemConfigSpec spec, ESystemConfigPlatform platform); void SetEditorConfigSpec(ESystemConfigSpec spec, ESystemConfigPlatform platform) override;
ESystemConfigSpec GetEditorConfigSpec() const; ESystemConfigSpec GetEditorConfigSpec() const override;
ESystemConfigPlatform GetEditorConfigPlatform() const; ESystemConfigPlatform GetEditorConfigPlatform() const override;
void ReloadTemplates(); void ReloadTemplates() override;
void AddErrorMessage(const QString& text, const QString& caption); 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); void OnObjectContextMenuOpened(QMenu* pMenu, const CBaseObject* pObject);
virtual void RegisterObjectContextMenuExtension(TContextMenuExtensionFunc func) override; void RegisterObjectContextMenuExtension(TContextMenuExtensionFunc func) override;
virtual SSystemGlobalEnvironment* GetEnv() override; SSystemGlobalEnvironment* GetEnv() override;
virtual IBaseLibraryManager* GetMaterialManagerLibrary() override; // Vladimir@Conffx IBaseLibraryManager* GetMaterialManagerLibrary() override; // Vladimir@Conffx
virtual IEditorMaterialManager* GetIEditorMaterialManager() override; // Vladimir@Conffx IEditorMaterialManager* GetIEditorMaterialManager() override; // Vladimir@Conffx
virtual IImageUtil* GetImageUtil() override; // Vladimir@conffx IImageUtil* GetImageUtil() override; // Vladimir@conffx
virtual SEditorSettings* GetEditorSettings() override; SEditorSettings* GetEditorSettings() override;
virtual IEditorPanelUtils* GetEditorPanelUtils() override; IEditorPanelUtils* GetEditorPanelUtils() override;
virtual ILogFile* GetLogFile() override { return m_pLogFile; } ILogFile* GetLogFile() override { return m_pLogFile; }
void UnloadPlugins() override; void UnloadPlugins() override;
void LoadPlugins() override; void LoadPlugins() override;

@ -23,7 +23,7 @@ class LevelTreeModelFilter
Q_OBJECT Q_OBJECT
public: public:
explicit LevelTreeModelFilter(QObject* parent = nullptr); 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&); void setFilterText(const QString&);
QVariant data(const QModelIndex& index, int role) const override; QVariant data(const QModelIndex& index, int role) const override;
private: private:

@ -25,6 +25,8 @@ public:
} }
public: public:
virtual ~CEditorMock() = default;
MOCK_METHOD0(DeleteThis, void()); MOCK_METHOD0(DeleteThis, void());
MOCK_METHOD0(GetSystem, ISystem*()); MOCK_METHOD0(GetSystem, ISystem*());
MOCK_METHOD0(GetClassFactory, IEditorClassFactory* ()); MOCK_METHOD0(GetClassFactory, IEditorClassFactory* ());

@ -35,21 +35,21 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Ovverides from CGizmo // Ovverides from CGizmo
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual void GetWorldBounds(AABB& bbox); void GetWorldBounds(AABB& bbox) override;
virtual void Display(DisplayContext& dc); void Display(DisplayContext& dc) override;
virtual bool HitTest(HitContext& hc); bool HitTest(HitContext& hc) override;
virtual const Matrix34& GetMatrix() const; const Matrix34& GetMatrix() const override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// ITransformManipulator implementation. // ITransformManipulator implementation.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual Matrix34 GetTransformation(RefCoordSys coordSys, IDisplayViewport* view = nullptr) const; Matrix34 GetTransformation(RefCoordSys coordSys, IDisplayViewport* view = nullptr) const override;
virtual void SetTransformation(RefCoordSys coordSys, const Matrix34& tm); void SetTransformation(RefCoordSys coordSys, const Matrix34& tm) override;
virtual bool HitTestManipulator(HitContext& hc); bool HitTestManipulator(HitContext& hc) override;
virtual bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int nFlags); bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int nFlags) override;
virtual void SetAlwaysUseLocal(bool on) void SetAlwaysUseLocal(bool on) override
{ m_bAlwaysUseLocal = on; } { m_bAlwaysUseLocal = on; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

@ -712,7 +712,7 @@ protected:
// May be overridden in derived classes to handle helpers scaling. // May be overridden in derived classes to handle helpers scaling.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual void SetHelperScale([[maybe_unused]] float scale) {}; 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; } void SetNameInternal(const QString& name) { m_name = name; }
@ -743,9 +743,6 @@ private:
//! Only called once after creation by ObjectManager. //! Only called once after creation by ObjectManager.
void SetClassDesc(CObjectClassDesc* classDesc); void SetClassDesc(CObjectClassDesc* classDesc);
// From CObject, (not implemented)
virtual void Serialize([[maybe_unused]] CArchive& ar) {};
EScaleWarningLevel GetScaleWarningLevel() const; EScaleWarningLevel GetScaleWarningLevel() const;
ERotationWarningLevel GetRotationWarningLevel() const; ERotationWarningLevel GetRotationWarningLevel() const;

@ -82,14 +82,14 @@ public:
// Overrides from CBaseObject. // Overrides from CBaseObject.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Return type name of Entity. //! 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); bool Init(IEditor* ie, CBaseObject* prev, const QString& file) override;
virtual void InitVariables(); void InitVariables() override;
virtual void Done(); void Done() override;
void DrawExtraLightInfo (DisplayContext& disp); void DrawExtraLightInfo (DisplayContext& disp);
@ -102,29 +102,30 @@ public:
void SetEntityPropertyFloat(const char* name, float value); void SetEntityPropertyFloat(const char* name, float value);
void SetEntityPropertyString(const char* name, const QString& value); void SetEntityPropertyString(const char* name, const QString& value);
virtual int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags); int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags) override;
virtual void OnContextMenu(QMenu* menu); void OnContextMenu(QMenu* menu) override;
void SetName(const QString& name); void SetName(const QString& name) override;
void SetSelected(bool bSelect); void SetSelected(bool bSelect) override;
virtual void GetLocalBounds(AABB& box); void GetLocalBounds(AABB& box) override;
virtual bool HitTest(HitContext& hc); bool HitTest(HitContext& hc) override;
virtual bool HitHelperTest(HitContext& hc); bool HitHelperTest(HitContext& hc) override;
virtual bool HitTestRect(HitContext& hc); bool HitTestRect(HitContext& hc) override;
void UpdateVisibility(bool bVisible); void UpdateVisibility(bool bVisible) override;
bool ConvertFromObject(CBaseObject* object); bool ConvertFromObject(CBaseObject* object) override;
virtual void Serialize(CObjectArchive& ar); using CBaseObject::Serialize;
virtual void PostLoad(CObjectArchive& ar); 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 // Set attach flags and target
enum EAttachmentType enum EAttachmentType
@ -139,15 +140,15 @@ public:
EAttachmentType GetAttachType() const { return m_attachmentType; } EAttachmentType GetAttachType() const { return m_attachmentType; }
QString GetAttachTarget() const { return m_attachmentTarget; } QString GetAttachTarget() const { return m_attachmentTarget; }
virtual void SetHelperScale(float scale); void SetHelperScale(float scale) override;
virtual float GetHelperScale(); float GetHelperScale() override;
virtual void GatherUsedResources(CUsedResources& resources); void GatherUsedResources(CUsedResources& resources) override;
virtual bool IsSimilarObject(CBaseObject* pObject); 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 // END CBaseObject
@ -232,7 +233,7 @@ protected:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Must be called after cloning the object on clone of object. //! Must be called after cloning the object on clone of object.
//! This will make sure object references are cloned correctly. //! 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. //! Draw default object items.
void DrawProjectorPyramid(DisplayContext& dc, float dist); void DrawProjectorPyramid(DisplayContext& dc, float dist);
@ -264,7 +265,7 @@ public:
} }
protected: protected:
void DeleteThis() { delete this; }; void DeleteThis() override { delete this; };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Radius callbacks. // Radius callbacks.

@ -23,14 +23,14 @@ class CGizmoManager
: public IGizmoManager : public IGizmoManager
{ {
public: public:
void AddGizmo(CGizmo* gizmo); void AddGizmo(CGizmo* gizmo) override;
void RemoveGizmo(CGizmo* gizmo); void RemoveGizmo(CGizmo* gizmo) override;
int GetGizmoCount() const override; int GetGizmoCount() const override;
CGizmo* GetGizmoByIndex(int nIndex) const override; CGizmo* GetGizmoByIndex(int nIndex) const override;
void Display(DisplayContext& dc); void Display(DisplayContext& dc) override;
bool HitTest(HitContext& hc); bool HitTest(HitContext& hc) override;
void DeleteAllTransformManipulators(); void DeleteAllTransformManipulators();

@ -30,10 +30,10 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Ovverides from CGizmo // Ovverides from CGizmo
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual void SetName(const char* sName); void SetName(const char* sName) override;
virtual void GetWorldBounds(AABB& bbox); void GetWorldBounds(AABB& bbox) override;
virtual void Display(DisplayContext& dc); void Display(DisplayContext& dc) override;
virtual bool HitTest(HitContext& hc); bool HitTest(HitContext& hc) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void SetObjects(CBaseObject* pObject1, CBaseObject* pObject2, const QString& boneName = ""); void SetObjects(CBaseObject* pObject1, CBaseObject* pObject2, const QString& boneName = "");

@ -52,6 +52,7 @@ public:
GUID guid; GUID guid;
public: public:
virtual ~CXMLObjectClassDesc() = default;
REFGUID ClassID() override REFGUID ClassID() override
{ {
return guid; return guid;

@ -103,142 +103,142 @@ public:
void RegisterObjectClasses(); void RegisterObjectClasses();
CBaseObject* NewObject(CObjectClassDesc* cls, CBaseObject* prev = 0, const QString& file = "", const char* newObjectName = 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); CBaseObject* NewObject(const QString& typeName, CBaseObject* prev = 0, const QString& file = "", const char* newEntityName = nullptr) override;
void DeleteObject(CBaseObject* obj); void DeleteObject(CBaseObject* obj) override;
void DeleteSelection(CSelectionGroup* pSelection); void DeleteSelection(CSelectionGroup* pSelection) override;
void DeleteAllObjects(); void DeleteAllObjects() override;
CBaseObject* CloneObject(CBaseObject* obj); CBaseObject* CloneObject(CBaseObject* obj) override;
void BeginEditParams(CBaseObject* obj, int flags); void BeginEditParams(CBaseObject* obj, int flags) override;
void EndEditParams(int flags = 0); void EndEditParams(int flags = 0) override;
// Hides all transform manipulators. // Hides all transform manipulators.
void HideTransformManipulators(); void HideTransformManipulators();
//! Get number of objects manager by ObjectManager (not contain sub objects of groups). //! 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). //! 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. //! @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. //! 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. //! @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. //! Update objects.
void Update(); void Update();
//! Display objects on display context. //! Display objects on display context.
void Display(DisplayContext& dc); void Display(DisplayContext& dc) override;
//! Called when selecting without selection helpers - this is needed since //! Called when selecting without selection helpers - this is needed since
//! the visible object cache is normally not updated when not displaying helpers. //! 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. //! Check intersection with objects.
//! Find intersection with nearest to ray origin object hit by ray. //! Find intersection with nearest to ray origin object hit by ray.
//! If distance tollerance is specified certain relaxation applied on collision test. //! If distance tollerance is specified certain relaxation applied on collision test.
//! @return true if hit any object, and fills hitInfo structure. //! @return true if hit any object, and fills hitInfo structure.
bool HitTest(HitContext& hitInfo); bool HitTest(HitContext& hitInfo) override;
//! Check intersection with an object. //! Check intersection with an object.
//! @return true if hit, and fills hitInfo structure. //! @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. //! Send event to all objects.
//! Will cause OnEvent handler to be called on 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. //! Send event to all objects within given bounding box.
//! Will cause OnEvent handler to be called on objects within 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. //! Find object by ID.
CBaseObject* FindObject(REFGUID guid) const; CBaseObject* FindObject(REFGUID guid) const override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Find object by name. //! Find object by name.
CBaseObject* FindObject(const QString& sName) const; CBaseObject* FindObject(const QString& sName) const override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Find objects of given type. //! Find objects of given type.
void FindObjectsOfType(const QMetaObject* pClass, std::vector<CBaseObject*>& result) override; void FindObjectsOfType(const QMetaObject* pClass, std::vector<CBaseObject*>& result) override;
void FindObjectsOfType(ObjectType type, std::vector<CBaseObject*>& result) override; void FindObjectsOfType(ObjectType type, std::vector<CBaseObject*>& result) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Find objects which intersect with a given AABB. //! Find objects which intersect with a given AABB.
virtual void FindObjectsInAABB(const AABB& aabb, std::vector<CBaseObject*>& result) const; void FindObjectsInAABB(const AABB& aabb, std::vector<CBaseObject*>& result) const override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Operations on objects. // Operations on objects.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Makes object visible or invisible. //! 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 //! Shows the last hidden object based on hidden ID
void ShowLastHiddenObject(); void ShowLastHiddenObject() override;
//! Freeze object, making it unselectable. //! Freeze object, making it unselectable.
void FreezeObject(CBaseObject* obj, bool freeze); void FreezeObject(CBaseObject* obj, bool freeze) override;
//! Unhide all hidden objects. //! Unhide all hidden objects.
void UnhideAll(); void UnhideAll() override;
//! Unfreeze all frozen objects. //! Unfreeze all frozen objects.
void UnfreezeAll(); void UnfreezeAll() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Object Selection. // Object Selection.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
bool SelectObject(CBaseObject* obj, bool bUseMask = true); bool SelectObject(CBaseObject* obj, bool bUseMask = true) override;
void UnselectObject(CBaseObject* obj); void UnselectObject(CBaseObject* obj) override;
//! Select objects within specified distance from given position. //! Select objects within specified distance from given position.
//! Return number of selected objects. //! 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<CEntityObject*>& s); void SelectEntities(std::set<CEntityObject*>& 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. //! Selects/Unselects all objects within 2d rectangle in given viewport.
void SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect); void SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect) override;
void FindObjectsInRect(CViewport* view, const QRect& rect, std::vector<GUID>& guids); void FindObjectsInRect(CViewport* view, const QRect& rect, std::vector<GUID>& guids) override;
//! Clear default selection set. //! Clear default selection set.
//! @Return number of objects removed from selection. //! @Return number of objects removed from selection.
int ClearSelection(); int ClearSelection() override;
//! Deselect all current selected objects and selects object that were unselected. //! Deselect all current selected objects and selects object that were unselected.
//! @Return number of selected objects. //! @Return number of selected objects.
int InvertSelection(); int InvertSelection() override;
//! Get current selection. //! Get current selection.
CSelectionGroup* GetSelection() const { return m_currSelection; }; CSelectionGroup* GetSelection() const override { return m_currSelection; };
//! Get named selection. //! Get named selection.
CSelectionGroup* GetSelection(const QString& name) const; CSelectionGroup* GetSelection(const QString& name) const override;
// Get selection group names // Get selection group names
void GetNameSelectionStrings(QStringList& names); void GetNameSelectionStrings(QStringList& names) override;
//! Change name of current selection group. //! Change name of current selection group.
//! And store it in list. //! And store it in list.
void NameSelection(const QString& name); void NameSelection(const QString& name) override;
//! Set one of name selections as current selection. //! Set one of name selections as current selection.
void SetSelection(const QString& name); void SetSelection(const QString& name) override;
void RemoveSelection(const QString& name); void RemoveSelection(const QString& name) override;
bool IsObjectDeletionAllowed(CBaseObject* pObject); bool IsObjectDeletionAllowed(CBaseObject* pObject);
//! Delete all objects in selection group. //! Delete all objects in selection group.
void DeleteSelection(); void DeleteSelection() override;
uint32 ForceID() const{return m_ForceID; } uint32 ForceID() const override{return m_ForceID; }
void ForceID(uint32 FID){m_ForceID = FID; } void ForceID(uint32 FID) override{m_ForceID = FID; }
//! Generates uniq name base on type name of object. //! 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. //! 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. //! Decrease name number and remove if it was last in object manager, needed for generating uniq names.
void UpdateRegisterObjectName(const QString& name); void UpdateRegisterObjectName(const QString& name);
//! Enable/Disable generating of unique object names (Enabled by default). //! Enable/Disable generating of unique object names (Enabled by default).
//! Return previous value. //! Return previous value.
bool EnableUniqObjectNames(bool bEnable); bool EnableUniqObjectNames(bool bEnable) override;
//! Register XML template of runtime class. //! Register XML template of runtime class.
void RegisterClassTemplate(const XmlNodeRef& templ); void RegisterClassTemplate(const XmlNodeRef& templ);
@ -249,25 +249,25 @@ public:
void RegisterCVars(); void RegisterCVars();
//! Find object class by name. //! Find object class by name.
CObjectClassDesc* FindClass(const QString& className); CObjectClassDesc* FindClass(const QString& className) override;
void GetClassCategories(QStringList& categories); void GetClassCategories(QStringList& categories) override;
void GetClassCategoryToolClassNamePairs(std::vector< std::pair<QString, QString> >& categoryToolClassNamePairs) override; void GetClassCategoryToolClassNamePairs(std::vector< std::pair<QString, QString> >& categoryToolClassNamePairs) override;
void GetClassTypes(const QString& category, QStringList& types); void GetClassTypes(const QString& category, QStringList& types) override;
//! Export objects to xml. //! Export objects to xml.
//! When onlyShared is true ony objects with shared flags exported, overwise only not shared object exported. //! 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 Export(const QString& levelPath, XmlNodeRef& rootNode, bool onlyShared) override;
void ExportEntities(XmlNodeRef& rootNode); void ExportEntities(XmlNodeRef& rootNode) override;
//! Serialize Objects in manager to specified XML Node. //! Serialize Objects in manager to specified XML Node.
//! @param flags Can be one of SerializeFlags. //! @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. //! Load objects from object archive.
//! @param bSelect if set newly loaded object will be selected. //! @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. //! Delete from Object manager all objects without SHARED flag.
void DeleteNotSharedObjects(); void DeleteNotSharedObjects();
@ -276,57 +276,57 @@ public:
bool AddObject(CBaseObject* obj); bool AddObject(CBaseObject* obj);
void RemoveObject(CBaseObject* obj); void RemoveObject(CBaseObject* obj);
void ChangeObjectId(REFGUID oldId, REFGUID newId); void ChangeObjectId(REFGUID oldId, REFGUID newId) override;
bool IsDuplicateObjectName(const QString& newName) const bool IsDuplicateObjectName(const QString& newName) const override
{ {
return FindObject(newName) ? true : false; return FindObject(newName) ? true : false;
} }
void ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const; void ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const override;
void ChangeObjectName(CBaseObject* obj, const QString& newName); void ChangeObjectName(CBaseObject* obj, const QString& newName) override;
//! Convert object of one type to object of another type. //! Convert object of one type to object of another type.
//! Original object is deleted. //! Original object is deleted.
bool ConvertToType(CBaseObject* pObject, const QString& typeName); bool ConvertToType(CBaseObject* pObject, const QString& typeName) override;
//! Set new selection callback. //! Set new selection callback.
//! @return previous selection callback. //! @return previous selection callback.
IObjectSelectCallback* SetSelectCallback(IObjectSelectCallback* callback); IObjectSelectCallback* SetSelectCallback(IObjectSelectCallback* callback) override;
// Enables/Disables creating of game objects. // 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. //! 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. //! Get access to gizmo manager.
IGizmoManager* GetGizmoManager(); IGizmoManager* GetGizmoManager() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Invalidate visibily settings of objects. //! Invalidate visibily settings of objects.
void InvalidateVisibleList(); void InvalidateVisibleList() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// ObjectManager notification Callbacks. // ObjectManager notification Callbacks.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void AddObjectEventListener(EventListener* listener); void AddObjectEventListener(EventListener* listener) override;
void RemoveObjectEventListener(EventListener* listener); void RemoveObjectEventListener(EventListener* listener) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Used to indicate starting and ending of objects loading. // Used to indicate starting and ending of objects loading.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void StartObjectsLoading(int numObjects); void StartObjectsLoading(int numObjects) override;
void EndObjectsLoading(); void EndObjectsLoading() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Gathers all resources used by all objects. // 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 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); 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 SetSkipUpdate(bool bSkipUpdate) override { m_bSkipObjectUpdate = bSkipUpdate; }
void SetExportingLevel(bool bExporting) override { m_bLevelExporting = bExporting; } void SetExportingLevel(bool bExporting) override { m_bLevelExporting = bExporting; }
@ -341,7 +341,7 @@ private:
@param objectNode Xml node to serialize object info from. @param objectNode Xml node to serialize object info from.
@param pUndoObject Pointer to deleted object for undo. @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. //! Update visibility of all objects.
void UpdateVisibilityList(); void UpdateVisibilityList();

@ -86,7 +86,7 @@ public:
// Always returns false as Component entity highlighting (accenting) is taken care of elsewhere // Always returns false as Component entity highlighting (accenting) is taken care of elsewhere
bool IsHighlighted() { return false; } bool IsHighlighted() { return false; }
// Component entity highlighting (accenting) is taken care of elsewhere // 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, // Don't auto-clone children. Cloning happens in groups with reference fixups,
// and individually selected objercts should be cloned as individuals. // and individually selected objercts should be cloned as individuals.
@ -164,7 +164,7 @@ protected:
float GetRadius(); float GetRadius();
void DeleteThis() { delete this; }; void DeleteThis() override { delete this; };
bool IsNonLayerAncestorSelected() const; bool IsNonLayerAncestorSelected() const;
bool IsLayer() const; bool IsLayer() const;

@ -182,7 +182,7 @@ private:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// AzToolsFramework::EditorContextMenu::Bus::Handler overrides // AzToolsFramework::EditorContextMenu::Bus::Handler overrides
void PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags) override; void PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags) override;
int GetMenuPosition() const; int GetMenuPosition() const override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

@ -102,7 +102,7 @@ protected:
void AddFavorites(const AZStd::vector<const AZ::SerializeContext::ClassData*>& classDataContainer) override; void AddFavorites(const AZStd::vector<const AZ::SerializeContext::ClassData*>& classDataContainer) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void rowsInserted(const QModelIndex& parent, int start, int end); void rowsInserted(const QModelIndex& parent, int start, int end) override;
// Context menu handlers // Context menu handlers
void ShowContextMenu(const QPoint&); void ShowContextMenu(const QPoint&);

@ -255,7 +255,7 @@ protected:
bool DropMimeDataAssets(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); 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; bool CanDropMimeDataAssets(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const;
QMap<int, QVariant> itemData(const QModelIndex &index) const; QMap<int, QVariant> itemData(const QModelIndex &index) const override;
QVariant dataForAll(const QModelIndex& index, int role) const; QVariant dataForAll(const QModelIndex& index, int role) const;
QVariant dataForName(const QModelIndex& index, int role) const; QVariant dataForName(const QModelIndex& index, int role) const;
QVariant dataForVisibility(const QModelIndex& index, int role) const; QVariant dataForVisibility(const QModelIndex& index, int role) const;

@ -28,16 +28,16 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// IUnkown implementation. // IUnkown implementation.
virtual HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj); HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj) override;
virtual ULONG STDMETHODCALLTYPE AddRef(); ULONG STDMETHODCALLTYPE AddRef() override;
virtual ULONG STDMETHODCALLTYPE Release(); ULONG STDMETHODCALLTYPE Release() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual REFGUID ClassID(); REFGUID ClassID() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual int GetPagesCount(); int GetPagesCount() override;
virtual IPreferencesPage* CreateEditorPreferencesPage(int index) override; IPreferencesPage* CreateEditorPreferencesPage(int index) override;
}; };
#endif // CRYINCLUDE_EDITOR_PREFERENCESSTDPAGES_H #endif // CRYINCLUDE_EDITOR_PREFERENCESSTDPAGES_H

@ -123,18 +123,18 @@ public:
{ {
} }
virtual ESystemClassID SystemClassID() { return m_classId; }; ESystemClassID SystemClassID() override { return m_classId; };
static const GUID& GetClassID() static const GUID& GetClassID()
{ {
return TWidget::GetClassID(); return TWidget::GetClassID();
} }
virtual const GUID& ClassID() const GUID& ClassID() override
{ {
return GetClassID(); return GetClassID();
} }
virtual QString ClassName() { return m_name; }; QString ClassName() override { return m_name; };
virtual QString Category() { return m_category; }; QString Category() override { return m_category; };
QObject* CreateQObject() const override { return new TWidget(); }; QObject* CreateQObject() const override { return new TWidget(); };
QString GetPaneTitle() override { return m_name; }; QString GetPaneTitle() override { return m_name; };

@ -30,7 +30,7 @@ protected:
void OnInitDialog() override; void OnInitDialog() override;
// Derived Dialogs should override this // Derived Dialogs should override this
virtual void GetItems(std::vector<SItem>& outItems); void GetItems(std::vector<SItem>& outItems) override;
}; };
#endif // CRYINCLUDE_EDITOR_SELECTSEQUENCEDIALOG_H #endif // CRYINCLUDE_EDITOR_SELECTSEQUENCEDIALOG_H

@ -39,7 +39,7 @@ public:
protected: protected:
void dragMoveEvent(QDragMoveEvent* ev) override; void dragMoveEvent(QDragMoveEvent* ev) override;
void dragEnterEvent(QDragEnterEvent* ev) override; void dragEnterEvent(QDragEnterEvent* ev) override;
void dropEvent(QDropEvent* ev); void dropEvent(QDropEvent* ev) override;
private: private:
void OnTabChanged(int index); void OnTabChanged(int index);

@ -35,11 +35,11 @@ public:
/** Get type of this viewport. /** Get type of this viewport.
*/ */
virtual EViewportType GetType() const { return ET_ViewportMap; } EViewportType GetType() const override { return ET_ViewportMap; }
virtual void SetType(EViewportType type); void SetType(EViewportType type) override;
virtual void ResetContent(); void ResetContent() override;
virtual void UpdateContent(int flags); void UpdateContent(int flags) override;
//! Map viewport position to world space position. //! 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; 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: protected:
// Draw everything. // Draw everything.
virtual void Draw(DisplayContext& dc); void Draw(DisplayContext& dc) override;
private: private:
bool m_bContentsUpdated; bool m_bContentsUpdated;

@ -187,7 +187,7 @@ protected:
int m_customFPS; int m_customFPS;
void InitializeContext(); void InitializeContext();
virtual void OnMovieEvent(IMovieListener::EMovieEvent event, IAnimSequence* pSequence); void OnMovieEvent(IMovieListener::EMovieEvent event, IAnimSequence* pSequence) override;
void CaptureItemStart(); void CaptureItemStart();

@ -50,8 +50,8 @@ public:
void SetPlayCallback(const std::function<void()>& callback); void SetPlayCallback(const std::function<void()>& callback);
// IAnimationContextListener // IAnimationContextListener
virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence); void OnSequenceChanged(CTrackViewSequence* pNewSequence) override;
virtual void OnTimeChanged(float newTime); void OnTimeChanged(float newTime) override;
protected: protected:
void showEvent(QShowEvent* event) override; void showEvent(QShowEvent* event) override;
@ -65,7 +65,7 @@ private:
void OnSplineTimeMarkerChange(); void OnSplineTimeMarkerChange();
// IEditorNotifyListener // IEditorNotifyListener
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override; void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
//ITrackViewSequenceListener //ITrackViewSequenceListener
void OnKeysChanged(CTrackViewSequence* pSequence) override; void OnKeysChanged(CTrackViewSequence* pSequence) override;
@ -109,8 +109,8 @@ public:
float GetFPS() const { return m_widget->GetFPS(); } float GetFPS() const { return m_widget->GetFPS(); }
void SetTickDisplayMode(ETVTickMode mode) { m_widget->SetTickDisplayMode(mode); } void SetTickDisplayMode(ETVTickMode mode) { m_widget->SetTickDisplayMode(mode); }
virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence) { m_widget->OnSequenceChanged(pNewSequence); } void OnSequenceChanged(CTrackViewSequence* pNewSequence) override { m_widget->OnSequenceChanged(pNewSequence); }
virtual void OnTimeChanged(float newTime) { m_widget->OnTimeChanged(newTime); } void OnTimeChanged(float newTime) override { m_widget->OnTimeChanged(newTime); }
// ITrackViewSequenceListener delegation to m_widget // ITrackViewSequenceListener delegation to m_widget
void OnKeysChanged(CTrackViewSequence* pSequence) override { m_widget->OnKeysChanged(pSequence); } void OnKeysChanged(CTrackViewSequence* pSequence) override { m_widget->OnKeysChanged(pSequence); }

@ -69,10 +69,10 @@ public:
void UpdateSequenceLockStatus(); void UpdateSequenceLockStatus();
// IAnimationContextListener // IAnimationContextListener
virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence) override; void OnSequenceChanged(CTrackViewSequence* pNewSequence) override;
// ITrackViewSequenceListener // ITrackViewSequenceListener
virtual void OnSequenceSettingsChanged(CTrackViewSequence* pSequence) override; void OnSequenceSettingsChanged(CTrackViewSequence* pSequence) override;
void UpdateDopeSheetTime(CTrackViewSequence* pSequence); void UpdateDopeSheetTime(CTrackViewSequence* pSequence);
@ -197,8 +197,8 @@ private:
bool processRawInput(MSG* pMsg); bool processRawInput(MSG* pMsg);
#endif #endif
virtual void OnNodeSelectionChanged(CTrackViewSequence* pSequence) override; void OnNodeSelectionChanged(CTrackViewSequence* pSequence) override;
virtual void OnNodeRenamed(CTrackViewNode* pNode, const char* pOldName) override; void OnNodeRenamed(CTrackViewNode* pNode, const char* pOldName) override;
void OnSequenceAdded(CTrackViewSequence* pSequence) override; void OnSequenceAdded(CTrackViewSequence* pSequence) override;
void OnSequenceRemoved(CTrackViewSequence* pSequence) override; void OnSequenceRemoved(CTrackViewSequence* pSequence) override;
@ -209,8 +209,8 @@ private:
void AddDialogListeners(); void AddDialogListeners();
void RemoveDialogListeners(); void RemoveDialogListeners();
virtual void BeginUndoTransaction(); void BeginUndoTransaction() override;
virtual void EndUndoTransaction(); void EndUndoTransaction() override;
void SaveCurrentSequenceToFBX(); void SaveCurrentSequenceToFBX();
void SaveSequenceTimingToXML(); void SaveSequenceTimingToXML();

@ -117,13 +117,14 @@ class CTrackViewKeyBundle
public: public:
CTrackViewKeyBundle() CTrackViewKeyBundle()
: m_bAllOfSameType(true) {} : 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<unsigned int>(m_keys.size()); } unsigned int GetKeyCount() const override { return static_cast<unsigned int>(m_keys.size()); }
virtual CTrackViewKeyHandle GetKey(unsigned int index) override { return m_keys[index]; } 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(); CTrackViewKeyHandle GetSingleSelectedKey();

@ -100,16 +100,16 @@ public:
void Load() override; void Load() override;
// ITrackViewNode // 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(); } AZStd::string GetName() const override { return m_pAnimSequence->GetName(); }
virtual bool SetName(const char* pName) override; bool SetName(const char* pName) override;
virtual bool CanBeRenamed() const override { return true; } bool CanBeRenamed() const override { return true; }
// Binding/Unbinding // Binding/Unbinding
virtual void BindToEditorObjects() override; void BindToEditorObjects() override;
virtual void UnBindFromEditorObjects() override; void UnBindFromEditorObjects() override;
virtual bool IsBoundToEditorObjects() const override; bool IsBoundToEditorObjects() const override;
// Time range // Time range
void SetTimeRange(Range timeRange); void SetTimeRange(Range timeRange);
@ -136,10 +136,10 @@ public:
uint32 GetCryMovieId() const { return m_pAnimSequence->GetId(); } uint32 GetCryMovieId() const { return m_pAnimSequence->GetId(); }
// Rendering // Rendering
virtual void Render(const SAnimContext& animContext) override; void Render(const SAnimContext& animContext) override;
// Playback control // Playback control
virtual void Animate(const SAnimContext& animContext) override; void Animate(const SAnimContext& animContext) override;
void Resume() { m_pAnimSequence->Resume(); } void Resume() { m_pAnimSequence->Resume(); }
void Pause() { m_pAnimSequence->Pause(); } void Pause() { m_pAnimSequence->Pause(); }
void StillUpdate() { m_pAnimSequence->StillUpdate(); } void StillUpdate() { m_pAnimSequence->StillUpdate(); }
@ -162,7 +162,7 @@ public:
void TimeChanged(float newTime) { m_pAnimSequence->TimeChanged(newTime); } void TimeChanged(float newTime) { m_pAnimSequence->TimeChanged(newTime); }
// Check if it's a group node // Check if it's a group node
virtual bool IsGroupNode() const override { return true; } bool IsGroupNode() const override { return true; }
// Track Events (TODO: Undo?) // Track Events (TODO: Undo?)
int GetTrackEventsCount() const { return m_pAnimSequence->GetTrackEventsCount(); } int GetTrackEventsCount() const { return m_pAnimSequence->GetTrackEventsCount(); }
@ -195,7 +195,7 @@ public:
bool IsActiveSequence() const; bool IsActiveSequence() const;
// The root sequence node is always an active director // 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) // Copy keys to clipboard (in XML form)
void CopyKeysToClipboard(const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks); void CopyKeysToClipboard(const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks);
@ -306,15 +306,15 @@ private:
// Called when an animation updates needs to be schedules // Called when an animation updates needs to be schedules
void ForceAnimation(); 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<CTrackViewTrack*> GetMatchingTracks(CTrackViewAnimNode* pAnimNode, XmlNodeRef trackNode); std::deque<CTrackViewTrack*> GetMatchingTracks(CTrackViewAnimNode* pAnimNode, XmlNodeRef trackNode);
void GetMatchedPasteLocationsRec(std::vector<TMatchedTrackLocation>& locations, CTrackViewNode* pCurrentNode, XmlNodeRef clipboardNode); void GetMatchedPasteLocationsRec(std::vector<TMatchedTrackLocation>& locations, CTrackViewNode* pCurrentNode, XmlNodeRef clipboardNode);
virtual void BeginUndoTransaction(); void BeginUndoTransaction() override;
virtual void EndUndoTransaction(); void EndUndoTransaction() override;
virtual void BeginRestoreTransaction(); void BeginRestoreTransaction() override;
virtual void EndRestoreTransaction(); void EndRestoreTransaction() override;
// For record mode on AZ::Entities - connect (or disconnect) to buses for notification of property changes // For record mode on AZ::Entities - connect (or disconnect) to buses for notification of property changes
void ConnectToBusesForRecording(const AZ::EntityId& entityIdForBus, bool enableConnection); void ConnectToBusesForRecording(const AZ::EntityId& entityIdForBus, bool enableConnection);

@ -27,7 +27,7 @@ public:
CTrackViewSequenceManager(); CTrackViewSequenceManager();
~CTrackViewSequenceManager(); ~CTrackViewSequenceManager();
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event); void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
unsigned int GetCount() const { return static_cast<int>(m_sequences.size()); } unsigned int GetCount() const { return static_cast<int>(m_sequences.size()); }
@ -65,7 +65,7 @@ private:
void OnSequenceAdded(CTrackViewSequence* pSequence); void OnSequenceAdded(CTrackViewSequence* pSequence);
void OnSequenceRemoved(CTrackViewSequence* pSequence); void OnSequenceRemoved(CTrackViewSequence* pSequence);
virtual void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event); void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event) override;
// AZ::EntitySystemBus // AZ::EntitySystemBus
void OnEntityNameChanged(const AZ::EntityId& entityId, const AZStd::string& name) override; void OnEntityNameChanged(const AZ::EntityId& entityId, const AZStd::string& name) override;

@ -28,7 +28,7 @@ public:
CTrackViewSplineCtrl(QWidget* parent); CTrackViewSplineCtrl(QWidget* parent);
virtual ~CTrackViewSplineCtrl(); virtual ~CTrackViewSplineCtrl();
virtual void ClearSelection(); void ClearSelection() override;
void AddSpline(ISplineInterpolator* pSpline, CTrackViewTrack* pTrack, const QColor& color); void AddSpline(ISplineInterpolator* pSpline, CTrackViewTrack* pTrack, const QColor& color);
void AddSpline(ISplineInterpolator * pSpline, CTrackViewTrack * pTrack, QColor anColorArray[4]); void AddSpline(ISplineInterpolator * pSpline, CTrackViewTrack * pTrack, QColor anColorArray[4]);
@ -53,12 +53,12 @@ protected:
void wheelEvent(QWheelEvent* event) override; void wheelEvent(QWheelEvent* event) override;
private: private:
virtual void SelectKey(ISplineInterpolator* pSpline, int nKey, int nDimension, bool bSelect) override; void SelectKey(ISplineInterpolator* pSpline, int nKey, int nDimension, bool bSelect) override;
virtual void SelectRectangle(const QRect& rc, bool bSelect) override; void SelectRectangle(const QRect& rc, bool bSelect) override;
std::vector<CTrackViewTrack*> m_tracks; std::vector<CTrackViewTrack*> 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; int nSpline, int nKey, int nDimension) override;
void ComputeIncomingTangentAndEaseTo(float& ds, float& easeTo, QPoint inTangentPt, void ComputeIncomingTangentAndEaseTo(float& ds, float& easeTo, QPoint inTangentPt,
int nSpline, int nKey, int nDimension); int nSpline, int nKey, int nDimension);
@ -67,7 +67,7 @@ private:
void AdjustTCB(float d_tension, float d_continuity, float d_bias); void AdjustTCB(float d_tension, float d_continuity, float d_bias);
void MoveSelectedTangentHandleTo(const QPoint& point); void MoveSelectedTangentHandleTo(const QPoint& point);
virtual ISplineCtrlUndo* CreateSplineCtrlUndoObject(std::vector<ISplineInterpolator*>& splineContainer); ISplineCtrlUndo* CreateSplineCtrlUndoObject(std::vector<ISplineInterpolator*>& splineContainer) override;
bool m_bKeysFreeze; bool m_bKeysFreeze;
bool m_bTangentsFreeze; bool m_bTangentsFreeze;

@ -44,7 +44,7 @@ public slots:
QVector<int> Groups() const; QVector<int> Groups() const;
protected: protected:
void paintEvent(QPaintEvent* event) void paintEvent(QPaintEvent* event) override
{ {
if (model() && model()->rowCount() > 0) if (model() && model()->rowCount() > 0)
{ {

@ -379,11 +379,11 @@ AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING
public: public:
virtual ~CVariableBase() {} virtual ~CVariableBase() {}
void SetName(const QString& name) { m_name = name; }; void SetName(const QString& name) override { m_name = name; };
//! Get name of parameter. //! 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()) if (!m_humanName.isEmpty())
{ {
@ -391,82 +391,82 @@ public:
} }
return m_name; 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 char* desc) override { m_description = desc; };
void SetDescription(const QString& desc) { m_description = desc; }; void SetDescription(const QString& desc) override { m_description = desc; };
//! Get name of parameter. //! Get name of parameter.
QString GetDescription() const { return m_description; }; QString GetDescription() const override { return m_description; };
EType GetType() const { return IVariable::UNKNOWN; }; EType GetType() const override { return IVariable::UNKNOWN; };
int GetSize() const { return sizeof(*this); }; int GetSize() const override { return sizeof(*this); };
unsigned char GetDataType() const { return m_dataType; }; unsigned char GetDataType() const override { return m_dataType; };
void SetDataType(unsigned char dataType) { m_dataType = dataType; } void SetDataType(unsigned char dataType) override { m_dataType = dataType; }
void SetFlags(int flags) { m_flags = static_cast<uint16>(flags); } void SetFlags(int flags) override { m_flags = static_cast<uint16>(flags); }
int GetFlags() const { return m_flags; } int GetFlags() const override { return m_flags; }
void SetFlagRecursive(EFlags flag) { m_flags |= flag; } void SetFlagRecursive(EFlags flag) override { m_flags |= flag; }
void SetUserData(const QVariant &data){ m_userData = data; }; void SetUserData(const QVariant &data) override { m_userData = data; };
QVariant GetUserData() const { return m_userData; } QVariant GetUserData() const override { return m_userData; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Set methods. // Set methods.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void Set([[maybe_unused]] int value) { assert(0); } void Set([[maybe_unused]] int value) override { assert(0); }
void Set([[maybe_unused]] bool value) { assert(0); } void Set([[maybe_unused]] bool value) override { assert(0); }
void Set([[maybe_unused]] float value) { assert(0); } void Set([[maybe_unused]] float value) override { assert(0); }
void Set([[maybe_unused]] double value) { assert(0); } void Set([[maybe_unused]] double value) override { assert(0); }
void Set([[maybe_unused]] const Vec2& value) { assert(0); } void Set([[maybe_unused]] const Vec2& value) override { assert(0); }
void Set([[maybe_unused]] const Vec3& value) { assert(0); } void Set([[maybe_unused]] const Vec3& value) override { assert(0); }
void Set([[maybe_unused]] const Vec4& value) { assert(0); } void Set([[maybe_unused]] const Vec4& value) override { assert(0); }
void Set([[maybe_unused]] const Ang3& value) { assert(0); } void Set([[maybe_unused]] const Ang3& value) override { assert(0); }
void Set([[maybe_unused]] const Quat& value) { assert(0); } void Set([[maybe_unused]] const Quat& value) override { assert(0); }
void Set([[maybe_unused]] const QString& value) { assert(0); } void Set([[maybe_unused]] const QString& value) override { assert(0); }
void Set([[maybe_unused]] const char* value) { assert(0); } void Set([[maybe_unused]] const char* value) override { assert(0); }
void SetDisplayValue(const QString& value) { Set(value); } void SetDisplayValue(const QString& value) override { Set(value); }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Get methods. // Get methods.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void Get([[maybe_unused]] int& value) const { assert(0); } void Get([[maybe_unused]] int& value) const override { assert(0); }
void Get([[maybe_unused]] bool& value) const { assert(0); } void Get([[maybe_unused]] bool& value) const override { assert(0); }
void Get([[maybe_unused]] float& value) const { assert(0); } void Get([[maybe_unused]] float& value) const override { assert(0); }
void Get([[maybe_unused]] double& value) const { assert(0); } void Get([[maybe_unused]] double& value) const override { assert(0); }
void Get([[maybe_unused]] Vec2& value) const { assert(0); } void Get([[maybe_unused]] Vec2& value) const override { assert(0); }
void Get([[maybe_unused]] Vec3& value) const { assert(0); } void Get([[maybe_unused]] Vec3& value) const override { assert(0); }
void Get([[maybe_unused]] Vec4& value) const { assert(0); } void Get([[maybe_unused]] Vec4& value) const override { assert(0); }
void Get([[maybe_unused]] Ang3& value) const { assert(0); } void Get([[maybe_unused]] Ang3& value) const override { assert(0); }
void Get([[maybe_unused]] Quat& value) const { assert(0); } void Get([[maybe_unused]] Quat& value) const override { assert(0); }
void Get([[maybe_unused]] QString& value) const { assert(0); } void Get([[maybe_unused]] QString& value) const override { assert(0); }
QString GetDisplayValue() const { QString val; Get(val); return val; } QString GetDisplayValue() const override { QString val; Get(val); return val; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// IVariableContainer functions // 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; } bool DeleteVariable([[maybe_unused]] IVariable* var, [[maybe_unused]] bool recursive = false) override { return false; }
virtual void DeleteAllVariables() {} void DeleteAllVariables() override {}
virtual int GetNumVariables() const { return 0; } int GetNumVariables() const override { return 0; }
virtual IVariable* GetVariable([[maybe_unused]] int index) const { return nullptr; } 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); m_wiredVars.push_back(var);
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void Unwire(IVariable* var) void Unwire(IVariable* var) override
{ {
if (!var) if (!var)
{ {
@ -480,7 +480,7 @@ public:
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void AddOnSetCallback(OnSetCallback* func) void AddOnSetCallback(OnSetCallback* func) override
{ {
if (!stl::find(m_onSetFuncs, func)) 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); stl::find_and_erase(m_onSetFuncs, func);
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void ClearOnSetCallbacks() void ClearOnSetCallbacks() override
{ {
m_onSetFuncs.clear(); m_onSetFuncs.clear();
} }
@ -509,7 +509,7 @@ public:
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void RemoveOnSetEnumCallback(OnSetCallback* func) void RemoveOnSetEnumCallback(OnSetCallback* func) override
{ {
stl::find_and_erase(m_onSetEnumFuncs, func); 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. // If have wired variables or OnSet callback, process them.
// Send value to wired variable. // 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) if (load)
{ {
@ -567,8 +568,8 @@ public:
} }
} }
virtual void EnableUpdateCallbacks(bool boEnable){m_boUpdateCallbacksEnabled = boEnable; }; void EnableUpdateCallbacks(bool boEnable) override{m_boUpdateCallbacksEnabled = boEnable; };
virtual void SetForceModified(bool bForceModified) { m_bForceModified = bForceModified; } void SetForceModified(bool bForceModified) override { m_bForceModified = bForceModified; }
protected: protected:
// Constructor. // Constructor.
CVariableBase() CVariableBase()
@ -641,13 +642,13 @@ public:
CVariableArray(){} CVariableArray(){}
//! Get name of parameter. //! Get name of parameter.
virtual EType GetType() const { return IVariable::ARRAY; }; EType GetType() const override { return IVariable::ARRAY; };
virtual int GetSize() const { return sizeof(CVariableArray); }; int GetSize() const override { return sizeof(CVariableArray); };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Set methods. // Set methods.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual void Set(const QString& value) void Set(const QString& value) override
{ {
if (m_strValue != value) if (m_strValue != value)
{ {
@ -655,7 +656,7 @@ public:
OnSetValue(false); OnSetValue(false);
} }
} }
void OnSetValue(bool bRecursive) void OnSetValue(bool bRecursive) override
{ {
CVariableBase::OnSetValue(bRecursive); CVariableBase::OnSetValue(bRecursive);
if (bRecursive) if (bRecursive)
@ -666,7 +667,7 @@ public:
} }
} }
} }
void SetFlagRecursive(EFlags flag) void SetFlagRecursive(EFlags flag) override
{ {
CVariableBase::SetFlagRecursive(flag); CVariableBase::SetFlagRecursive(flag);
for (Variables::iterator it = m_vars.begin(); it != m_vars.end(); ++it) for (Variables::iterator it = m_vars.begin(); it != m_vars.end(); ++it)
@ -677,9 +678,9 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Get methods. // 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) for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it)
{ {
@ -691,7 +692,7 @@ public:
return true; return true;
} }
virtual void ResetToDefault() void ResetToDefault() override
{ {
for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it) 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); CVariableArray* var = new CVariableArray(*this);
@ -713,7 +714,7 @@ public:
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void CopyValue(IVariable* fromVar) void CopyValue(IVariable* fromVar) override
{ {
assert(fromVar); assert(fromVar);
if (fromVar->GetType() != IVariable::ARRAY) if (fromVar->GetType() != IVariable::ARRAY)
@ -733,20 +734,20 @@ public:
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual int GetNumVariables() const { return static_cast<int>(m_vars.size()); } int GetNumVariables() const override { return static_cast<int>(m_vars.size()); }
virtual IVariable* GetVariable(int index) const IVariable* GetVariable(int index) const override
{ {
assert(index >= 0 && index < (int)m_vars.size()); assert(index >= 0 && index < (int)m_vars.size());
return m_vars[index]; return m_vars[index];
} }
virtual void AddVariable(IVariable* var) void AddVariable(IVariable* var) override
{ {
m_vars.push_back(var); 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); bool found = stl::find_and_erase(m_vars, var);
if (!found && recursive) if (!found && recursive)
@ -762,12 +763,12 @@ public:
return found; return found;
} }
virtual void DeleteAllVariables() void DeleteAllVariables() override
{ {
m_vars.clear(); 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) for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it)
{ {
@ -793,14 +794,15 @@ public:
return false; 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(); return m_vars.empty();
} }
void Serialize(XmlNodeRef node, bool load) using IVariable::Serialize;
void Serialize(XmlNodeRef node, bool load) override
{ {
if (load) if (load)
{ {
@ -1074,11 +1076,11 @@ class CVariableVoid
{ {
public: public:
CVariableVoid(){}; CVariableVoid(){};
virtual EType GetType() const { return IVariable::UNKNOWN; }; EType GetType() const override { return IVariable::UNKNOWN; };
virtual IVariable* Clone([[maybe_unused]] bool bRecursive) const { return new CVariableVoid(*this); } IVariable* Clone([[maybe_unused]] bool bRecursive) const override { return new CVariableVoid(*this); }
virtual void CopyValue([[maybe_unused]] IVariable* fromVar) {}; void CopyValue([[maybe_unused]] IVariable* fromVar) override {};
virtual bool HasDefaultValue() const { return true; } bool HasDefaultValue() const override { return true; }
virtual void ResetToDefault() {}; void ResetToDefault() override {};
protected: protected:
CVariableVoid(const CVariableVoid& v) CVariableVoid(const CVariableVoid& v)
: CVariableBase(v) {}; : CVariableBase(v) {};
@ -1112,44 +1114,44 @@ public:
} }
//! Get name of parameter. //! Get name of parameter.
virtual EType GetType() const { return (EType)var_type::type_traits<T>::type(); }; EType GetType() const override { return (EType)var_type::type_traits<T>::type(); };
virtual int GetSize() const { return sizeof(T); }; int GetSize() const override { return sizeof(T); };
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Set methods. // Set methods.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual void Set(int value) { SetValue(value); } void Set(int value) override { SetValue(value); }
virtual void Set(bool value) { SetValue(value); } void Set(bool value) override { SetValue(value); }
virtual void Set(float value) { SetValue(value); } void Set(float value) override { SetValue(value); }
virtual void Set(double value) { SetValue(value); } void Set(double value) override { SetValue(value); }
virtual void Set(const Vec2& value) { SetValue(value); } void Set(const Vec2& value) override { SetValue(value); }
virtual void Set(const Vec3& value) { SetValue(value); } void Set(const Vec3& value) override { SetValue(value); }
virtual void Set(const Vec4& value) { SetValue(value); } void Set(const Vec4& value) override { SetValue(value); }
virtual void Set(const Ang3& value) { SetValue(value); } void Set(const Ang3& value) override { SetValue(value); }
virtual void Set(const Quat& value) { SetValue(value); } void Set(const Quat& value) override { SetValue(value); }
virtual void Set(const QString& value) { SetValue(value); } void Set(const QString& value) override { SetValue(value); }
virtual void Set(const char* value) { SetValue(QString(value)); } void Set(const char* value) override { SetValue(QString(value)); }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Get methods. // Get methods.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual void Get(int& value) const { GetValue(value); } void Get(int& value) const override { GetValue(value); }
virtual void Get(bool& value) const { GetValue(value); } void Get(bool& value) const override { GetValue(value); }
virtual void Get(float& value) const { GetValue(value); } void Get(float& value) const override { GetValue(value); }
virtual void Get(double& value) const { GetValue(value); } void Get(double& value) const override { GetValue(value); }
virtual void Get(Vec2& value) const { GetValue(value); } void Get(Vec2& value) const override { GetValue(value); }
virtual void Get(Vec3& value) const { GetValue(value); } void Get(Vec3& value) const override { GetValue(value); }
virtual void Get(Vec4& value) const { GetValue(value); } void Get(Vec4& value) const override { GetValue(value); }
virtual void Get(Quat& value) const { GetValue(value); } void Get(Quat& value) const override { GetValue(value); }
virtual void Get(QString& value) const { GetValue(value); } void Get(QString& value) const override { GetValue(value); }
virtual bool HasDefaultValue() const bool HasDefaultValue() const override
{ {
T defval; T defval;
var_type::init(defval); var_type::init(defval);
return m_valueDef == defval; return m_valueDef == defval;
} }
virtual void ResetToDefault() void ResetToDefault() override
{ {
T defval; T defval;
var_type::init(defval); var_type::init(defval);
@ -1159,7 +1161,7 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Limits. // 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_valueMin = fMin;
m_valueMax = fMax; m_valueMax = fMax;
@ -1171,7 +1173,7 @@ public:
m_customLimits = true; 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<T>::supports_range()) if (!m_customLimits && var_type::type_traits<T>::supports_range())
{ {
@ -1199,7 +1201,7 @@ public:
m_customLimits = false; m_customLimits = false;
} }
virtual bool HasCustomLimits() bool HasCustomLimits() override
{ {
return m_customLimits; return m_customLimits;
} }
@ -1217,14 +1219,14 @@ public:
void operator=(const T& value) { SetValue(value); } 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); Self* var = new Self(*this);
return var; return var;
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void CopyValue(IVariable* fromVar) void CopyValue(IVariable* fromVar) override
{ {
assert(fromVar); assert(fromVar);
T val; T val;
@ -1668,7 +1670,7 @@ struct CSmartVariableBase
return *pV; return *pV;
} // Cast to CVariableBase& } // Cast to CVariableBase&
VarType& operator*() const { return *pVar; } VarType& operator*() const { return *pVar; }
VarType* operator->(void) const { return pVar; } VarType* operator->() const { return pVar; }
VarType* GetVar() const { return pVar; }; VarType* GetVar() const { return pVar; };
@ -1730,7 +1732,7 @@ struct CSmartVariableArray
} }
VarType& operator*() const { return *pVar; } VarType& operator*() const { return *pVar; }
VarType* operator->(void) const { return pVar; } VarType* operator->() const { return pVar; }
VarType* GetVar() const { return pVar; }; VarType* GetVar() const { return pVar; };
@ -1752,35 +1754,35 @@ public:
// Dtor. // Dtor.
virtual ~CVarBlock() {} virtual ~CVarBlock() {}
//! Add variable to block. //! Add variable to block.
virtual void AddVariable(IVariable* var); void AddVariable(IVariable* var) override;
//! Remove variable from block //! 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); void AddVariable(IVariable* pVar, const char* varName, unsigned char dataType = IVariable::DT_SIMPLE);
// This used from smart variable pointer. // This used from smart variable pointer.
void AddVariable(CVariableBase& var, const char* varName, unsigned char dataType = IVariable::DT_SIMPLE); void AddVariable(CVariableBase& var, const char* varName, unsigned char dataType = IVariable::DT_SIMPLE);
//! Returns number of variables in block. //! Returns number of variables in block.
virtual int GetNumVariables() const { return static_cast<int>(m_vars.size()); } int GetNumVariables() const override { return static_cast<int>(m_vars.size()); }
//! Get pointer to stored variable by index. //! 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()); assert(index >= 0 && index < m_vars.size());
return m_vars[index]; return m_vars[index];
} }
// Clear all vars from VarBlock. // 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). //! 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. // 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. //! 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. //! Clone var block.

@ -172,7 +172,7 @@ public:
//! Get current view matrix. //! Get current view matrix.
//! This is a matrix that transforms from world space to view space. //! 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"); AZ_Error("CryLegacy", false, "QtViewport::GetViewTM not implemented");
static const Matrix34 m; static const Matrix34 m;
@ -182,7 +182,7 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Get current screen matrix. //! Get current screen matrix.
//! Screen matrix transform from World space to Screen space. //! Screen matrix transform from World space to Screen space.
virtual const Matrix34& GetScreenTM() const const Matrix34& GetScreenTM() const override
{ {
return m_screenTM; return m_screenTM;
} }
@ -190,9 +190,9 @@ public:
virtual Vec3 MapViewToCP(const QPoint& point) = 0; virtual Vec3 MapViewToCP(const QPoint& point) = 0;
//! Map viewport position to world space position. //! 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. //! 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 //! Get normal for viewport position
virtual Vec3 ViewToWorldNormal(const QPoint& vp, bool onlyTerrain, bool bTestRenderMesh = false) = 0; 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 SetCursorString(const QString& str) = 0;
virtual void SetFocus() = 0; virtual void SetFocus() = 0;
virtual void Invalidate(bool bErase = 1) = 0; virtual void Invalidate(bool bErase = true) = 0;
// Is overridden by RenderViewport // Is overridden by RenderViewport
virtual void SetFOV([[maybe_unused]] float fov) {} virtual void SetFOV([[maybe_unused]] float fov) {}
@ -274,7 +274,7 @@ public:
void SetViewPane(CLayoutViewPane* viewPane) { m_viewPane = viewPane; } void SetViewPane(CLayoutViewPane* viewPane) { m_viewPane = viewPane; }
virtual CViewport *asCViewport() { return this; } CViewport *asCViewport() override { return this; }
protected: protected:
CLayoutViewPane* m_viewPane = nullptr; CLayoutViewPane* m_viewPane = nullptr;
@ -336,7 +336,7 @@ public:
void SetActiveWindow() override { activateWindow(); } void SetActiveWindow() override { activateWindow(); }
//! Called while window is idle. //! Called while window is idle.
virtual void Update(); void Update() override;
/** Set name of this viewport. /** Set name of this viewport.
*/ */
@ -344,24 +344,24 @@ public:
/** Get name of viewport /** Get name of viewport
*/ */
QString GetName() const; QString GetName() const override;
virtual void SetFocus() { setFocus(); } void SetFocus() override { setFocus(); }
virtual void Invalidate([[maybe_unused]] bool bErase = 1) { update(); } void Invalidate([[maybe_unused]] bool bErase = 1) override { update(); }
// Is overridden by RenderViewport // Is overridden by RenderViewport
virtual void SetFOV([[maybe_unused]] float fov) {} void SetFOV([[maybe_unused]] float fov) override {}
virtual float GetFOV() const; float GetFOV() const override;
// Must be overridden in derived classes. // Must be overridden in derived classes.
// Returns: // Returns:
// e.g. 4.0/3.0 // e.g. 4.0/3.0
virtual float GetAspectRatio() const = 0; float GetAspectRatio() const override = 0;
virtual void GetDimensions(int* pWidth, int* pHeight) const; void GetDimensions(int* pWidth, int* pHeight) const override;
virtual void ScreenToClient(QPoint& pPoint) const override; void ScreenToClient(QPoint& pPoint) const override;
virtual void ResetContent(); void ResetContent() override;
virtual void UpdateContent(int flags); void UpdateContent(int flags) override;
//! Set current zoom factor for this viewport. //! Set current zoom factor for this viewport.
virtual void SetZoomFactor(float fZoomFactor); virtual void SetZoomFactor(float fZoomFactor);
@ -373,10 +373,10 @@ public:
virtual void OnDeactivate(); virtual void OnDeactivate();
//! Map world space position to viewport position. //! 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. //! 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. //! 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; 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. //! 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. //! 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. //! Snap any given 3D world position to grid lines if snap is enabled.
Vec3 SnapToGrid(const Vec3& vec) override; 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. //! 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. //! 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. /// Take raw input and create a final mouse interaction.
/// @attention Do not map **point** from widget to viewport explicitly, /// @attention Do not map **point** from widget to viewport explicitly,
@ -413,7 +414,7 @@ public:
// Selection. // Selection.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Resets current selection region. //! Resets current selection region.
virtual void ResetSelectionRegion(); void ResetSelectionRegion() override;
//! Set 2D selection rectangle. //! Set 2D selection rectangle.
void SetSelectionRectangle(const QRect& rect) override; void SetSelectionRectangle(const QRect& rect) override;
@ -422,12 +423,12 @@ public:
//! Called when dragging selection rectangle. //! Called when dragging selection rectangle.
void OnDragSelectRectangle(const QRect& rect, bool bNormalizeRect = false) override; void OnDragSelectRectangle(const QRect& rect, bool bNormalizeRect = false) override;
//! Get selection precision tolerance. //! Get selection precision tolerance.
float GetSelectionTolerance() const { return m_selectionTolerance; } float GetSelectionTolerance() const override { return m_selectionTolerance; }
//! Center viewport on selection. //! Center viewport on selection.
void CenterOnSelection() override {} void CenterOnSelection() override {}
void CenterOnAABB([[maybe_unused]] const AABB& aabb) 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. //! Performs hit testing of 2d point in view to find which object hit.
bool HitTest(const QPoint& point, HitContext& hitInfo) override; 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; 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. // 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; void GetPerpendicularAxis(EAxis* pAxis, bool* pIs2D) const override;
virtual const ::Plane* GetConstructionPlane() const { return &m_constructionPlane; } 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. //! Set construction plane from given position construction matrix refrence coord system and axis settings.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void MakeConstructionPlane(int axis) override; 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); virtual const Matrix34& GetConstructionMatrix(RefCoordSys coordSys);
// Set simple construction plane origin. // Set simple construction plane origin.
void SetConstructionOrigin(const Vec3& worldPos); void SetConstructionOrigin(const Vec3& worldPos);
@ -461,11 +462,11 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Undo for viewpot operations. // Undo for viewpot operations.
void BeginUndo(); void BeginUndo() override;
void AcceptUndo(const QString& undoDescription); void AcceptUndo(const QString& undoDescription) override;
void CancelUndo(); void CancelUndo() override;
void RestoreUndo(); void RestoreUndo() override;
bool IsUndoRecording() const; bool IsUndoRecording() const override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
//! Get prefered original size for this viewport. //! Get prefered original size for this viewport.
@ -473,39 +474,39 @@ public:
virtual QSize GetIdealSize() const; virtual QSize GetIdealSize() const;
//! Check if world space bounding box is visible in this view. //! 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); setCursor(cursor);
} }
// Set`s current cursor string. // Set`s current cursor string.
void SetCurrentCursor(const QCursor& hCursor, const QString& cursorString); void SetCurrentCursor(const QCursor& hCursor, const QString& cursorString);
virtual void SetCurrentCursor(EStdCursor stdCursor, const QString& cursorString); void SetCurrentCursor(EStdCursor stdCursor, const QString& cursorString) override;
void SetCurrentCursor(EStdCursor stdCursor); void SetCurrentCursor(EStdCursor stdCursor) override;
virtual void SetCursorString(const QString& cursorString); void SetCursorString(const QString& cursorString) override;
void ResetCursor(); void ResetCursor() override;
void SetSupplementaryCursorStr(const QString& str); void SetSupplementaryCursorStr(const QString& str) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Return visble objects cache. // Return visble objects cache.
CBaseObjectsCache* GetVisibleObjectsCache() { return m_pVisibleObjectsCache; }; CBaseObjectsCache* GetVisibleObjectsCache() override { return m_pVisibleObjectsCache; };
void RegisterRenderListener(IRenderListener* piListener); void RegisterRenderListener(IRenderListener* piListener) override;
bool UnregisterRenderListener(IRenderListener* piListener); bool UnregisterRenderListener(IRenderListener* piListener) override;
bool IsRenderListenerRegistered(IRenderListener* piListener); bool IsRenderListenerRegistered(IRenderListener* piListener) override;
void AddPostRenderer(IPostRenderer* pPostRenderer); void AddPostRenderer(IPostRenderer* pPostRenderer) override;
bool RemovePostRenderer(IPostRenderer* pPostRenderer); bool RemovePostRenderer(IPostRenderer* pPostRenderer) override;
void CaptureMouse() override { m_mouseCaptured = true; QWidget::grabMouse(); } void CaptureMouse() override { m_mouseCaptured = true; QWidget::grabMouse(); }
void ReleaseMouse() override { m_mouseCaptured = false; QWidget::releaseMouse(); } void ReleaseMouse() override { m_mouseCaptured = false; QWidget::releaseMouse(); }
virtual void setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir); void setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir) override;
virtual void setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir); void setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir) override;
QPoint m_vp; QPoint m_vp;
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
Vec3 m_raySrc; Vec3 m_raySrc;

@ -77,7 +77,7 @@ Q_SIGNALS:
protected: protected:
virtual void OnInitDialog(); 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 OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override;
void OnMaximize(); void OnMaximize();

@ -266,7 +266,7 @@ namespace AZ
_ComponentClass::RTTI_Type().ToString<AZStd::string>().c_str(), descriptor->GetName(), _ComponentClass::RTTI_TypeName()); \ _ComponentClass::RTTI_Type().ToString<AZStd::string>().c_str(), descriptor->GetName(), _ComponentClass::RTTI_TypeName()); \
return nullptr; \ 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, " \ 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 " \ "it can cause lifetime management issues / crashes.\nThis situation can happen by declaring a component " \

@ -1251,6 +1251,8 @@ namespace AZ
return AZ::SettingsRegistryInterface::VisitResponse::Continue; 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 void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, bool value) override
{ {
// By default the auto load option is true // By default the auto load option is true

@ -196,14 +196,14 @@ namespace AZ
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// ComponentApplicationRequests // ComponentApplicationRequests
void RegisterComponentDescriptor(const ComponentDescriptor* descriptor) override final; void RegisterComponentDescriptor(const ComponentDescriptor* descriptor) final;
void UnregisterComponentDescriptor(const ComponentDescriptor* descriptor) override final; void UnregisterComponentDescriptor(const ComponentDescriptor* descriptor) final;
void RegisterEntityAddedEventHandler(EntityAddedEvent::Handler& handler) override final; void RegisterEntityAddedEventHandler(EntityAddedEvent::Handler& handler) final;
void RegisterEntityRemovedEventHandler(EntityRemovedEvent::Handler& handler) override final; void RegisterEntityRemovedEventHandler(EntityRemovedEvent::Handler& handler) final;
void RegisterEntityActivatedEventHandler(EntityActivatedEvent::Handler& handler) override final; void RegisterEntityActivatedEventHandler(EntityActivatedEvent::Handler& handler) final;
void RegisterEntityDeactivatedEventHandler(EntityDeactivatedEvent::Handler& handler) override final; void RegisterEntityDeactivatedEventHandler(EntityDeactivatedEvent::Handler& handler) final;
void SignalEntityActivated(Entity* entity) override final; void SignalEntityActivated(Entity* entity) final;
void SignalEntityDeactivated(Entity* entity) override final; void SignalEntityDeactivated(Entity* entity) final;
bool AddEntity(Entity* entity) override; bool AddEntity(Entity* entity) override;
bool RemoveEntity(Entity* entity) override; bool RemoveEntity(Entity* entity) override;
bool DeleteEntity(const EntityId& id) override; bool DeleteEntity(const EntityId& id) override;

@ -86,6 +86,7 @@ namespace AZ
class AssetTreeNodeBase class AssetTreeNodeBase
{ {
public: public:
virtual ~AssetTreeNodeBase() = default;
virtual const AssetPrimaryInfo* GetAssetPrimaryInfo() const = 0; virtual const AssetPrimaryInfo* GetAssetPrimaryInfo() const = 0;
virtual AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) = 0; virtual AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) = 0;
}; };
@ -94,6 +95,7 @@ namespace AZ
class AssetTreeBase class AssetTreeBase
{ {
public: public:
virtual ~AssetTreeBase() = default;
virtual AssetTreeNodeBase& GetRoot() = 0; virtual AssetTreeNodeBase& GetRoot() = 0;
}; };
@ -101,6 +103,7 @@ namespace AZ
class AssetAllocationTableBase class AssetAllocationTableBase
{ {
public: public:
virtual ~AssetAllocationTableBase() = default;
virtual AssetTreeNodeBase* FindAllocation(void* ptr) const = 0; virtual AssetTreeNodeBase* FindAllocation(void* ptr) const = 0;
}; };
} }

@ -31,6 +31,8 @@ namespace AZ
{ {
} }
~AssetTreeNode() override = default;
const AssetPrimaryInfo* GetAssetPrimaryInfo() const override const AssetPrimaryInfo* GetAssetPrimaryInfo() const override
{ {
return m_primaryinfo; return m_primaryinfo;
@ -67,6 +69,8 @@ namespace AZ
class AssetTree : public AssetTreeBase class AssetTree : public AssetTreeBase
{ {
public: public:
~AssetTree() override = default;
AssetTreeNodeBase& GetRoot() override AssetTreeNodeBase& GetRoot() override
{ {
return m_rootAssets; return m_rootAssets;
@ -99,6 +103,7 @@ namespace AZ
AllocationTable(mutex_type& mutex) : m_mutex(mutex) AllocationTable(mutex_type& mutex) : m_mutex(mutex)
{ {
} }
~AllocationTable() override = default;
AssetTreeNodeBase* FindAllocation(void* ptr) const override AssetTreeNodeBase* FindAllocation(void* ptr) const override
{ {

@ -19,7 +19,7 @@ namespace AZ::Debug
class BudgetTracker class BudgetTracker
{ {
public: 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); static Budget* GetBudgetFromEnvironment(const char* budgetName, uint32_t crc);
~BudgetTracker(); ~BudgetTracker();

@ -28,21 +28,21 @@ namespace AZ
protected: protected:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Driller // Driller
virtual const char* GroupName() const { return "SystemDrillers"; } const char* GroupName() const override { return "SystemDrillers"; }
virtual const char* GetName() const { return "TraceMessagesDriller"; } const char* GetName() const override { return "TraceMessagesDriller"; }
virtual const char* GetDescription() const { return "Handles all system messages like Assert, Exception, Error, Warning, Printf, etc."; } const char* GetDescription() const override { return "Handles all system messages like Assert, Exception, Error, Warning, Printf, etc."; }
virtual void Start(const Param* params = NULL, int numParams = 0); void Start(const Param* params = NULL, int numParams = 0) override;
virtual void Stop(); void Stop() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// TraceMessagesDrillerBus // TraceMessagesDrillerBus
/// Triggered when a AZ_Assert failed. This is terminating event! (the code will break, crash). /// Triggered when a AZ_Assert failed. This is terminating event! (the code will break, crash).
virtual void OnAssert(const char* message); void OnAssert(const char* message) override;
virtual void OnException(const char* message); void OnException(const char* message) override;
virtual void OnError(const char* window, const char* message); void OnError(const char* window, const char* message) override;
virtual void OnWarning(const char* window, const char* message); void OnWarning(const char* window, const char* message) override;
virtual void OnPrintf(const char* window, const char* message); void OnPrintf(const char* window, const char* message) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
}; };
} // namespace Debug } // namespace Debug

@ -443,7 +443,7 @@ namespace AZ
const unsigned char* GetData() const { return m_data.data(); } const unsigned char* GetData() const { return m_data.data(); }
unsigned int GetDataSize() const { return static_cast<unsigned int>(m_data.size()); } unsigned int GetDataSize() const { return static_cast<unsigned int>(m_data.size()); }
inline void Reset() { m_data.clear(); } 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<const unsigned char*>(data), reinterpret_cast<const unsigned char*>(data) + dataSize); m_data.insert(m_data.end(), reinterpret_cast<const unsigned char*>(data), reinterpret_cast<const unsigned char*>(data) + dataSize);
} }
@ -489,7 +489,7 @@ namespace AZ
} }
unsigned int GetDataLeft() const { return static_cast<unsigned int>(m_dataEnd - m_data); } unsigned int GetDataLeft() const { return static_cast<unsigned int>(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(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!"); 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); bool Open(const char* fileName, int mode, int platformFlags = 0);
void Close(); 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();
~DrillerInputFileStream(); ~DrillerInputFileStream();
bool Open(const char* fileName, int mode, int platformFlags = 0); 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(); void Close();
}; };

@ -98,21 +98,21 @@ namespace AZ
/// Return compressor type id. /// Return compressor type id.
static AZ::u32 TypeId(); 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. /// 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. /// 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. /// 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. /// 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. /// Write a seek point.
virtual bool WriteSeekPoint(CompressorStream* stream); bool WriteSeekPoint(CompressorStream* stream) override;
/// Set auto seek point even dataSize bytes. /// 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). /// 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: protected:

@ -31,7 +31,7 @@ namespace AZ
{ {
} }
protected: protected:
virtual void Process() void Process() override
{ {
m_notifyFlag->store(true, AZStd::memory_order_release); m_notifyFlag->store(true, AZStd::memory_order_release);
} }

@ -77,7 +77,7 @@ namespace AZ
: public Sample<Vector3> : public Sample<Vector3>
{ {
public: public:
Vector3 GetInterpolatedValue(TimeType time) override final Vector3 GetInterpolatedValue(TimeType time) final
{ {
Vector3 interpolatedValue = m_previousValue; Vector3 interpolatedValue = m_previousValue;
if (m_targetTimestamp != 0) if (m_targetTimestamp != 0)
@ -108,7 +108,7 @@ namespace AZ
: public Sample<Quaternion> : public Sample<Quaternion>
{ {
public: public:
Quaternion GetInterpolatedValue(TimeType time) override final Quaternion GetInterpolatedValue(TimeType time) final
{ {
Quaternion interpolatedValue = m_previousValue; Quaternion interpolatedValue = m_previousValue;
if (m_targetTimestamp != 0) if (m_targetTimestamp != 0)
@ -144,7 +144,7 @@ namespace AZ
: public Sample<Vector3> : public Sample<Vector3>
{ {
public: public:
Vector3 GetInterpolatedValue(TimeType /*time*/) override final Vector3 GetInterpolatedValue(TimeType /*time*/) final
{ {
return GetTargetValue(); return GetTargetValue();
} }
@ -155,7 +155,7 @@ namespace AZ
: public Sample<Quaternion> : public Sample<Quaternion>
{ {
public: public:
Quaternion GetInterpolatedValue(TimeType /*time*/) override final Quaternion GetInterpolatedValue(TimeType /*time*/) final
{ {
return GetTargetValue(); return GetTargetValue();
} }

@ -48,18 +48,18 @@ namespace AZ
HeapSchema(const Descriptor& desc); HeapSchema(const Descriptor& desc);
virtual ~HeapSchema(); 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); 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); 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) { (void)ptr; (void)newSize; (void)newAlignment; return NULL; } pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override { (void)ptr; (void)newSize; (void)newAlignment; return NULL; }
virtual size_type Resize(pointer_type ptr, size_type newSize) { (void)ptr; (void)newSize; return 0; } size_type Resize(pointer_type ptr, size_type newSize) override { (void)ptr; (void)newSize; return 0; }
virtual size_type AllocationSize(pointer_type ptr); size_type AllocationSize(pointer_type ptr) override;
virtual size_type NumAllocatedBytes() const { return m_used; } size_type NumAllocatedBytes() const override { return m_used; }
virtual size_type Capacity() const { return m_capacity; } size_type Capacity() const override { return m_capacity; }
virtual size_type GetMaxAllocationSize() const; size_type GetMaxAllocationSize() const override;
size_type GetMaxContiguousAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override;
virtual IAllocatorAllocate* GetSubAllocator() { return m_subAllocator; } IAllocatorAllocate* GetSubAllocator() override { return m_subAllocator; }
virtual void GarbageCollect() {} void GarbageCollect() override {}
private: private:
AZ_FORCE_INLINE size_type ChunckSize(pointer_type ptr); AZ_FORCE_INLINE size_type ChunckSize(pointer_type ptr);

@ -56,22 +56,22 @@ namespace AZ
HphaSchema(const Descriptor& desc); HphaSchema(const Descriptor& desc);
virtual ~HphaSchema(); 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); 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;
virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0); 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); 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. /// Resizes allocated memory block to the size possible and returns that size.
virtual size_type Resize(pointer_type ptr, size_type newSize); size_type Resize(pointer_type ptr, size_type newSize) override;
virtual size_type AllocationSize(pointer_type ptr); size_type AllocationSize(pointer_type ptr) override;
virtual size_type NumAllocatedBytes() const; size_type NumAllocatedBytes() const override;
virtual size_type Capacity() const; size_type Capacity() const override;
virtual size_type GetMaxAllocationSize() const; size_type GetMaxAllocationSize() const override;
size_type GetMaxContiguousAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override;
virtual size_type GetUnAllocatedMemory(bool isPrint = false) const; size_type GetUnAllocatedMemory(bool isPrint = false) const override;
virtual IAllocatorAllocate* GetSubAllocator() { return m_desc.m_subAllocator; } 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. /// 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: private:
// [LY-84974][sconel@][2018-08-10] SliceStrike integration up to CL 671758 // [LY-84974][sconel@][2018-08-10] SliceStrike integration up to CL 671758

@ -41,18 +41,18 @@ namespace AZ
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// IAllocatorAllocate // 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; 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; 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; pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override;
virtual size_type Resize(pointer_type ptr, size_type newSize) override; size_type Resize(pointer_type ptr, size_type newSize) override;
virtual size_type AllocationSize(pointer_type ptr) override; size_type AllocationSize(pointer_type ptr) override;
virtual size_type NumAllocatedBytes() const override; size_type NumAllocatedBytes() const override;
virtual size_type Capacity() const override; size_type Capacity() const override;
virtual size_type GetMaxAllocationSize() const override; size_type GetMaxAllocationSize() const override;
virtual size_type GetMaxContiguousAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override;
virtual IAllocatorAllocate* GetSubAllocator() override; IAllocatorAllocate* GetSubAllocator() override;
virtual void GarbageCollect() override; void GarbageCollect() override;
private: private:
typedef void* (*MallocFn)(size_t); typedef void* (*MallocFn)(size_t);

@ -849,7 +849,7 @@ namespace AZ
return AZ::AllocatorInstance<Parent>::Get().GetUnAllocatedMemory(isPrint); return AZ::AllocatorInstance<Parent>::Get().GetUnAllocatedMemory(isPrint);
} }
virtual IAllocatorAllocate* GetSubAllocator() override IAllocatorAllocate* GetSubAllocator() override
{ {
return AZ::AllocatorInstance<Parent>::Get().GetSubAllocator(); return AZ::AllocatorInstance<Parent>::Get().GetSubAllocator();
} }

@ -38,24 +38,24 @@ namespace AZ
protected: protected:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Driller // Driller
virtual const char* GroupName() const { return "SystemDrillers"; } const char* GroupName() const override { return "SystemDrillers"; }
virtual const char* GetName() const { return "MemoryDriller"; } const char* GetName() const override { return "MemoryDriller"; }
virtual const char* GetDescription() const { return "Reports all allocators and memory allocations."; } const char* GetDescription() const override { return "Reports all allocators and memory allocations."; }
virtual void Start(const Param* params = NULL, int numParams = 0); void Start(const Param* params = NULL, int numParams = 0) override;
virtual void Stop(); void Stop() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// MemoryDrillerBus // MemoryDrillerBus
virtual void RegisterAllocator(IAllocator* allocator); void RegisterAllocator(IAllocator* allocator) override;
virtual void UnregisterAllocator(IAllocator* allocator); 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); void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) override;
virtual void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info); void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) override;
virtual void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment); void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) override;
virtual void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize); void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) override;
virtual void DumpAllAllocations(); void DumpAllAllocations() override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void RegisterAllocatorOutput(IAllocator* allocator); void RegisterAllocatorOutput(IAllocator* allocator);

@ -77,18 +77,18 @@ namespace AZ
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// IAllocatorAllocate // 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; 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; 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; pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override;
virtual size_type Resize(pointer_type ptr, size_type newSize) override; size_type Resize(pointer_type ptr, size_type newSize) override;
virtual size_type AllocationSize(pointer_type ptr) override; size_type AllocationSize(pointer_type ptr) override;
virtual size_type NumAllocatedBytes() const override; size_type NumAllocatedBytes() const override;
virtual size_type Capacity() const override; size_type Capacity() const override;
virtual size_type GetMaxAllocationSize() const override; size_type GetMaxAllocationSize() const override;
size_type GetMaxContiguousAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override;
virtual IAllocatorAllocate* GetSubAllocator() override; IAllocatorAllocate* GetSubAllocator() override;
virtual void GarbageCollect() override; void GarbageCollect() override;
private: private:
OverrunDetectionSchemaImpl* m_impl; OverrunDetectionSchemaImpl* m_impl;

@ -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.) * 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. * 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. * Override to require specific components on the system entity.

@ -594,8 +594,8 @@ namespace AZ
void SetArgumentName(size_t index, const AZStd::string& name) override; void SetArgumentName(size_t index, const AZStd::string& name) override;
const AZStd::string* GetArgumentToolTip(size_t index) const override; const AZStd::string* GetArgumentToolTip(size_t index) const override;
void SetArgumentToolTip(size_t index, const AZStd::string& name) override; void SetArgumentToolTip(size_t index, const AZStd::string& name) override;
virtual void SetDefaultValue(size_t index, BehaviorDefaultValuePtr defaultValue) override; void SetDefaultValue(size_t index, BehaviorDefaultValuePtr defaultValue) override;
virtual BehaviorDefaultValuePtr GetDefaultValue(size_t index) const override; BehaviorDefaultValuePtr GetDefaultValue(size_t index) const override;
const BehaviorParameter* GetResult() const override; const BehaviorParameter* GetResult() const override;
void OverrideParameterTraits(size_t index, AZ::u32 addTraits, AZ::u32 removeTraits) override; void OverrideParameterTraits(size_t index, AZ::u32 addTraits, AZ::u32 removeTraits) override;

@ -5,8 +5,8 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT * SPDX-License-Identifier: Apache-2.0 OR MIT
* *
*/ */
#ifndef AZCORE_RTTI_H
#define AZCORE_RTTI_H #pragma once
#include <AzCore/RTTI/TypeInfo.h> #include <AzCore/RTTI/TypeInfo.h>
#include <AzCore/Module/Environment.h> #include <AzCore/Module/Environment.h>
@ -44,21 +44,9 @@ namespace AZ
/// RTTI typeId /// RTTI typeId
typedef void (* RTTI_EnumCallback)(const AZ::TypeId& /*typeId*/, void* /*userData*/); 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 // We require AZ_TYPE_INFO to be declared
#define AZ_RTTI_COMMON() \ #define AZ_RTTI_COMMON() \
AZ_PUSH_DISABLE_OVERRIDE_WARNING \ AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \
void RTTI_Enable(); \ void RTTI_Enable(); \
virtual inline const AZ::TypeId& RTTI_GetType() const { return RTTI_Type(); } \ virtual inline const AZ::TypeId& RTTI_GetType() const { return RTTI_Type(); } \
virtual inline const char* RTTI_GetTypeName() const { return RTTI_TypeName(); } \ 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); } \ 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 AZ::TypeId& RTTI_Type() { return TYPEINFO_Uuid(); } \
static inline const char* RTTI_TypeName() { return TYPEINFO_Name(); } \ 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!") //#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() \ #define AZ_RTTI_1() AZ_RTTI_COMMON() \
static bool RTTI_IsContainType(const AZ::TypeId& id) { return id == RTTI_Type(); } \ 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); } \ 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 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) /// AZ_RTTI(BaseClass)
#define AZ_RTTI_2(_1) AZ_RTTI_COMMON() \ #define AZ_RTTI_2(_1) AZ_RTTI_COMMON() \
@ -85,14 +75,14 @@ namespace AZ
static void RTTI_EnumHierarchy(AZ::RTTI_EnumCallback cb, void* userData) { \ static void RTTI_EnumHierarchy(AZ::RTTI_EnumCallback cb, void* userData) { \
cb(RTTI_Type(), userData); \ cb(RTTI_Type(), userData); \
AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, 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 { \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
if (id == RTTI_Type()) { return this; } \ if (id == RTTI_Type()) { return this; } \
return AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); } \ return AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); } \
virtual inline void* RTTI_AddressOf(const AZ::TypeId& id) { \ virtual inline void* RTTI_AddressOf(const AZ::TypeId& id) { \
if (id == RTTI_Type()) { return this; } \ if (id == RTTI_Type()) { return this; } \
return AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); } \ return AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); } \
AZ_POP_DISABLE_OVERRIDE_WARNING AZ_POP_DISABLE_WARNING
/// AZ_RTTI(BaseClass1,BaseClass2) /// AZ_RTTI(BaseClass1,BaseClass2)
#define AZ_RTTI_3(_1, _2) AZ_RTTI_COMMON() \ #define AZ_RTTI_3(_1, _2) AZ_RTTI_COMMON() \
@ -104,7 +94,7 @@ namespace AZ
cb(RTTI_Type(), userData); \ cb(RTTI_Type(), userData); \
AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, userData); \
AZ::Internal::RttiCaller<_2>::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 { \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
if (id == RTTI_Type()) { return this; } \ if (id == RTTI_Type()) { return this; } \
const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ 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; } \ if (id == RTTI_Type()) { return this; } \
void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \
return AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); } \ return AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); } \
AZ_POP_DISABLE_OVERRIDE_WARNING AZ_POP_DISABLE_WARNING
/// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3) /// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3)
#define AZ_RTTI_4(_1, _2, _3) AZ_RTTI_COMMON() \ #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<_1>::RTTI_EnumHierarchy(cb, userData); \
AZ::Internal::RttiCaller<_2>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_2>::RTTI_EnumHierarchy(cb, userData); \
AZ::Internal::RttiCaller<_3>::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 { \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
if (id == RTTI_Type()) { return this; } \ if (id == RTTI_Type()) { return this; } \
const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ 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; } \ 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; } \ r = AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); if (r) { return r; } \
return AZ::Internal::RttiCaller<_3>::RTTI_AddressOf(this, id); } \ return AZ::Internal::RttiCaller<_3>::RTTI_AddressOf(this, id); } \
AZ_POP_DISABLE_OVERRIDE_WARNING AZ_POP_DISABLE_WARNING
/// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3,BaseClass4) /// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3,BaseClass4)
#define AZ_RTTI_5(_1, _2, _3, _4) AZ_RTTI_COMMON() \ #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<_2>::RTTI_EnumHierarchy(cb, userData); \
AZ::Internal::RttiCaller<_3>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_3>::RTTI_EnumHierarchy(cb, userData); \
AZ::Internal::RttiCaller<_4>::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 { \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
if (id == RTTI_Type()) { return this; } \ if (id == RTTI_Type()) { return this; } \
const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ 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<_2>::RTTI_AddressOf(this, id); if (r) { return r; } \
r = AZ::Internal::RttiCaller<_3>::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); } \ 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) /// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3,BaseClass4,BaseClass5)
#define AZ_RTTI_6(_1, _2, _3, _4, _5) AZ_RTTI_COMMON() \ #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<_3>::RTTI_EnumHierarchy(cb, userData); \
AZ::Internal::RttiCaller<_4>::RTTI_EnumHierarchy(cb, userData); \ AZ::Internal::RttiCaller<_4>::RTTI_EnumHierarchy(cb, userData); \
AZ::Internal::RttiCaller<_5>::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 { \ virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
if (id == RTTI_Type()) { return this; } \ if (id == RTTI_Type()) { return this; } \
const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \ 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<_3>::RTTI_AddressOf(this, id); if (r) { return r; } \
r = AZ::Internal::RttiCaller<_4>::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); } \ 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 // MACRO specialization to allow optional parameters for template version of AZ_RTTI
@ -951,10 +941,7 @@ namespace AZ
{ {
return AZStd::shared_ptr<DestType>(ptr, castPtr); return AZStd::shared_ptr<DestType>(ptr, castPtr);
} }
else return AZStd::shared_ptr<DestType>();
{
return AZStd::shared_ptr<DestType>();
}
} }
// RttiCast specialization for intrusive_ptr. // RttiCast specialization for intrusive_ptr.
@ -1077,7 +1064,6 @@ namespace AZ
{ {
return AZ::Internal::RttiIsTypeOfIdHelper<U>::Check(id, data, typename HasAZRtti<AZStd::remove_pointer_t<U>>::kind_type()); return AZ::Internal::RttiIsTypeOfIdHelper<U>::Check(id, data, typename HasAZRtti<AZStd::remove_pointer_t<U>>::kind_type());
} }
} // namespace AZ } // namespace AZ
#endif // AZCORE_RTTI_H
#pragma once

@ -19,8 +19,8 @@ namespace AZ
public: public:
AZ_COMPONENT(JsonSystemComponent, "{3C2C7234-9512-4E24-86F0-C40865D7EECE}", Component); AZ_COMPONENT(JsonSystemComponent, "{3C2C7234-9512-4E24-86F0-C40865D7EECE}", Component);
void Activate(); void Activate() override;
void Deactivate(); void Deactivate() override;
static void Reflect(ReflectContext* reflectContext); static void Reflect(ReflectContext* reflectContext);
}; };

@ -46,7 +46,8 @@ namespace AZ
public: public:
AZ_RTTI(JsonUnorderedMapSerializer, "{EF4478D3-1820-4FDB-A7B7-C9711EB41602}", JsonMapSerializer); AZ_RTTI(JsonUnorderedMapSerializer, "{EF4478D3-1820-4FDB-A7B7-C9711EB41602}", JsonMapSerializer);
AZ_CLASS_ALLOCATOR_DECL; AZ_CLASS_ALLOCATOR_DECL;
using JsonMapSerializer::Store;
JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue,
const Uuid& valueTypeId, JsonSerializerContext& context) override; const Uuid& valueTypeId, JsonSerializerContext& context) override;
}; };
@ -63,6 +64,7 @@ namespace AZ
const SerializeContext::ClassElement* keyElement, const SerializeContext::ClassElement* valueElement, const SerializeContext::ClassElement* keyElement, const SerializeContext::ClassElement* valueElement,
const rapidjson::Value& key, const rapidjson::Value& value, JsonDeserializerContext& context) override; 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, JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue,
const Uuid& valueTypeId, JsonSerializerContext& context) override; const Uuid& valueTypeId, JsonSerializerContext& context) override;
}; };

@ -78,6 +78,7 @@ namespace AZ::Internal
struct EnginePathsVisitor : public AZ::SettingsRegistryInterface::Visitor struct EnginePathsVisitor : public AZ::SettingsRegistryInterface::Visitor
{ {
using AZ::SettingsRegistryInterface::Visitor::Visit;
void Visit( void Visit(
[[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName, [[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName,
[[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override [[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override
@ -355,6 +356,7 @@ namespace AZ::SettingsRegistryMergeUtils
: m_settingsSpecialization{ specializations } : m_settingsSpecialization{ specializations }
{} {}
using AZ::SettingsRegistryInterface::Visitor::Visit;
void Visit([[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName, void Visit([[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName,
[[maybe_unused]] AZ::SettingsRegistryInterface::Type type, bool value) override [[maybe_unused]] AZ::SettingsRegistryInterface::Type type, bool value) override
{ {
@ -761,6 +763,7 @@ namespace AZ::SettingsRegistryMergeUtils
return SettingsRegistryInterface::VisitResponse::Continue; 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 void Visit(AZStd::string_view, [[maybe_unused]] AZStd::string_view valueName, SettingsRegistryInterface::Type, AZStd::string_view value) override
{ {
if (processingSourcePathKey) if (processingSourcePathKey)
@ -896,6 +899,7 @@ namespace AZ::SettingsRegistryMergeUtils
struct CommandLineVisitor struct CommandLineVisitor
: AZ::SettingsRegistryInterface::Visitor : AZ::SettingsRegistryInterface::Visitor
{ {
using AZ::SettingsRegistryInterface::Visitor::Visit;
void Visit(AZStd::string_view, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type void Visit(AZStd::string_view, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type
, AZStd::string_view value) override , AZStd::string_view value) override
{ {

@ -131,17 +131,23 @@ namespace UnitTest
, public AllocatorsBase , public AllocatorsBase
{ {
public: 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 //Benchmark interface
void SetUp(const ::benchmark::State& st) override
{
AZ_UNUSED(st);
SetupAllocator();
}
void SetUp(::benchmark::State& st) override void SetUp(::benchmark::State& st) override
{ {
AZ_UNUSED(st); AZ_UNUSED(st);
SetupAllocator(); SetupAllocator();
} }
void TearDown(const ::benchmark::State& st) override
{
AZ_UNUSED(st);
TeardownAllocator();
}
void TearDown(::benchmark::State& st) override void TearDown(::benchmark::State& st) override
{ {
AZ_UNUSED(st); AZ_UNUSED(st);

@ -116,9 +116,9 @@ namespace AZ
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// UserSettingsBus // UserSettingsBus
virtual AZStd::intrusive_ptr<UserSettings> FindUserSettings(u32 id); AZStd::intrusive_ptr<UserSettings> FindUserSettings(u32 id) override;
virtual void AddUserSettings(u32 id, UserSettings* settings); void AddUserSettings(u32 id, UserSettings* settings) override;
virtual bool Save(const char* settingsPath, SerializeContext* sc); bool Save(const char* settingsPath, SerializeContext* sc) override;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
static void Reflect(ReflectContext* reflection); static void Reflect(ReflectContext* reflection);

@ -831,7 +831,6 @@ namespace AZStd
// find first element that value is before, using operator< // find first element that value is before, using operator<
typename iterator_traits<ForwardIterator>::difference_type count = AZStd::distance(first, last); typename iterator_traits<ForwardIterator>::difference_type count = AZStd::distance(first, last);
typename iterator_traits<ForwardIterator>::difference_type step{}; typename iterator_traits<ForwardIterator>::difference_type step{};
count = AZStd::distance(first, last);
for (; 0 < count; ) for (; 0 < count; )
{ // divide and conquer, find half that contains answer { // divide and conquer, find half that contains answer
step = count / 2; step = count / 2;

@ -187,7 +187,7 @@ namespace AZStd
: m_f(AZStd::move(f)) {} : m_f(AZStd::move(f)) {}
thread_info_impl(Internal::thread_move_t<F> f) thread_info_impl(Internal::thread_move_t<F> f)
: m_f(f) {} : m_f(f) {}
virtual void execute() { m_f(); } void execute() override { m_f(); }
private: private:
F m_f; F m_f;

@ -129,16 +129,16 @@ namespace AZStd
{ {
} }
virtual void dispose() // nothrow void dispose() override // nothrow
{ {
AZStd::checked_delete(px_); AZStd::checked_delete(px_);
} }
virtual void destroy() // nothrow void destroy() override // nothrow
{ {
this->~this_type(); this->~this_type();
a_.deallocate(this, sizeof(this_type), AZStd::alignment_of<this_type>::value); a_.deallocate(this, sizeof(this_type), AZStd::alignment_of<this_type>::value);
} }
virtual void* get_deleter(Internal::sp_typeinfo const&) void* get_deleter(Internal::sp_typeinfo const&) override
{ {
return 0; return 0;
} }
@ -176,18 +176,18 @@ namespace AZStd
{ {
} }
virtual void dispose() // nothrow void dispose() override // nothrow
{ {
d_(p_); d_(p_);
} }
virtual void destroy() // nothrow void destroy() override // nothrow
{ {
this->~this_type(); this->~this_type();
a_.deallocate(this, sizeof(this_type), AZStd::alignment_of<this_type>::value); a_.deallocate(this, sizeof(this_type), AZStd::alignment_of<this_type>::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<char&>(d_) : 0; return ti == aztypeid(D) ? &reinterpret_cast<char&>(d_) : 0;
} }

@ -215,6 +215,7 @@ namespace AZStd
struct ErrorSink struct ErrorSink
{ {
virtual ~ErrorSink() = default;
virtual void RegexError(regex_constants::error_type code) = 0; virtual void RegexError(regex_constants::error_type code) = 0;
}; };
} }
@ -1079,7 +1080,7 @@ namespace AZStd
NodeBase* m_next; NodeBase* m_next;
NodeBase* m_previous; NodeBase* m_previous;
virtual ~NodeBase() { } virtual ~NodeBase() = default;
}; };
inline void DestroyNode(NodeBase* node, NodeBase* end = nullptr) inline void DestroyNode(NodeBase* node, NodeBase* end = nullptr)
@ -1758,7 +1759,7 @@ namespace AZStd
return (*this); return (*this);
} }
~basic_regex() ~basic_regex() override
{ // destroy the object { // destroy the object
Clear(); Clear();
} }
@ -2916,7 +2917,7 @@ namespace AZStd
} }
template<class ForwardIterator, class Element, class RegExTraits> template<class ForwardIterator, class Element, class RegExTraits>
inline NodeBase* Builder<ForwardIterator, Element, RegExTraits>::BeginGroup(void) inline NodeBase* Builder<ForwardIterator, Element, RegExTraits>::BeginGroup()
{ // add group node { // add group node
return (NewNode(NT_group)); return (NewNode(NT_group));
} }
@ -3026,7 +3027,7 @@ namespace AZStd
} }
template<class ForwardIterator, class Element, class RegExTraits> template<class ForwardIterator, class Element, class RegExTraits>
inline RootNode* Builder<ForwardIterator, Element, RegExTraits>::EndPattern(void) inline RootNode* Builder<ForwardIterator, Element, RegExTraits>::EndPattern()
{ // wrap up { // wrap up
NewNode(NT_end); NewNode(NT_end);
return m_root; return m_root;

@ -21,7 +21,7 @@ namespace AZ
class WinAPIOverrunDetectionSchema : public OverrunDetectionSchema::PlatformAllocator class WinAPIOverrunDetectionSchema : public OverrunDetectionSchema::PlatformAllocator
{ {
public: public:
virtual SystemInformation GetSystemInformation() override SystemInformation GetSystemInformation() override
{ {
SystemInformation result; SystemInformation result;
SYSTEM_INFO info; SYSTEM_INFO info;
@ -32,7 +32,7 @@ namespace AZ
return result; return result;
} }
virtual void* ReserveBytes(size_t amount) override void* ReserveBytes(size_t amount) override
{ {
void* result = VirtualAlloc(0, amount, MEM_RESERVE, PAGE_NOACCESS); void* result = VirtualAlloc(0, amount, MEM_RESERVE, PAGE_NOACCESS);
@ -45,12 +45,12 @@ namespace AZ
return result; return result;
} }
virtual void ReleaseReservedBytes(void* base) override void ReleaseReservedBytes(void* base) override
{ {
VirtualFree(base, 0, MEM_RELEASE); 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); void* result = VirtualAlloc(base, amount, MEM_COMMIT, PAGE_READWRITE);
@ -63,7 +63,7 @@ namespace AZ
return result; return result;
} }
virtual void DecommitBytes(void* base, size_t amount) override void DecommitBytes(void* base, size_t amount) override
{ {
VirtualFree(base, amount, MEM_DECOMMIT); VirtualFree(base, amount, MEM_DECOMMIT);
} }

@ -267,6 +267,7 @@ namespace AZ::IO
SettingsRegistryInterface::VisitResponse::Continue : SettingsRegistryInterface::VisitResponse::Skip; SettingsRegistryInterface::VisitResponse::Continue : SettingsRegistryInterface::VisitResponse::Skip;
} }
using SettingsRegistryInterface::Visitor::Visit;
void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName, 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 [[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override
{ {

@ -100,6 +100,7 @@ namespace JsonSerializationTests
AZ::AllocatorInstance<AZ::PoolAllocator>::Destroy(); AZ::AllocatorInstance<AZ::PoolAllocator>::Destroy();
} }
using JsonSerializerConformityTestDescriptor<AZ::Data::Asset<TestAssetData>>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<Asset>(); context->RegisterGenericType<Asset>();

@ -956,18 +956,8 @@ AZ_POP_DISABLE_WARNING
namespace Benchmark namespace Benchmark
{ {
class PathBenchmarkFixture class PathBenchmarkFixture
: public ::benchmark::Fixture : public ::UnitTest::AllocatorsBenchmarkFixture
, public ::UnitTest::AllocatorsBase
{ {
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: protected:
AZStd::fixed_vector<const char*, 20> m_appendPaths{ "foo", "bar", "baz", "bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz", AZStd::fixed_vector<const char*, 20> m_appendPaths{ "foo", "bar", "baz", "bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
"boo/bar/base", "C:\\path\\to\\O3DE", "C", "\\\\", "/", R"(test\\path/with\mixed\separators)" }; "boo/bar/base", "C:\\path\\to\\O3DE", "C", "\\\\", "/", R"(test\\path/with\mixed\separators)" };

@ -1704,7 +1704,7 @@ namespace Benchmark
static const AZ::u32 MEDIUM_NUMBER_OF_JOBS = 1024; static const AZ::u32 MEDIUM_NUMBER_OF_JOBS = 1024;
static const AZ::u32 LARGE_NUMBER_OF_JOBS = 16384; static const AZ::u32 LARGE_NUMBER_OF_JOBS = 16384;
void SetUp([[maybe_unused]] ::benchmark::State& state) override void internalSetUp()
{ {
AllocatorInstance<PoolAllocator>::Create(); AllocatorInstance<PoolAllocator>::Create();
AllocatorInstance<ThreadPoolAllocator>::Create(); AllocatorInstance<ThreadPoolAllocator>::Create();
@ -1749,8 +1749,16 @@ namespace Benchmark
return randomDepthDistribution(randomDepthGenerator); 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); JobContext::SetGlobalContext(nullptr);
@ -1763,6 +1771,14 @@ namespace Benchmark
AllocatorInstance<ThreadPoolAllocator>::Destroy(); AllocatorInstance<ThreadPoolAllocator>::Destroy();
AllocatorInstance<PoolAllocator>::Destroy(); AllocatorInstance<PoolAllocator>::Destroy();
} }
void TearDown(::benchmark::State&) override
{
internalTearDown();
}
void TearDown(const ::benchmark::State&) override
{
internalTearDown();
}
protected: protected:
inline void RunCalculatePiJob(AZ::s32 depth, AZ::s8 priority) inline void RunCalculatePiJob(AZ::s32 depth, AZ::s8 priority)

@ -19,8 +19,7 @@ namespace Benchmark
class BM_MathFrustum class BM_MathFrustum
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_testFrustum = AZ::Frustum(AZ::ViewFrustumAttributes(AZ::Transform::CreateIdentity(), 1.0f, 2.0f * atanf(0.5f), 10.0f, 90.0f)); 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; return data;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct Data struct Data
{ {

@ -23,8 +23,7 @@ namespace Benchmark
class BM_MathMatrix3x3 class BM_MathMatrix3x3
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_testDataArray.resize(1000); m_testDataArray.resize(1000);
@ -44,6 +43,15 @@ namespace Benchmark
return testData; return testData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct TestData struct TestData
{ {

@ -21,8 +21,7 @@ namespace Benchmark
class BM_MathMatrix3x4 class BM_MathMatrix3x4
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const::benchmark::State& state) override
{ {
m_testDataArray.resize(1000); m_testDataArray.resize(1000);
@ -58,6 +57,15 @@ namespace Benchmark
return testData; return testData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct TestData struct TestData
{ {

@ -20,8 +20,7 @@ namespace Benchmark
class BM_MathMatrix4x4 class BM_MathMatrix4x4
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_testDataArray.resize(1000); m_testDataArray.resize(1000);
@ -41,6 +40,15 @@ namespace Benchmark
return testData; return testData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct TestData struct TestData
{ {

@ -19,8 +19,7 @@ namespace Benchmark
class BM_MathObb class BM_MathObb
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_position.Set(1.0f, 2.0f, 3.0f); m_position.Set(1.0f, 2.0f, 3.0f);
m_rotation = AZ::Quaternion::CreateRotationZ(AZ::Constants::QuarterPi); 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); 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::Obb m_obb;
AZ::Vector3 m_position; AZ::Vector3 m_position;
AZ::Quaternion m_rotation; AZ::Quaternion m_rotation;

@ -18,14 +18,7 @@ namespace Benchmark
class BM_MathPlane class BM_MathPlane
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
BM_MathPlane()
{
const unsigned int seed = 1;
rng = std::mt19937_64(seed);
}
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
for (int i = 0; i < m_numIters; ++i) for (int i = 0; i < m_numIters; ++i)
{ {
@ -39,7 +32,7 @@ namespace Benchmark
m_distance = unif(rng); m_distance = unif(rng);
m_dists.push_back(m_distance); 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 = AZ::Vector3(unif(rng), unif(rng), unif(rng));
m_normal.Normalize(); m_normal.Normalize();
m_distance = unif(rng); m_distance = unif(rng);
@ -47,6 +40,21 @@ namespace Benchmark
m_planes.push_back(m_plane); 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::Plane m_plane;
AZ::Vector3 m_normal; AZ::Vector3 m_normal;

@ -17,8 +17,7 @@ namespace Benchmark
class BM_MathQuaternion class BM_MathQuaternion
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_quatDataArray.resize(1000); m_quatDataArray.resize(1000);
@ -42,6 +41,15 @@ namespace Benchmark
return quatData; return quatData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct QuatData struct QuatData
{ {

@ -35,8 +35,7 @@ namespace Benchmark
class BM_MathShapeIntersection class BM_MathShapeIntersection
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_testDataArray.resize(1000); m_testDataArray.resize(1000);
@ -58,6 +57,15 @@ namespace Benchmark
return testData; return testData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct TestData struct TestData
{ {

@ -22,8 +22,7 @@ namespace Benchmark
class BM_MathTransform class BM_MathTransform
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_testDataArray.resize(1000); m_testDataArray.resize(1000);
@ -51,6 +50,15 @@ namespace Benchmark
return testData; return testData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct TestData struct TestData
{ {

@ -19,8 +19,7 @@ namespace Benchmark
class BM_MathVector2 class BM_MathVector2
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_vecDataArray.resize(1000); m_vecDataArray.resize(1000);
@ -37,6 +36,15 @@ namespace Benchmark
return vecData; return vecData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct VecData struct VecData
{ {

@ -19,8 +19,7 @@ namespace Benchmark
class BM_MathVector3 class BM_MathVector3
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_vecDataArray.resize(1000); m_vecDataArray.resize(1000);
@ -37,6 +36,15 @@ namespace Benchmark
return vecData; return vecData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct VecData struct VecData
{ {

@ -19,8 +19,7 @@ namespace Benchmark
class BM_MathVector4 class BM_MathVector4
: public benchmark::Fixture : public benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
{ {
m_vecDataArray.resize(1000); m_vecDataArray.resize(1000);
@ -38,6 +37,15 @@ namespace Benchmark
return vecData; return vecData;
}); });
} }
public:
void SetUp(const benchmark::State&) override
{
internalSetUp();
}
void SetUp(benchmark::State&) override
{
internalSetUp();
}
struct VecData struct VecData
{ {

@ -120,19 +120,34 @@ namespace Benchmark
class HphaSchemaBenchmarkFixture class HphaSchemaBenchmarkFixture
: public ::benchmark::Fixture : public ::benchmark::Fixture
{ {
public: void internalSetUp()
void SetUp(const ::benchmark::State& state) override
{ {
AZ_UNUSED(state);
AZ::AllocatorInstance<HphaSchema_TestAllocator>::Create(); AZ::AllocatorInstance<HphaSchema_TestAllocator>::Create();
} }
void TearDown(const ::benchmark::State& state) override void internalTearDown()
{ {
AZ_UNUSED(state);
AZ::AllocatorInstance<HphaSchema_TestAllocator>::Destroy(); AZ::AllocatorInstance<HphaSchema_TestAllocator>::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) static void BM_Allocations(benchmark::State& state, const AllocationSizeArray& allocationArray)
{ {
AZStd::vector<void*> allocations; AZStd::vector<void*> allocations;

@ -1155,6 +1155,23 @@ namespace Benchmark
{ {
class StorageDriveWindowsFixture : public benchmark::Fixture 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: public:
constexpr static const char* TestFileName = "StreamerBenchmark.bin"; constexpr static const char* TestFileName = "StreamerBenchmark.bin";
constexpr static size_t FileSize = 64_mib; 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; internalTearDown();
}
AZStd::string temp; void TearDown(benchmark::State&) override
m_absolutePath.swap(temp); {
internalTearDown();
delete m_streamer;
SystemFile::Delete(TestFileName);
AZ::IO::FileIOBase::SetInstance(nullptr);
AZ::IO::FileIOBase::SetInstance(m_previousFileIO);
delete m_fileIO;
} }
void RepeatedlyReadFile(benchmark::State& state) void RepeatedlyReadFile(benchmark::State& state)

@ -35,6 +35,7 @@ namespace JsonSerializationTests
features.m_fixedSizeArray = true; features.m_fixedSizeArray = true;
} }
using JsonSerializerConformityTestDescriptor<T>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<T>(); context->RegisterGenericType<T>();
@ -243,6 +244,7 @@ namespace JsonSerializationTests
])"; ])";
} }
using ArraySerializerTestDescriptionBase<AZStd::array<BaseClass2*, 4>>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
Base::Reflect(context); Base::Reflect(context);
@ -299,6 +301,7 @@ namespace JsonSerializationTests
AZ::JsonArraySerializer m_serializer; AZ::JsonArraySerializer m_serializer;
public: public:
using BaseJsonSerializerFixture::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& context) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<Array>(); context->RegisterGenericType<Array>();

@ -60,6 +60,7 @@ namespace JsonSerializationTests
return "[188, 288, 388]"; return "[188, 288, 388]";
} }
using BasicContainerConformityTestDescriptor<Container>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<Container>(); context->RegisterGenericType<Container>();
@ -133,6 +134,7 @@ namespace JsonSerializationTests
return "[188, 288, 388]"; return "[188, 288, 388]";
} }
using BasicContainerConformityTestDescriptor<Container>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<Container>(); context->RegisterGenericType<Container>();
@ -225,6 +227,7 @@ namespace JsonSerializationTests
features.m_supportsPartialInitialization = true; features.m_supportsPartialInitialization = true;
} }
using BasicContainerConformityTestDescriptor<Container>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
SimpleClass::Reflect(context, true); SimpleClass::Reflect(context, true);
@ -291,6 +294,7 @@ namespace JsonSerializationTests
using Container = AZStd::vector<SimpleClass>; using Container = AZStd::vector<SimpleClass>;
using BaseClassContainer = AZStd::vector<AZStd::shared_ptr<BaseClass>>; using BaseClassContainer = AZStd::vector<AZStd::shared_ptr<BaseClass>>;
using JsonBasicContainerSerializerTests::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
{ {
SimpleClass::Reflect(serializeContext, true); SimpleClass::Reflect(serializeContext, true);
@ -352,6 +356,7 @@ namespace JsonSerializationTests
static constexpr size_t ContainerSize = 4; static constexpr size_t ContainerSize = 4;
using Container = AZStd::fixed_vector<int, ContainerSize>; using Container = AZStd::fixed_vector<int, ContainerSize>;
using JsonBasicContainerSerializerTests::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
{ {
serializeContext->RegisterGenericType<Container>(); serializeContext->RegisterGenericType<Container>();
@ -387,6 +392,7 @@ namespace JsonSerializationTests
public: public:
using Set = AZStd::set<int>; using Set = AZStd::set<int>;
using JsonBasicContainerSerializerTests::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
{ {
serializeContext->RegisterGenericType<Set>(); serializeContext->RegisterGenericType<Set>();

@ -83,6 +83,7 @@ namespace JsonSerializationTests
BaseJsonSerializerFixture::TearDown(); BaseJsonSerializerFixture::TearDown();
} }
using BaseJsonSerializerFixture::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
{ {
serializeContext->Class<BoolPointerWrapper>() serializeContext->Class<BoolPointerWrapper>()

@ -95,6 +95,7 @@ namespace JsonSerializationTests
BaseJsonSerializerFixture::TearDown(); BaseJsonSerializerFixture::TearDown();
} }
using BaseJsonSerializerFixture::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
{ {
serializeContext->Class<DoublePointerWrapper>() serializeContext->Class<DoublePointerWrapper>()

@ -44,6 +44,7 @@ namespace JsonSerializationTests
features.m_supportsPartialInitialization = false; features.m_supportsPartialInitialization = false;
} }
using JsonSerializerConformityTestDescriptor<Map>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<Map>(); context->RegisterGenericType<Map>();
@ -247,6 +248,7 @@ namespace JsonSerializationTests
features.m_supportsPartialInitialization = true; features.m_supportsPartialInitialization = true;
} }
using MapBaseTestDescription<T<SimpleClass*, SimpleClass*>, Serializer>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
SimpleClass::Reflect(context, true); SimpleClass::Reflect(context, true);

@ -33,6 +33,7 @@ namespace JsonSerializationTests
return AZStd::make_shared<SmartPointer>(); return AZStd::make_shared<SmartPointer>();
} }
using JsonSerializerConformityTestDescriptor<SmartPointer>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<SmartPointer>(); context->RegisterGenericType<SmartPointer>();
@ -102,6 +103,7 @@ namespace JsonSerializationTests
return *lhs == *rhs; return *lhs == *rhs;
} }
using Base::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
SimpleClass::Reflect(context, true); SimpleClass::Reflect(context, true);
@ -176,6 +178,7 @@ namespace JsonSerializationTests
features.m_supportsPartialInitialization = true; features.m_supportsPartialInitialization = true;
} }
using SmartPointerBaseTestDescription<T<BaseClass>>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
SimpleInheritence::Reflect(context, true); SimpleInheritence::Reflect(context, true);
@ -340,6 +343,7 @@ namespace JsonSerializationTests
features.m_supportsPartialInitialization = true; features.m_supportsPartialInitialization = true;
} }
using SmartPointerBaseTestDescription<T<BaseClass2>>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
MultipleInheritence::Reflect(context, true); MultipleInheritence::Reflect(context, true);
@ -513,7 +517,8 @@ namespace JsonSerializationTests
public: public:
using SmartPointer = typename SmartPointerSimpleDerivedClassTestDescription<AZStd::shared_ptr>::SmartPointer; using SmartPointer = typename SmartPointerSimpleDerivedClassTestDescription<AZStd::shared_ptr>::SmartPointer;
using InstanceSmartPointer = AZStd::shared_ptr<SimpleInheritence>; using InstanceSmartPointer = AZStd::shared_ptr<SimpleInheritence>;
using BaseJsonSerializerFixture::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& context) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
m_description.Reflect(context); m_description.Reflect(context);

@ -72,6 +72,7 @@ namespace JsonSerializationTests
TupleSerializerTestsInternal::ConfigureFeatures(features); TupleSerializerTestsInternal::ConfigureFeatures(features);
} }
using JsonSerializerConformityTestDescriptor<AZStd::pair<int, double>>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->Class<PairPlaceholder>()->Field("pair", &PairPlaceholder::m_pair); context->Class<PairPlaceholder>()->Field("pair", &PairPlaceholder::m_pair);
@ -126,6 +127,7 @@ namespace JsonSerializationTests
TupleSerializerTestsInternal::ConfigureFeatures(features); TupleSerializerTestsInternal::ConfigureFeatures(features);
} }
using JsonSerializerConformityTestDescriptor<Tuple>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<Tuple>(); context->RegisterGenericType<Tuple>();
@ -344,6 +346,7 @@ namespace JsonSerializationTests
features.m_enableNewInstanceTests = false; features.m_enableNewInstanceTests = false;
} }
using JsonSerializerConformityTestDescriptor::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->Class<TupleClass>() context->Class<TupleClass>()
@ -477,6 +480,7 @@ namespace JsonSerializationTests
features.m_typeToInject = rapidjson::kNullType; features.m_typeToInject = rapidjson::kNullType;
} }
using JsonSerializerConformityTestDescriptor<Tuple>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<Tuple>(); context->RegisterGenericType<Tuple>();
@ -535,6 +539,7 @@ namespace JsonSerializationTests
BaseJsonSerializerFixture::TearDown(); BaseJsonSerializerFixture::TearDown();
} }
using BaseJsonSerializerFixture::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
{ {
SimpleClass::Reflect(serializeContext, true); SimpleClass::Reflect(serializeContext, true);

@ -54,6 +54,7 @@ namespace JsonSerializationTests
features.m_supportsPartialInitialization = false; features.m_supportsPartialInitialization = false;
} }
using JsonSerializerConformityTestDescriptor<AZStd::unordered_set<int>>::Reflect;
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
{ {
context->RegisterGenericType<Set>(); context->RegisterGenericType<Set>();
@ -108,6 +109,7 @@ namespace JsonSerializationTests
context->RegisterGenericType<MultiSet>(); context->RegisterGenericType<MultiSet>();
} }
using JsonSerializerConformityTestDescriptor<MultiSet>::Reflect;
bool AreEqual(const MultiSet& lhs, const MultiSet& rhs) override bool AreEqual(const MultiSet& lhs, const MultiSet& rhs) override
{ {
return return
@ -139,6 +141,7 @@ namespace JsonSerializationTests
BaseJsonSerializerFixture::TearDown(); BaseJsonSerializerFixture::TearDown();
} }
using BaseJsonSerializerFixture::RegisterAdditional;
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
{ {
serializeContext->RegisterGenericType<Set>(); serializeContext->RegisterGenericType<Set>();

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save