From efb4029eb0176c24095e72904fb808289476520c Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 28 Apr 2018 08:59:22 +1000 Subject: Initialize timers in definition instead of looping to avoid cast and warning. --- win32/ScintillaWin.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index c1c54b5d1..b268f98c5 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -328,7 +328,7 @@ class ScintillaWin : bool ValidCodePage(int codePage) const override; sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override; bool SetIdle(bool on) override; - UINT_PTR timers[tickDwell+1]; + UINT_PTR timers[tickDwell+1] {}; bool FineTickerRunning(TickReason reason) override; void FineTickerStart(TickReason reason, int millis, int tolerance) override; void FineTickerCancel(TickReason reason) override; @@ -488,9 +488,6 @@ void ScintillaWin::Init() { SetCoalescableTimerFn = (SetCoalescableTimerSig)::GetProcAddress(user32, "SetCoalescableTimer"); } - for (TickReason tr = tickCaret; tr <= tickDwell; tr = static_cast(tr + 1)) { - timers[tr] = 0; - } vs.indicators[SC_INDICATOR_UNKNOWN] = Indicator(INDIC_HIDDEN, ColourDesired(0, 0, 0xff)); vs.indicators[SC_INDICATOR_INPUT] = Indicator(INDIC_DOTS, ColourDesired(0, 0, 0xff)); vs.indicators[SC_INDICATOR_CONVERTED] = Indicator(INDIC_COMPOSITIONTHICK, ColourDesired(0, 0, 0xff)); -- cgit v1.2.3