Mod: remove some more superfluous Boolean checks
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ UnitTestDialog* UnitTestDialog::instance()
|
||||
*/
|
||||
void UnitTestDialog::destruct ()
|
||||
{
|
||||
if (_instance != nullptr) {
|
||||
if (_instance) {
|
||||
UnitTestDialog *pTmp = _instance;
|
||||
_instance = nullptr;
|
||||
delete pTmp;
|
||||
|
||||
Reference in New Issue
Block a user