Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement to use .base() means the conversion is still explicit.
This commit is contained in:
@@ -90,9 +90,9 @@ struct SetDateWindow : Window {
|
||||
case WID_SD_YEAR:
|
||||
for (TimerGameCalendar::Year i = this->min_year; i <= this->max_year; i++) {
|
||||
SetDParam(0, i);
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(STR_JUST_INT, static_cast<int32_t>(i), false));
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(STR_JUST_INT, i.base(), false));
|
||||
}
|
||||
selected = static_cast<int32_t>(this->date.year);
|
||||
selected = this->date.year.base();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user