mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-08 21:17:53 +00:00
Editor/Undo: Mark relevant variables as maybe unused
Prevents potential warnings on release mode.
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user