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

Class matchRegionAndType

src/Savegame/SavedGame.cpp:1429–1443  ·  view source on GitHub ↗

@brief Match a mission based on region and type. * This function object will match alien missions based on region and type. */

Source from the content-addressed store, hash-verified

1427 * This function object will match alien missions based on region and type.
1428 */
1429class matchRegionAndType: public std::unary_function<AlienMission *, bool>
1430{
1431public:
1432 /// Store the region and type.
1433 matchRegionAndType(const std::string &region, const std::string &type) : _region(region), _type(type) { }
1434 /// Match against stored values.
1435 bool operator()(const AlienMission *mis) const
1436 {
1437 return mis->getRegion() == _region && mis->getType() == _type;
1438 }
1439private:
1440
1441 const std::string &_region;
1442 const std::string &_type;
1443};
1444
1445/**
1446 * Find a mission from the active alien missions.

Callers 1

getAlienMissionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected