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

This commit is contained in:
Benjamin Nauck
2025-02-13 20:34:22 +01:00
parent a9828d6fea
commit 69ffc443d6

View File

@@ -54,7 +54,7 @@ App::PropertyData App::Extension::propertyData;
void App::Extension::init()
{
assert(Extension::classTypeId == Base::Type::badType() && "don't init() twice!");
assert(Extension::classTypeId.isBad() && "don't init() twice!");
/* Set up entry in the type system. */
Extension::classTypeId =
@@ -187,11 +187,11 @@ void Extension::initExtensionSubclass(Base::Type& toInit,
Base::Type::instantiationMethod method)
{
// don't init twice!
assert(toInit == Base::Type::badType());
assert(toInit.isBad());
// get the parent class
Base::Type parentType(Base::Type::fromName(ParentName));
// forgot init parent!
assert(parentType != Base::Type::badType());
assert(!parentType.isBad());
// create the new type
toInit = Base::Type::createType(parentType, ClassName, method);