| 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 | { |
no test coverage detected