diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 2c8bb950cd..164257d937 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -3225,7 +3225,7 @@ bool StdCmdTextureMapping::isActive() { Gui::MDIView* view = getMainWindow()->activeWindow(); return view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId()) - && (Gui::Control().activeDialog() == nullptr); + && (!(Gui::Control().activeDialog())); } DEF_STD_CMD(StdCmdDemoMode) diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index c88082b815..2dc2190455 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -184,10 +184,10 @@ public: noUnit = false; } - if (noUnit == true && - (num == plus || // 1+ -> 1mm+ - num == minus || // 1- -> 1mm- - (pos == length - 1 && (pos += 1)))) { // 1EOL-> 1mmEOL + if (noUnit + && (num == plus || // 1+ -> 1mm+ + num == minus || // 1- -> 1mm- + (pos == length - 1 && (pos += 1)))) {// 1EOL-> 1mmEOL copy.insert(pos, unitStr); pos += shift = unitStr.length(); length += shift; diff --git a/src/Gui/propertyeditor/PropertyModel.cpp b/src/Gui/propertyeditor/PropertyModel.cpp index 933253a88d..a4bf6bbd04 100644 --- a/src/Gui/propertyeditor/PropertyModel.cpp +++ b/src/Gui/propertyeditor/PropertyModel.cpp @@ -245,7 +245,7 @@ static PropertyItem *createPropertyItem(App::Property *prop) PropertyModel::GroupInfo &PropertyModel::getGroupInfo(App::Property *prop) { const char* group = prop->getGroup(); - bool isEmpty = (group == nullptr || group[0] == '\0'); + bool isEmpty = (!group || group[0] == '\0'); QString groupName = QString::fromLatin1( isEmpty ? QT_TRANSLATE_NOOP("App::Property", "Base") : group); diff --git a/src/Mod/Drawing/App/FeatureViewSpreadsheet.cpp b/src/Mod/Drawing/App/FeatureViewSpreadsheet.cpp index 2f2456cbc8..86b669ee02 100644 --- a/src/Mod/Drawing/App/FeatureViewSpreadsheet.cpp +++ b/src/Mod/Drawing/App/FeatureViewSpreadsheet.cpp @@ -169,7 +169,7 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void) // get the text App::Property* prop = sheet->getPropertyByName(address.toString().c_str()); std::stringstream field; - if (prop != nullptr) { + if (prop) { if (prop->isDerivedFrom((App::PropertyQuantity::getClassTypeId()))) field << static_cast(prop)->getValue(); else if (prop->isDerivedFrom((App::PropertyFloat::getClassTypeId()))) diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp b/src/Mod/Part/Gui/TaskCheckGeometry.cpp index dcec2494ef..d847bc0c96 100644 --- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp +++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp @@ -172,7 +172,6 @@ QVector buildBOPCheckResultVector() return results; } - QString getBOPCheckString(const BOPAlgo_CheckStatus &status) { static QVector strings = buildBOPCheckResultVector(); @@ -182,7 +181,6 @@ QString getBOPCheckString(const BOPAlgo_CheckStatus &status) return strings.at(index); } - ResultEntry::ResultEntry() { viewProviderRoot = nullptr; @@ -204,9 +202,9 @@ ResultEntry::~ResultEntry() void ResultEntry::buildEntryName() { - ResultEntry *parentEntry = this; - while (parentEntry->parent != nullptr) { - ResultEntry *temp = parentEntry->parent; + ResultEntry* parentEntry = this; + while (parentEntry->parent) { + ResultEntry* temp = parentEntry->parent; if (!temp->parent) break; parentEntry = parentEntry->parent; diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp index a857e0180a..02ed6976a6 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp @@ -967,7 +967,7 @@ void TaskSketcherConstraints::on_showHideButton_clicked(bool val) bool allSelected = true; for (int i = 0; i < ui->listWidgetConstraints->count(); ++i){ QListWidgetItem* it = ui->listWidgetConstraints->item(i); - if (it->isHidden() == false && it->checkState() == Qt::Unchecked) { + if (!(it->isHidden()) && it->checkState() == Qt::Unchecked) { allSelected = false; break; }