MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / implicit_cast

Function implicit_cast

ogsr_engine/Luabind/src/implicit_cast.cpp:43–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 // problem, since the non-const function will not match at all.
42
43 int implicit_cast(
44 class_rep const* crep
45 , LUABIND_TYPE_INFO const& type_id
46 , int& pointer_offset)
47 {
48 int offset = 0;
49 if (LUABIND_TYPE_INFO_EQUAL(crep->type(), type_id)) return 0;
50
51 for (vector_class<class_rep::base_info>::const_iterator i =
52 crep->bases().begin(); i != crep->bases().end(); ++i)
53 {
54 int steps = implicit_cast(i->base, type_id, offset);
55 pointer_offset = offset + i->pointer_offset;
56 if (steps >= 0) return steps + 2;
57 }
58 pointer_offset = 0;
59 return -1;
60 }
61}}
62

Callers 7

convert_toMethod · 0.70
applyMethod · 0.50
matchMethod · 0.50
matchMethod · 0.50
matchMethod · 0.50
matchMethod · 0.50
matchMethod · 0.50

Calls 3

typeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected