mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 03:12:41 +01:00
Codechange: Declare all IntervalTimers const, which can be const.
This commit is contained in:
@@ -2104,7 +2104,7 @@ struct MainToolbarWindow : Window {
|
||||
}
|
||||
|
||||
/** Refresh the state of pause / game-speed on a regular interval.*/
|
||||
IntervalTimer<TimerWindow> refresh_interval = {std::chrono::milliseconds(30), [this](auto) {
|
||||
const IntervalTimer<TimerWindow> refresh_interval = {std::chrono::milliseconds(30), [this](auto) {
|
||||
if (this->IsWidgetLowered(WID_TN_PAUSE) != _pause_mode.Any()) {
|
||||
this->ToggleWidgetLoweredState(WID_TN_PAUSE);
|
||||
this->SetWidgetDirty(WID_TN_PAUSE);
|
||||
@@ -2471,7 +2471,7 @@ struct ScenarioEditorToolbarWindow : Window {
|
||||
}
|
||||
|
||||
/** Refresh the state of pause / game-speed on a regular interval.*/
|
||||
IntervalTimer<TimerWindow> refresh_interval = {std::chrono::milliseconds(30), [this](auto) {
|
||||
const IntervalTimer<TimerWindow> refresh_interval = {std::chrono::milliseconds(30), [this](auto) {
|
||||
if (this->IsWidgetLowered(WID_TE_PAUSE) != _pause_mode.Any()) {
|
||||
this->ToggleWidgetLoweredState(WID_TE_PAUSE);
|
||||
this->SetDirty();
|
||||
|
||||
Reference in New Issue
Block a user