Codechange: Remove FOR_EACH_SET_CARGO_ID

This commit is contained in:
glx22
2021-06-13 04:29:24 +02:00
committed by Loïc Guilloux
parent 89ab8b79a5
commit a543a4b7bb
5 changed files with 9 additions and 15 deletions

View File

@@ -273,8 +273,7 @@ protected:
{
int diff = 0;
CargoID j;
FOR_EACH_SET_CARGO_ID(j, cargo_filter) {
for (CargoID j : SetCargoBitIterator(cargo_filter)) {
diff += a->goods[j].cargo.TotalCount() - b->goods[j].cargo.TotalCount();
}
@@ -286,8 +285,7 @@ protected:
{
int diff = 0;
CargoID j;
FOR_EACH_SET_CARGO_ID(j, cargo_filter) {
for (CargoID j : SetCargoBitIterator(cargo_filter)) {
diff += a->goods[j].cargo.AvailableCount() - b->goods[j].cargo.AvailableCount();
}
@@ -300,8 +298,7 @@ protected:
byte maxr1 = 0;
byte maxr2 = 0;
CargoID j;
FOR_EACH_SET_CARGO_ID(j, cargo_filter) {
for (CargoID j : SetCargoBitIterator(cargo_filter)) {
if (a->goods[j].HasRating()) maxr1 = std::max(maxr1, a->goods[j].rating);
if (b->goods[j].HasRating()) maxr2 = std::max(maxr2, b->goods[j].rating);
}