1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

Codechange: Declare all IntervalTimers const, which can be const.

This commit is contained in:
frosch
2025-04-27 17:09:01 +02:00
committed by frosch
parent 61cec33be2
commit 0d5b3ebd7f
37 changed files with 60 additions and 60 deletions

View File

@@ -3068,7 +3068,7 @@ void CallWindowRealtimeTickEvent(uint delta_ms)
}
/** Update various of window-related information on a regular interval. */
static IntervalTimer<TimerWindow> window_interval(std::chrono::milliseconds(30), [](auto) {
static const IntervalTimer<TimerWindow> window_interval(std::chrono::milliseconds(30), [](auto) {
extern int _caret_timer;
_caret_timer += 3;
CursorTick();
@@ -3079,12 +3079,12 @@ static IntervalTimer<TimerWindow> window_interval(std::chrono::milliseconds(30),
});
/** Blink the window highlight colour constantly. */
static IntervalTimer<TimerWindow> highlight_interval(std::chrono::milliseconds(450), [](auto) {
static const IntervalTimer<TimerWindow> highlight_interval(std::chrono::milliseconds(450), [](auto) {
_window_highlight_colour = !_window_highlight_colour;
});
/** Blink all windows marked with a white border. */
static IntervalTimer<TimerWindow> white_border_interval(std::chrono::milliseconds(30), [](auto) {
static const IntervalTimer<TimerWindow> white_border_interval(std::chrono::milliseconds(30), [](auto) {
if (_network_dedicated) return;
for (Window *w : Window::Iterate()) {