[Part] remove more superfluous nullptr checks
This commit is contained in:
@@ -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<App::DocumentObject*> bodies = doc->getObjectsOfType(BodyBase::getClassTypeId());
|
||||
for (std::vector<App::DocumentObject*>::const_iterator b = bodies.begin(); b != bodies.end(); b++) {
|
||||
BodyBase* body = static_cast<BodyBase*>(*b);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user