Codechange: Use enum class for setting values (#15074)

This commit is contained in:
Tyler Trahan
2026-01-10 17:40:48 -05:00
committed by GitHub
parent 6a06a76b5d
commit 18f2f7eb2d
29 changed files with 175 additions and 178 deletions
+4 -5
View File
@@ -588,9 +588,8 @@ static void UpdateClientConfigValues()
/**
* Callback for when the player changes the timekeeping units.
* @param Unused.
*/
static void ChangeTimekeepingUnits(int32_t)
static void ChangeTimekeepingUnits()
{
/* If service intervals are in time units (calendar days or real-world minutes), reset them to the correct defaults. */
if (!_settings_client.company.vehicle.servint_ispercent) {
@@ -657,9 +656,9 @@ static void ChangeMinutesPerYear(int32_t new_value)
* This can only happen in the menu, since the pre_cb ensures this setting can only be changed there, or if we're already using wallclock units.
*/
if (_game_mode == GM_MENU && (_settings_newgame.economy.minutes_per_calendar_year != CalendarTime::DEF_MINUTES_PER_YEAR)) {
if (_settings_newgame.economy.timekeeping_units != TKU_WALLCLOCK) {
_settings_newgame.economy.timekeeping_units = TKU_WALLCLOCK;
ChangeTimekeepingUnits(TKU_WALLCLOCK);
if (_settings_newgame.economy.timekeeping_units != TimekeepingUnits::Wallclock) {
_settings_newgame.economy.timekeeping_units = TimekeepingUnits::Wallclock;
ChangeTimekeepingUnits();
}
}
}