Codechange: Use auto type when sorting dates (#11175)

This commit is contained in:
Tyler Trahan
2023-08-11 08:18:32 -04:00
committed by GitHub
parent 6f057cbe6a
commit 93069066f9
3 changed files with 6 additions and 6 deletions

View File

@@ -1360,7 +1360,7 @@ static bool VehicleNameSorter(const Vehicle * const &a, const Vehicle * const &b
/** Sort vehicles by their age */
static bool VehicleAgeSorter(const Vehicle * const &a, const Vehicle * const &b)
{
int r = a->age - b->age;
auto r = a->age - b->age;
return (r != 0) ? r < 0 : VehicleNumberSorter(a, b);
}