Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/release-windows.yml # src/company_base.h # src/company_cmd.cpp # src/company_gui.cpp # src/console_cmds.cpp # src/economy.cpp # src/economy_cmd.h # src/fios.h # src/goal.cpp # src/group_gui.cpp # src/network/core/config.h # src/network/network_admin.cpp # src/newgrf_config.cpp # src/os/windows/win32.cpp # src/saveload/afterload.cpp # src/saveload/company_sl.cpp # src/saveload/saveload.cpp # src/saveload/saveload_error.hpp # src/settings_gui.cpp # src/ship_cmd.cpp # src/stdafx.h # src/story.cpp # src/story_base.h # src/string.cpp # src/table/settings/economy_settings.ini # src/tests/CMakeLists.txt # src/tests/math_func.cpp
This commit is contained in:
@@ -674,7 +674,7 @@ static DropDownList GetGroupDropDownList(Owner owner, GroupID group_id, int &sel
|
||||
/** Sort slots by their name */
|
||||
static bool SlotNameSorter(const TraceRestrictSlot * const &a, const TraceRestrictSlot * const &b)
|
||||
{
|
||||
int r = strnatcmp(a->name.c_str(), b->name.c_str()); // Sort by name (natural sorting).
|
||||
int r = StrNaturalCompare(a->name, b->name); // Sort by name (natural sorting).
|
||||
if (r == 0) return a->index < b->index;
|
||||
return r < 0;
|
||||
}
|
||||
@@ -734,7 +734,7 @@ DropDownList GetSlotDropDownList(Owner owner, TraceRestrictSlotID slot_id, int &
|
||||
/** Sort counters by their name */
|
||||
static bool CounterNameSorter(const TraceRestrictCounter * const &a, const TraceRestrictCounter * const &b)
|
||||
{
|
||||
int r = strnatcmp(a->name.c_str(), b->name.c_str()); // Sort by name (natural sorting).
|
||||
int r = StrNaturalCompare(a->name, b->name); // Sort by name (natural sorting).
|
||||
if (r == 0) return a->index < b->index;
|
||||
return r < 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user