| 169 | } |
| 170 | |
| 171 | void CMapManager::RemoveMapLocation(const shared_str& spot_type, u16 id) |
| 172 | { |
| 173 | FindLocationBySpotID key(spot_type, id); |
| 174 | Locations_it it = std::find_if(Locations().begin(), Locations().end(), key); |
| 175 | if (it != Locations().end()) |
| 176 | { |
| 177 | if (1 == (*it).location->RefCount()) |
| 178 | { |
| 179 | delete_data(*it); |
| 180 | Locations().erase(it); |
| 181 | } |
| 182 | else |
| 183 | (*it).location->Release(); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | void CMapManager::RemoveMapLocationByObjectID(u16 id) // call on destroy object |
| 188 | { |
no test coverage detected