[App] remove unnecessary Boolean comparisons

This commit is contained in:
Uwe
2022-06-15 03:58:59 +02:00
parent 6b09da9ab6
commit 063fd56f5f
3 changed files with 7 additions and 7 deletions

View File

@@ -2402,7 +2402,7 @@ private:
fn = str.str();
}
if (fi.renameFile(fn.c_str()) == false)
if (!fi.renameFile(fn.c_str()))
Base::Console().Warning("Cannot rename project file to backup file\n");
}
else {
@@ -2411,7 +2411,7 @@ private:
}
Base::FileInfo tmp(sourcename);
if (tmp.renameFile(targetname.c_str()) == false) {
if (!tmp.renameFile(targetname.c_str())) {
throw Base::FileException(
"Cannot rename tmp save file to project file", targetname);
}
@@ -2511,7 +2511,7 @@ private:
}
}
else {
if (renameFileNoErase(fi, fn+".FCBak") == false) {
if (!renameFileNoErase(fi, fn+".FCBak")) {
fn = fn + "-";
}
else {
@@ -2555,7 +2555,7 @@ private:
}
Base::FileInfo tmp(sourcename);
if (tmp.renameFile(targetname.c_str()) == false) {
if (!tmp.renameFile(targetname.c_str())) {
throw Base::FileException(
"Save interrupted: Cannot rename temporary file to project file", tmp);
}