MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / removeMission

Method removeMission

src/Savegame/AlienStrategy.cpp:149–160  ·  view source on GitHub ↗

* Remove @a mission from the list of possible missions for @a region. * @param region The region id. * @param mission The mission id. * @return If there are no more regions with missions available. */

Source from the content-addressed store, hash-verified

147 * @return If there are no more regions with missions available.
148 */
149bool AlienStrategy::removeMission(const std::string &region, const std::string &mission)
150{
151 MissionsByRegion::iterator found = _regionMissions.find(region);
152 assert(found != _regionMissions.end());
153 found->second->set(mission, 0);
154 if (found->second->empty())
155 {
156 _regionMissions.erase(found);
157 _regionChances.set(region, 0);
158 }
159 return _regionMissions.empty();
160}
161
162}

Callers 1

Calls 2

setMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected