| 1186 | } |
| 1187 | |
| 1188 | bool CargoSorter::SortCount(const CargoDataEntry &cd1, const CargoDataEntry &cd2) const |
| 1189 | { |
| 1190 | uint c1 = cd1.GetCount(); |
| 1191 | uint c2 = cd2.GetCount(); |
| 1192 | if (c1 == c2) { |
| 1193 | return this->SortStation(cd1.GetStation(), cd2.GetStation()); |
| 1194 | } else if (this->order == SO_ASCENDING) { |
| 1195 | return c1 < c2; |
| 1196 | } else { |
| 1197 | return c2 < c1; |
| 1198 | } |
| 1199 | } |
| 1200 | |
| 1201 | bool CargoSorter::SortStation(StationID st1, StationID st2) const |
| 1202 | { |
no test coverage detected