* Find the region containing this location. * @param lon The longtitude. * @param lat The latitude. * @return Pointer to the region, or 0. */
| 1540 | * @return Pointer to the region, or 0. |
| 1541 | */ |
| 1542 | Region *SavedGame::locateRegion(double lon, double lat) const |
| 1543 | { |
| 1544 | std::vector<Region *>::const_iterator found = std::find_if(_regions.begin(), _regions.end(), ContainsPoint(lon, lat)); |
| 1545 | if (found != _regions.end()) |
| 1546 | { |
| 1547 | return *found; |
| 1548 | } |
| 1549 | return 0; |
| 1550 | } |
| 1551 | |
| 1552 | /** |
| 1553 | * Find the region containing this target. |
no test coverage detected