Codechange: unify documentation and parameter names of sorters

This commit is contained in:
Rubidium
2026-02-11 04:53:39 +01:00
committed by rubidium42
parent 83f58b3fbd
commit 8e75626b49
20 changed files with 116 additions and 190 deletions
+2 -2
View File
@@ -190,7 +190,7 @@ std::array<uint8_t, NUM_CARGO> _sorted_cargo_types; ///< Sort order of cargoes b
std::vector<const CargoSpec *> _sorted_cargo_specs; ///< Cargo specifications sorted alphabetically by name.
std::span<const CargoSpec *> _sorted_standard_cargo_specs; ///< Standard cargo specifications sorted alphabetically by name.
/** Sort cargo specifications by their name. */
/** Sort cargo specifications by their name. @copydoc GUIList::Sorter */
static bool CargoSpecNameSorter(const CargoSpec * const &a, const CargoSpec * const &b)
{
std::string a_name = GetString(a->name);
@@ -202,7 +202,7 @@ static bool CargoSpecNameSorter(const CargoSpec * const &a, const CargoSpec * co
return (res != 0) ? res < 0 : (a->bitnum < b->bitnum);
}
/** Sort cargo specifications by their cargo class. */
/** Sort cargo specifications by their cargo class. @copydoc GUIList::Sorter */
static bool CargoSpecClassSorter(const CargoSpec * const &a, const CargoSpec * const &b)
{
int res = b->classes.Test(CargoClass::Passengers) - a->classes.Test(CargoClass::Passengers);