diff --git a/src/Mod/Part/App/BodyBase.cpp b/src/Mod/Part/App/BodyBase.cpp index 20d86a6ab1..62ae889d94 100644 --- a/src/Mod/Part/App/BodyBase.cpp +++ b/src/Mod/Part/App/BodyBase.cpp @@ -45,7 +45,7 @@ BodyBase::BodyBase() BodyBase* BodyBase::findBodyOf(const App::DocumentObject* f) { App::Document* doc = f->getDocument(); - if (doc != nullptr) { + if (doc) { std::vector bodies = doc->getObjectsOfType(BodyBase::getClassTypeId()); for (std::vector::const_iterator b = bodies.begin(); b != bodies.end(); b++) { BodyBase* body = static_cast(*b); diff --git a/src/Mod/Part/App/FeatureRevolution.cpp b/src/Mod/Part/App/FeatureRevolution.cpp index 5b887169b6..bf335e936d 100644 --- a/src/Mod/Part/App/FeatureRevolution.cpp +++ b/src/Mod/Part/App/FeatureRevolution.cpp @@ -71,8 +71,8 @@ void Revolution::onChanged(const App::Property* prop) { if(! this->isRestoring()){ if(prop == &AxisLink){ - Base.setReadOnly(AxisLink.getValue() != nullptr); - Axis.setReadOnly(AxisLink.getValue() != nullptr); + Base.setReadOnly(AxisLink.getValue()); + Axis.setReadOnly(AxisLink.getValue()); } } Part::Feature::onChanged(prop); diff --git a/src/Mod/Part/Gui/DlgPrimitives.cpp b/src/Mod/Part/Gui/DlgPrimitives.cpp index adfc5e2749..7e80dafa39 100644 --- a/src/Mod/Part/Gui/DlgPrimitives.cpp +++ b/src/Mod/Part/Gui/DlgPrimitives.cpp @@ -334,7 +334,7 @@ DlgPrimitives::DlgPrimitives(QWidget* parent, Part::Primitive* feature) ui->widgetStack2->setCurrentIndex(index); // if existing, the primitive type can not be changed by the user - ui->PrimitiveTypeCB->setDisabled(feature != nullptr); + ui->PrimitiveTypeCB->setDisabled(feature); // ToDo: connect signal if there is a preview of primitives available // read values from the properties diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index e1f21ab490..38b9335c41 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -99,7 +99,7 @@ void TaskAttacher::makeRefStrings(std::vector& refstrings, std::vector< refnames = pcAttach->Support.getSubValues(); for (size_t r = 0; r < 4; r++) { - if ((r < refs.size()) && (refs[r] != nullptr)) { + if ((r < refs.size()) && (refs[r])) { refstrings.push_back(makeRefString(refs[r], refnames[r])); // for Origin or Datum features refnames is empty but we need a non-empty return value if (refnames[r].empty()) @@ -419,7 +419,7 @@ void TaskAttacher::onSelectionChanged(const Gui::SelectionChanges& msg) } QLineEdit* line = getLine(iActiveRef); - if (line != nullptr) { + if (line) { line->blockSignals(true); line->setText(makeRefString(selObj, subname)); line->setProperty("RefName", QByteArray(subname.c_str())); diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp b/src/Mod/Part/Gui/TaskCheckGeometry.cpp index 5c35c50687..b914dc2c9d 100644 --- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp +++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp @@ -207,7 +207,7 @@ ResultEntry::~ResultEntry() void ResultEntry::buildEntryName() { ResultEntry *parentEntry = this; - while(parentEntry->parent != nullptr) + while(parentEntry->parent) { ResultEntry *temp = parentEntry->parent; if (!temp->parent) @@ -838,7 +838,7 @@ bool TaskCheckGeometryResults::split(QString &input, QString &doc, QString &obje QString PartGui::buildSelectionName(const ResultEntry *entry, const TopoDS_Shape &shape) { const ResultEntry *parentEntry = entry; - while(parentEntry->parent != nullptr) + while(parentEntry->parent) { ResultEntry *temp = parentEntry->parent; if (!temp->parent) diff --git a/src/Mod/Part/Gui/TaskDimension.cpp b/src/Mod/Part/Gui/TaskDimension.cpp index 8ca37dd9a8..4660708d65 100644 --- a/src/Mod/Part/Gui/TaskDimension.cpp +++ b/src/Mod/Part/Gui/TaskDimension.cpp @@ -1454,7 +1454,7 @@ void PartGui::SteppedSelection::buildPixmaps() void PartGui::SteppedSelection::selectionSlot(bool checked) { QPushButton *sender = qobject_cast(QObject::sender()); - assert(sender != nullptr); + assert(sender); std::vector::iterator it; for (it = buttons.begin(); it != buttons.end(); ++it) if (it->first == sender) diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index c0431075d8..d3c6a4242b 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -840,7 +840,7 @@ void ViewProviderPartExt::reload() void ViewProviderPartExt::updateData(const App::Property* prop) { const char *propName = prop->getName(); - if (propName && (strcmp(propName, "Shape") == 0 || strstr(propName, "Touched") != nullptr)) { + if (propName && (strcmp(propName, "Shape") == 0 || strstr(propName, "Touched"))) { // calculate the visual only if visible if (isUpdateForced() || Visibility.getValue()) updateVisual();