remove some unnecessary Boolean checks

- checks for true/false and nullptr
This commit is contained in:
Uwe
2022-12-12 03:12:43 +01:00
committed by Chris Hennes
parent 800005a7bd
commit 2b9a28e0ec
6 changed files with 11 additions and 13 deletions

View File

@@ -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<App::PropertyQuantity*>(prop)->getValue();
else if (prop->isDerivedFrom((App::PropertyFloat::getClassTypeId())))