Core: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:38:48 +02:00
parent 6d8fb68f3b
commit 773c701eec
31 changed files with 110 additions and 110 deletions

View File

@@ -62,7 +62,7 @@ using ExtensionPython = ExtensionPythonT<App::Extension>;
Py::Object result;\
try {\
Property* proxy = this->getExtendedContainer()->getPropertyByName("Proxy");\
if (proxy && proxy->getTypeId() == PropertyPythonObject::getClassTypeId()) {\
if (proxy && proxy->is<PropertyPythonObject>()) {\
Py::Object feature = static_cast<PropertyPythonObject*>(proxy)->getValue();\
if (feature.hasAttr(std::string("function"))) {\
if (feature.hasAttr("__object__")) {\