@@ -1022,7 +1022,7 @@ struct ClientForWare
10221022 : bld(bld), estimate(estimate), points(points)
10231023 {}
10241024
1025- bool operator <(const ClientForWare& b) const
1025+ bool operator <(const ClientForWare& b) const noexcept
10261026 {
10271027 // use estimate, points and object id (as tie breaker) for sorting
10281028 if (estimate != b.estimate )
@@ -1118,7 +1118,7 @@ noBaseBuilding* GamePlayer::FindClientForWare(const Ware& ware)
11181118 }
11191119
11201120 // sort our clients, highest score first
1121- std ::sort (possibleClients. begin (), possibleClients. end () );
1121+ helpers ::sort (possibleClients);
11221122
11231123 noBaseBuilding* lastBld = nullptr ;
11241124 noBaseBuilding* bestBld = nullptr ;
@@ -1903,7 +1903,7 @@ struct ShipForHarbor
19031903
19041904 ShipForHarbor (noShip* ship, uint32_t estimate) : ship(ship), estimate(estimate) {}
19051905
1906- bool operator <(const ShipForHarbor& b) const
1906+ bool operator <(const ShipForHarbor& b) const noexcept
19071907 {
19081908 return (estimate < b.estimate ) || (estimate == b.estimate && ship->GetObjId () < b.ship ->GetObjId ());
19091909 }
@@ -1934,7 +1934,7 @@ bool GamePlayer::OrderShip(nobHarborBuilding& hb)
19341934 }
19351935 }
19361936
1937- std ::sort (sfh. begin (), sfh. end () );
1937+ helpers ::sort (sfh);
19381938
19391939 noShip* best_ship = nullptr ;
19401940 uint32_t best_distance = std::numeric_limits<uint32_t >::max ();
@@ -2313,7 +2313,7 @@ void GamePlayer::Trade(nobBaseWarehouse* goalWh, const boost_variant2<GoodType,
23132313 const MapPoint goalFlagPos = goalWh->GetFlagPos ();
23142314
23152315 std::vector<nobBaseWarehouse*> whs (buildings.GetStorehouses ().begin (), buildings.GetStorehouses ().end ());
2316- std ::sort (whs. begin (), whs. end () , WarehouseDistanceComparator (*goalWh, world));
2316+ helpers ::sort (whs, WarehouseDistanceComparator (*goalWh, world));
23172317 TradePathCache& tradePathCache = world.GetTradePathCache ();
23182318 for (nobBaseWarehouse* wh : whs)
23192319 {
0 commit comments