diff --git a/src/Editor/Undo/CMoveResourceCommand.h b/src/Editor/Undo/CMoveResourceCommand.h index 7b4c3d82..b1b982dc 100644 --- a/src/Editor/Undo/CMoveResourceCommand.h +++ b/src/Editor/Undo/CMoveResourceCommand.h @@ -35,11 +35,11 @@ public: protected: void DoMove(const TString& rkPath, bool IsAutoDir) { - TString ResName = mpEntry->CookedAssetPath(true).GetFileName(); + const TString ResName = mpEntry->CookedAssetPath(true).GetFileName(); gpEdApp->ResourceBrowser()->ResourceAboutToBeMoved(mpEntry, TO_QSTRING(rkPath + ResName)); CVirtualDirectory *pOldDir = mpEntry->Directory(); - bool Success = mpEntry->Move(rkPath, IsAutoDir); + [[maybe_unused]] const bool Success = mpEntry->Move(rkPath, IsAutoDir); ASSERT(Success); // todo better error handling gpEdApp->ResourceBrowser()->ResourceMoved(mpEntry, pOldDir, mpEntry->Name()); diff --git a/src/Editor/Undo/CRenameDirectoryCommand.h b/src/Editor/Undo/CRenameDirectoryCommand.h index ca19b051..aec132cd 100644 --- a/src/Editor/Undo/CRenameDirectoryCommand.h +++ b/src/Editor/Undo/CRenameDirectoryCommand.h @@ -29,11 +29,11 @@ public: protected: void DoMove(const TString& rkName) { - QString ParentPath = TO_QSTRING(mpDir->Parent() ? mpDir->Parent()->FullPath() : ""); + const QString ParentPath = TO_QSTRING(mpDir->Parent() ? mpDir->Parent()->FullPath() : ""); gpEdApp->ResourceBrowser()->DirectoryAboutToBeMoved(mpDir, ParentPath + TO_QSTRING(rkName)); - TString OldName = mpDir->Name(); - bool Success = mpDir->Rename(rkName); + const TString OldName = mpDir->Name(); + [[maybe_unused]] const bool Success = mpDir->Rename(rkName); ASSERT(Success); gpEdApp->ResourceBrowser()->DirectoryMoved(mpDir, mpDir->Parent(), OldName); diff --git a/src/Editor/Undo/CRenameResourceCommand.h b/src/Editor/Undo/CRenameResourceCommand.h index d63c45d6..4795c5c9 100644 --- a/src/Editor/Undo/CRenameResourceCommand.h +++ b/src/Editor/Undo/CRenameResourceCommand.h @@ -31,11 +31,11 @@ public: protected: void DoMove(const TString& rkName, bool IsAutoName) { - TString FullNewName = rkName + "." + mpEntry->CookedExtension().ToString(); + const TString FullNewName = rkName + "." + mpEntry->CookedExtension().ToString(); gpEdApp->ResourceBrowser()->ResourceAboutToBeMoved(mpEntry, TO_QSTRING(mpEntry->Directory()->FullPath() + FullNewName)); - TString OldName = mpEntry->Name(); - bool Success = mpEntry->Rename(rkName, IsAutoName); + const TString OldName = mpEntry->Name(); + [[maybe_unused]] const bool Success = mpEntry->Rename(rkName, IsAutoName); ASSERT(Success); gpEdApp->ResourceBrowser()->ResourceMoved(mpEntry, mpEntry->Directory(), OldName); diff --git a/src/Editor/Undo/ICreateDeleteDirectoryCommand.h b/src/Editor/Undo/ICreateDeleteDirectoryCommand.h index f7ce78e3..ca1a01c5 100644 --- a/src/Editor/Undo/ICreateDeleteDirectoryCommand.h +++ b/src/Editor/Undo/ICreateDeleteDirectoryCommand.h @@ -46,7 +46,7 @@ protected: if (mpDir->IsEmpty(true)) { gpEdApp->ResourceBrowser()->DirectoryAboutToBeDeleted(mpDir); - bool DeleteSuccess = mpDir->Delete(); + [[maybe_unused]] const bool DeleteSuccess = mpDir->Delete(); ASSERT(DeleteSuccess); gpEdApp->ResourceBrowser()->DirectoryDeleted();