Base: Use isBad() instead of comparing types with ==

This commit is contained in:
Benjamin Nauck
2025-02-13 20:24:25 +01:00
parent 51613a5b56
commit 7186b8a88f
3 changed files with 6 additions and 6 deletions

View File

@@ -122,7 +122,7 @@ PyObject* TypePy::isDerivedFrom(PyObject* args)
return nullptr;
} while (false);
bool val = (type != Base::Type::badType() && getBaseTypePtr()->isDerivedFrom(type));
bool val = (!type.isBad() && getBaseTypePtr()->isDerivedFrom(type));
return PyBool_FromLong(val ? 1 : 0);
}