summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-07-27 14:46:33 +0000
committerrubidium <rubidium@openttd.org>2013-07-27 14:46:33 +0000
commit184e7744c3a7b007e26599cdaacb9d714b9109c8 (patch)
tree15ec081c6bf71cff5d84459ed29b060bb34c07cb
parent6ca7a444070996e27ae19961b76d52a74f82425c (diff)
downloadopenttd-184e7744c3a7b007e26599cdaacb9d714b9109c8.tar.xz
(svn r25630) -Fix [FS#5666]: city list sort of population and rating are reversed compared to the icon
-rw-r--r--src/town_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index d0a82d0d1..1ac6fd4f9 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -692,7 +692,7 @@ private:
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 @@ private:
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;
}