aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx7
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();