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

@@ -44,7 +44,7 @@ PyObject* BaseClassPy::isDerivedFrom(PyObject* args)
}
Base::Type type = Base::Type::fromName(name);
bool valid = (type != Base::Type::badType() && getBaseClassPtr()->isDerivedFrom(type));
bool valid = (!type.isBad() && getBaseClassPtr()->isDerivedFrom(type));
return PyBool_FromLong(valid ? 1 : 0);
}