diff options
author | terkhen <terkhen@openttd.org> | 2010-11-27 22:52:12 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-11-27 22:52:12 +0000 |
commit | 75f86a7a21c6c6ea2e5067a5eb9a8690d8584ed1 (patch) | |
tree | 9795c8c24286ea191df003631d9cc6af4c30e2bd /src/build_vehicle_gui.cpp | |
parent | 4b944cb13e6d75662a9246bf06523a320d814ace (diff) | |
download | openttd-75f86a7a21c6c6ea2e5067a5eb9a8690d8584ed1.tar.xz |
(svn r21344) -Feature [FS#4214]: Natural sorting of strings using ICU.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r-- | src/build_vehicle_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 8b018261f..c25d43703 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -157,7 +157,7 @@ static int CDECL EngineNameSorter(const EngineID *a, const EngineID *b) GetString(last_name[1], STR_ENGINE_NAME, lastof(last_name[1])); } - int r = strcmp(last_name[0], last_name[1]); // sort by name + int r = strnatcmp(last_name[0], last_name[1]); // Sort by name (natural sorting). /* Use EngineID to sort instead since we want consistent sorting */ if (r == 0) return EngineNumberSorter(a, b); |