[TD] Gui: remove some superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-19 02:49:46 +02:00
parent 003757176c
commit 2e5e4dced8
38 changed files with 154 additions and 160 deletions

View File

@@ -181,7 +181,7 @@ bool DrawGuiUtil::isDraftObject(App::DocumentObject* obj)
bool result = false;
App::PropertyPythonObject* proxy = dynamic_cast<App::PropertyPythonObject*>(obj->getPropertyByName("Proxy"));
if (proxy != nullptr) {
if (proxy) {
//if no proxy, can not be Draft obj
//if has proxy, might be Draft obj
std::stringstream ss;
@@ -213,7 +213,7 @@ bool DrawGuiUtil::isArchObject(App::DocumentObject* obj)
bool result = false;
App::PropertyPythonObject* proxy = dynamic_cast<App::PropertyPythonObject*>(obj->getPropertyByName("Proxy"));
if (proxy != nullptr) {
if (proxy) {
//if no proxy, can not be Arch obj
//if has proxy, might be Arch obj
Py::Object proxyObj = proxy->getValue();
@@ -243,7 +243,7 @@ bool DrawGuiUtil::isArchSection(App::DocumentObject* obj)
bool result = false;
App::PropertyPythonObject* proxy = dynamic_cast<App::PropertyPythonObject*>(obj->getPropertyByName("Proxy"));
if (proxy != nullptr) {
if (proxy) {
//if no proxy, can not be Arch obj
//if has proxy, might be Arch obj
Py::Object proxyObj = proxy->getValue();