diff options
author | Neil <nyamatongwe@gmail.com> | 2018-08-09 13:55:11 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-08-09 13:55:11 +1000 |
commit | dd84c706e1fc913a7fc7837e1ba86bf24444ae6f (patch) | |
tree | 5087506fadfcf864aaa971fdde16dfa546b2e54b | |
parent | af1661c9742d3aed18da31614bdb755540baa80a (diff) | |
download | scintilla-mirror-dd84c706e1fc913a7fc7837e1ba86bf24444ae6f.tar.gz |
Avoid some casts.
-rw-r--r-- | win32/ScintillaWin.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index f9886318e..f7f1f7e2c 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1745,8 +1745,9 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam (wParam == SC_TECHNOLOGY_DIRECTWRITERETAIN) || (wParam == SC_TECHNOLOGY_DIRECTWRITEDC) || (wParam == SC_TECHNOLOGY_DIRECTWRITE)) { - if (technology != static_cast<int>(wParam)) { - if (static_cast<int>(wParam) > SC_TECHNOLOGY_DEFAULT) { + const int technologyNew = static_cast<int>(wParam); + if (technology != technologyNew) { + if (technologyNew > SC_TECHNOLOGY_DEFAULT) { #if defined(USE_D2D) if (!LoadD2D()) // Failed to load Direct2D or DirectWrite so no effect @@ -1760,7 +1761,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam #if defined(USE_D2D) DropRenderTarget(); #endif - technology = static_cast<int>(wParam); + technology = technologyNew; // Invalidate all cached information including layout. DropGraphics(true); InvalidateStyleRedraw(); |