mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Avoid calling Object_isA from inside Vector_isConsistent
This commit is contained in:
5
Object.c
5
Object.c
@ -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;
|
||||
|
Reference in New Issue
Block a user