diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-28 08:59:22 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-28 08:59:22 +1000 |
commit | efb4029eb0176c24095e72904fb808289476520c (patch) | |
tree | d3941a31fc5f4b3e104171dcff9e78c148dbf611 | |
parent | 8be9093b44cb988c477a3ef3b32e84eab2218600 (diff) | |
download | scintilla-mirror-efb4029eb0176c24095e72904fb808289476520c.tar.gz |
Initialize timers in definition instead of looping to avoid cast and warning.
-rw-r--r-- | win32/ScintillaWin.cxx | 5 |
1 files changed, 1 insertions, 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<TickReason>(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)); |