Codechange: use TimerGameCalendar::Year and friends when working with years (#11188)

This commit is contained in:
Patric Stout
2023-08-12 16:02:31 +02:00
committed by GitHub
parent 01f55eb734
commit b7acf9e50e
8 changed files with 13 additions and 13 deletions

View File

@@ -987,7 +987,7 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_START_DATE_TEXT:
this->SetWidgetDirty(WID_GL_START_DATE_TEXT);
_settings_newgame.game_creation.starting_year = Clamp(value, MIN_YEAR, MAX_YEAR);
_settings_newgame.game_creation.starting_year = Clamp(TimerGameCalendar::Year(value), MIN_YEAR, MAX_YEAR);
break;
case WID_GL_SNOW_COVERAGE_TEXT:
@@ -1258,7 +1258,7 @@ struct CreateScenarioWindow : public Window
switch (this->widget_id) {
case WID_CS_START_DATE_TEXT:
this->SetWidgetDirty(WID_CS_START_DATE_TEXT);
_settings_newgame.game_creation.starting_year = Clamp(value, MIN_YEAR, MAX_YEAR);
_settings_newgame.game_creation.starting_year = Clamp(TimerGameCalendar::Year(value), MIN_YEAR, MAX_YEAR);
break;
case WID_CS_FLAT_LAND_HEIGHT_TEXT: