MCPcopy Create free account
hub / github.com/crownengine/crown / find_unit

Function find_unit

src/resource/unit_compiler.cpp:771–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769 }
770
771 Unit *find_unit(UnitCompiler &c, u32 unit_index)
772 {
773 auto cur = hash_map::begin(c._units);
774 auto end = hash_map::end(c._units);
775 for (; cur != end; ++cur) {
776 HASH_MAP_SKIP_HOLE(c._units, cur);
777
778 Unit *unit = find_unit_by_index(cur->second, unit_index);
779 if (unit != NULL)
780 return unit;
781 }
782
783 return NULL;
784 }
785
786 s32 unit_has_component_type(bool &has_type, Unit *unit, StringId32 type)
787 {

Callers 2

joint_common_parseFunction · 0.85
compile_lod_groupFunction · 0.85

Calls 3

find_unit_by_indexFunction · 0.85
beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected