MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / orderByName

Function orderByName

src/OpenLoco/src/Ui/Windows/StationWindow.cpp:883–900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

881 }
882
883 static bool orderByName(const VehicleHead& lhs, const VehicleHead& rhs)
884 {
885 char lhsString[256] = { 0 };
886 {
887 FormatArguments lhsArgs{};
888 lhsArgs.push(lhs.ordinalNumber);
889 StringManager::formatString(lhsString, lhs.name, lhsArgs);
890 }
891
892 char rhsString[256] = { 0 };
893 {
894 FormatArguments rhsArgs{};
895 rhsArgs.push(rhs.ordinalNumber);
896 StringManager::formatString(rhsString, rhs.name, rhsArgs);
897 }
898
899 return Utility::strlogicalcmp(lhsString, rhsString) < 0;
900 }
901
902 static void sortVehicleList(Window& self)
903 {

Callers 1

sortVehicleListFunction · 0.70

Calls 3

formatStringFunction · 0.85
strlogicalcmpFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected