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

Function find_root_unit

src/resource/unit_compiler.cpp:697–709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695 }
696
697 static Unit *find_root_unit(UnitCompiler &c, u32 root_unit_index)
698 {
699 auto cur = hash_map::begin(c._units);
700 auto end = hash_map::end(c._units);
701 for (; cur != end; ++cur) {
702 HASH_MAP_SKIP_HOLE(c._units, cur);
703
704 if (cur->second->_index == root_unit_index)
705 return cur->second;
706 }
707
708 return NULL;
709 }
710
711 static Unit *find_unit_by_index(Unit *unit, u32 unit_index)
712 {

Callers 1

find_unit_indexFunction · 0.85

Calls 2

beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected