diff options
author | SamuXarick <43006711+SamuXarick@users.noreply.github.com> | 2021-02-05 10:00:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 11:00:36 +0100 |
commit | a4035af3375825ae277f1363c5d814ee55b92d7c (patch) | |
tree | 7622810853ec1810ca8c5842ba7d93cf770a439c /src/station_cmd.cpp | |
parent | 5b3fe4ae2741ef014b1a41a21c146d56c7408d6e (diff) | |
download | openttd-a4035af3375825ae277f1363c5d814ee55b92d7c.tar.xz |
Codechange: Apply coding style (#8640)
* Fix: Missing or needed spaces
* Codechange: Remove space
* Codechange: Remove space
* Codechange: More missing spaces
* Codechange: Missing spaces
* Codechange: Remove space
* Codechange: Remove space
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 7bd124f06..4077a7b8c 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -4036,7 +4036,7 @@ uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, Sourc first_station = st; continue; } - if (used_stations.empty()) { + if (used_stations.empty()) { used_stations.reserve(2); used_stations.emplace_back(std::make_pair(first_station, 0)); } @@ -4081,9 +4081,9 @@ uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, Sourc moving += p.second; } - /* If there is some cargo left due to rounding issues distribute it among the best rated stations. */ + /* If there is some cargo left due to rounding issues distribute it among the best rated stations. */ if (amount > moving) { - std::sort(used_stations.begin(), used_stations.end(), [type] (const StationInfo &a, const StationInfo &b) { + std::sort(used_stations.begin(), used_stations.end(), [type](const StationInfo &a, const StationInfo &b) { return b.first->goods[type].rating < a.first->goods[type].rating; }); |