[PD] remove more superfluous nullptr checks
This commit is contained in:
@@ -54,20 +54,20 @@ std::vector<App::DocumentObject*> ViewProviderPipe::claimChildren(void)const
|
||||
PartDesign::Pipe* pcPipe = static_cast<PartDesign::Pipe*>(getObject());
|
||||
|
||||
App::DocumentObject* sketch = pcPipe->getVerifiedSketch(true);
|
||||
if (sketch != nullptr)
|
||||
if (sketch)
|
||||
temp.push_back(sketch);
|
||||
|
||||
for(App::DocumentObject* obj : pcPipe->Sections.getValues()) {
|
||||
if (obj != nullptr && obj->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
if (obj && obj->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
temp.push_back(obj);
|
||||
}
|
||||
|
||||
App::DocumentObject* spine = pcPipe->Spine.getValue();
|
||||
if (spine != nullptr && spine->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
if (spine && spine->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
temp.push_back(spine);
|
||||
|
||||
App::DocumentObject* auxspine = pcPipe->AuxillerySpine.getValue();
|
||||
if (auxspine != nullptr && auxspine->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
if (auxspine && auxspine->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
temp.push_back(auxspine);
|
||||
|
||||
return temp;
|
||||
|
||||
Reference in New Issue
Block a user