diff --git a/src/App/ApplicationPy.cpp b/src/App/ApplicationPy.cpp index e9f8e27e4b..361c5aeff6 100644 --- a/src/App/ApplicationPy.cpp +++ b/src/App/ApplicationPy.cpp @@ -317,7 +317,7 @@ PyObject* Application::sCloseDocument(PyObject * /*self*/, PyObject *args) return nullptr; } - if (GetApplication().closeDocument(pstr) == false) { + if (!GetApplication().closeDocument(pstr)) { PyErr_Format(PyExc_RuntimeError, "Closing the document '%s' failed", pstr); return nullptr; } @@ -333,7 +333,7 @@ PyObject* Application::sSaveDocument(PyObject * /*self*/, PyObject *args) Document* doc = GetApplication().getDocument(pDoc); if ( doc ) { - if ( doc->save() == false ) { + if (!doc->save()) { PyErr_Format(Base::PyExc_FC_GeneralError, "Cannot save document '%s'", pDoc); return nullptr; } diff --git a/src/App/Document.cpp b/src/App/Document.cpp index a0b1fc0f37..00fee2e0d4 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -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); } diff --git a/src/App/Metadata.cpp b/src/App/Metadata.cpp index 96aa4b8236..029bcffc87 100644 --- a/src/App/Metadata.cpp +++ b/src/App/Metadata.cpp @@ -458,7 +458,7 @@ bool Metadata::satisfies(const Meta::Dependency& dep) } auto parsedExpression = App::Expression::parse(nullptr, dep.condition); auto result = parsedExpression->eval(); - if (boost::any_cast (result->getValueAsAny()) == false) + if (!boost::any_cast (result->getValueAsAny())) return false; }