[App] remove superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-18 03:12:01 +02:00
parent 615b1b9b00
commit fa36a57724
12 changed files with 55 additions and 54 deletions

View File

@@ -129,14 +129,14 @@ bool FeaturePythonImp::mustExecute() const
void FeaturePythonImp::onBeforeChange(const Property* prop)
{
if(py_onBeforeChange.isNone())
if (py_onBeforeChange.isNone())
return;
// Run the execute method of the proxy object.
Base::PyGILStateLocker lock;
try {
const char *prop_name = object->getPropertyName(prop);
if(prop_name == nullptr)
if (!prop_name)
return;
if (has__object__) {
Py::Tuple args(1);
@@ -184,13 +184,13 @@ bool FeaturePythonImp::onBeforeChangeLabel(std::string &newLabel)
void FeaturePythonImp::onChanged(const Property* prop)
{
if(py_onChanged.isNone())
if (py_onChanged.isNone())
return;
// Run the execute method of the proxy object.
Base::PyGILStateLocker lock;
try {
const char *prop_name = object->getPropertyName(prop);
if(prop_name == nullptr)
if (!prop_name)
return;
if (has__object__) {
Py::Tuple args(1);