Mod: remove some more superfluous Boolean checks

This commit is contained in:
Uwe
2022-07-19 02:40:59 +02:00
parent 36add10c86
commit 140e89e858
3 changed files with 3 additions and 3 deletions

View File

@@ -7671,7 +7671,7 @@ std::string SketchObject::validateExpression(const App::ObjectIdentifier &path,
{
const App::Property * prop = path.getProperty();
assert(expr != nullptr);
assert(expr);
if (!prop)
return "Property not found";

View File

@@ -601,7 +601,7 @@ void PropertySheet::setStyle(CellAddress address, const std::set<std::string> &_
void PropertySheet::setForeground(CellAddress address, const App::Color &color)
{
Cell * cell = nonNullCellAt(address);
assert(cell != nullptr);
assert(cell);
cell->setForeground(color);
}

View File

@@ -58,7 +58,7 @@ UnitTestDialog* UnitTestDialog::instance()
*/
void UnitTestDialog::destruct ()
{
if (_instance != nullptr) {
if (_instance) {
UnitTestDialog *pTmp = _instance;
_instance = nullptr;
delete pTmp;