From cd711d67a5a82144ef27ffd8d247be2f635814e9 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 28 Apr 2018 08:59:22 +1000 Subject: Backport:Initialize timers in definition instead of looping to avoid cast and warning. Backport of changeset 6753:2950b9c35ecc. --- win32/ScintillaWin.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 2cdec07d7..d35884dd9 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