Avoid calling Object_isA from inside Vector_isConsistent

This commit is contained in:
Benny Baumann
2020-11-17 01:27:27 +01:00
committed by BenBE
parent 307c34b028
commit a94fd87b05
3 changed files with 8 additions and 11 deletions

View File

@ -21,13 +21,10 @@ bool Object_isA(const Object* o, const ObjectClass* klass) {
if (!o)
return false;
const ObjectClass* type = o->klass;
while (type) {
for (const ObjectClass* type = o->klass; type; type = type->extends) {
if (type == klass) {
return true;
}
type = type->extends;
}
return false;