mirror of https://github.com/OpenTTD/OpenTTD
(svn r25630) -Fix [FS#5666]: city list sort of population and rating are reversed compared to the icon
parent
6ca7a44407
commit
184e7744c3
|
@ -692,7 +692,7 @@ private:
|
||||||
uint32 a_population = (*a)->cache.population;
|
uint32 a_population = (*a)->cache.population;
|
||||||
uint32 b_population = (*b)->cache.population;
|
uint32 b_population = (*b)->cache.population;
|
||||||
if (a_population == b_population) return TownDirectoryWindow::TownNameSorter(a, b);
|
if (a_population == b_population) return TownDirectoryWindow::TownNameSorter(a, b);
|
||||||
return (a_population > b_population) ? -1 : 1;
|
return (a_population < b_population) ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sort by town rating */
|
/** Sort by town rating */
|
||||||
|
@ -706,7 +706,7 @@ private:
|
||||||
int16 a_rating = (*a)->ratings[_local_company];
|
int16 a_rating = (*a)->ratings[_local_company];
|
||||||
int16 b_rating = (*b)->ratings[_local_company];
|
int16 b_rating = (*b)->ratings[_local_company];
|
||||||
if (a_rating == b_rating) return TownDirectoryWindow::TownNameSorter(a, b);
|
if (a_rating == b_rating) return TownDirectoryWindow::TownNameSorter(a, b);
|
||||||
return (a_rating > b_rating) ? -1 : 1;
|
return (a_rating < b_rating) ? -1 : 1;
|
||||||
}
|
}
|
||||||
return before;
|
return before;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue