Editor code: tidy up BOOLs,NULLs and overrides pt5. (#2876)
A few 'typedefs' replaced by 'using's This shouldn't have any functional changes at all, just c++17 modernization It's a part 5 of a split #2847 Signed-off-by: Nemerle <nemerle5+git@gmail.com> Co-authored-by: Nemerle <nemerle5+git@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <AzCore/Math/Uuid.h>
|
||||
|
||||
//undo object for multi-changes inside library item. such as set all variables to default values.
|
||||
//undo object for multi-changes inside library item. such as set all variables to default values.
|
||||
//For example: change particle emitter shape will lead to multiple variable changes
|
||||
class CUndoBaseLibraryItem
|
||||
: public IUndoObject
|
||||
@@ -54,24 +54,24 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual int GetSize()
|
||||
{
|
||||
int GetSize() override
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
QString GetDescription() override
|
||||
{
|
||||
return m_description;
|
||||
{
|
||||
return m_description;
|
||||
}
|
||||
|
||||
virtual void Undo(bool bUndo)
|
||||
void Undo(bool bUndo) override
|
||||
{
|
||||
//find the libItem
|
||||
IDataBaseItem *libItem = m_libMgr->FindItemByName(m_itemPath);
|
||||
if (libItem == nullptr)
|
||||
{
|
||||
//the undo stack is not reliable any more..
|
||||
assert(false);
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ protected:
|
||||
libItem->Serialize(m_undoCtx);
|
||||
}
|
||||
|
||||
virtual void Redo()
|
||||
void Redo() override
|
||||
{
|
||||
//find the libItem
|
||||
IDataBaseItem *libItem = m_libMgr->FindItemByName(m_itemPath);
|
||||
@@ -124,7 +124,7 @@ private:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CBaseLibraryItem::CBaseLibraryItem()
|
||||
{
|
||||
m_library = 0;
|
||||
m_library = nullptr;
|
||||
GenerateId();
|
||||
m_bModified = false;
|
||||
}
|
||||
@@ -266,7 +266,7 @@ void CBaseLibraryItem::SetLibrary(CBaseLibrary* pLibrary)
|
||||
void CBaseLibraryItem::SetModified(bool bModified)
|
||||
{
|
||||
m_bModified = bModified;
|
||||
if (m_bModified && m_library != NULL)
|
||||
if (m_bModified && m_library != nullptr)
|
||||
{
|
||||
m_library->SetModified(bModified);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user