Codechange: Replace magic value with a variable (#11980)

This commit is contained in:
dP
2024-02-04 16:15:24 +05:30
committed by GitHub
parent 2fd9096070
commit ff618230fe

View File

@@ -1122,7 +1122,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
int i = 0; int i = 0;
for (const CargoSpec *cs : _sorted_standard_cargo_specs) { for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
this->colours[i] = cs->legend_colour; this->colours[i] = cs->legend_colour;
for (uint j = 0; j != 20; j++) { for (uint j = 0; j != this->num_on_x_axis; j++) {
this->cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 4 + 4, cs->Index()); this->cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 4 + 4, cs->Index());
} }
i++; i++;