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 | cd711d67a5a82144ef27ffd8d247be2f635814e9 (patch) | |
| tree | 4823e74213e35c16a3429c9e655985f1de4aff6c | |
| parent | 6b3a28e0c2c85f7ca3376ac406913e57ac1878b4 (diff) | |
| download | scintilla-mirror-cd711d67a5a82144ef27ffd8d247be2f635814e9.tar.gz | |
Backport:Initialize timers in definition instead of looping to avoid cast and warning.
Backport of changeset 6753:2950b9c35ecc.
| -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 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<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)); |
