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

Class MatchBaseCoordinates

src/Savegame/AlienMission.cpp:340–349  ·  view source on GitHub ↗

@brief Match a base from it's coordinates. * This function object uses coordinates to match a base. */

Source from the content-addressed store, hash-verified

338 * This function object uses coordinates to match a base.
339 */
340class MatchBaseCoordinates: public std::unary_function<const Base *, bool>
341{
342public:
343 /// Remember the query coordinates.
344 MatchBaseCoordinates(double lon, double lat) : _lon(lon), _lat(lat) { /* Empty by design. */ }
345 /// Match with base's coordinates.
346 bool operator()(const Base *base) const { return AreSame(base->getLongitude(), _lon) && AreSame(base->getLatitude(), _lat); }
347private:
348 double _lon, _lat;
349};
350
351/**
352 * This function is called when one of the mission's UFOs arrives at it's current destination.

Callers 1

ufoReachedWaypointMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected