mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
incidental simplification
This commit is contained in:
@@ -86,19 +86,10 @@ namespace BlackMisc
|
||||
*/
|
||||
void CAirportList::removeIfOutsideRange(const Geo::CCoordinateGeodetic &position, const CLength &maxDistance, bool updateValues)
|
||||
{
|
||||
CLength d;
|
||||
for (CAirportList::iterator i = begin(); i != end();)
|
||||
this->removeIf([ & ](CAirport &airport)
|
||||
{
|
||||
d = i->calculcateDistanceAndBearingToPlane(position, updateValues);
|
||||
if (maxDistance < d)
|
||||
{
|
||||
i = this->erase(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
++i;
|
||||
}
|
||||
}
|
||||
return airport.calculcateDistanceAndBearingToPlane(position, updateValues) > maxDistance;
|
||||
});
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user