[Gui] remove superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-18 03:17:42 +02:00
parent 53571f7196
commit 316a869b26
22 changed files with 32 additions and 32 deletions

View File

@@ -318,7 +318,7 @@ SbBool TDragger::setUpConnections(SbBool onoff, SbBool doitalways)
}
else
{
if (this->fieldSensor.getAttachedField() != nullptr)
if (this->fieldSensor.getAttachedField())
this->fieldSensor.detach();
inherited::setUpConnections(onoff, doitalways);
}
@@ -603,7 +603,7 @@ SbBool RDragger::setUpConnections(SbBool onoff, SbBool doitalways)
}
else
{
if (this->fieldSensor.getAttachedField() != nullptr)
if (this->fieldSensor.getAttachedField())
this->fieldSensor.detach();
inherited::setUpConnections(onoff, doitalways);
}
@@ -857,10 +857,10 @@ SbBool SoFCCSysDragger::setUpConnections(SbBool onoff, SbBool doitalways)
inherited::setUpConnections(onoff, doitalways);
if (this->translationSensor.getAttachedField() != nullptr)
if (this->translationSensor.getAttachedField())
this->translationSensor.detach();
if (this->rotationSensor.getAttachedField() != nullptr)
if (this->rotationSensor.getAttachedField())
this->rotationSensor.detach();
}
return !(this->connectionsSetUp = onoff);