* Return the ID (if ever available) of a previously inserted entity. * @param grf_local_id ID of this entity within the grfID * @param grfid ID of the grf file * @return the ID of the candidate, of the Invalid flag item ID */
| 89 | * @return the ID of the candidate, of the Invalid flag item ID |
| 90 | */ |
| 91 | uint16_t OverrideManagerBase::GetID(uint16_t grf_local_id, uint32_t grfid) const |
| 92 | { |
| 93 | for (uint16_t id = 0; id < this->max_entities; id++) { |
| 94 | const EntityIDMapping *map = &this->mappings[id]; |
| 95 | if (map->entity_id == grf_local_id && map->grfid == grfid) { |
| 96 | return id; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | return this->invalid_id; |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Reserves a place in the mapping array for an entity to be installed |
no outgoing calls
no test coverage detected