Mercurial > hg > openttd
changeset 20674:fd8bbbfb79a6 draft
(svn r25630) -Fix [FS#5666]: city list sort of population and rating are reversed compared to the icon
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 27 Jul 2013 14:46:33 +0000 |
parents | 92d966e1fb08 |
children | 63f66b340b9a |
files | src/town_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -692,7 +692,7 @@ uint32 a_population = (*a)->cache.population; uint32 b_population = (*b)->cache.population; 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 */ @@ -706,7 +706,7 @@ int16 a_rating = (*a)->ratings[_local_company]; int16 b_rating = (*b)->ratings[_local_company]; 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; }