MCPcopy Create free account
hub / github.com/DFHack/dfhack / is_direct_instance

Function is_direct_instance

library/include/DataDefs.h:470–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468 }
469
470 bool is_direct_instance(virtual_ptr instance_ptr) const {
471 if (!instance_ptr) return false;
472 auto vp = vtable_ptr();
473 return vp ? (vp == get_vtable(instance_ptr)) : (this == get(instance_ptr));
474 }
475
476 template<class P> static P get_vmethod_ptr(P selector);
477

Callers

nothing calls this directly

Calls 3

vtable_ptrFunction · 0.85
get_vtableFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected