aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-08-09 13:55:11 +1000
committerNeil <nyamatongwe@gmail.com>2018-08-09 13:55:11 +1000
commit87f0182accdfb092f97f6d1560412931406ab2e1 (patch)
tree06d2ccbc24209203945bbaf69033d244645cfeb8
parent00c3ac5f5441fd25180b49672a2bb6a3e8ede121 (diff)
downloadscintilla-mirror-87f0182accdfb092f97f6d1560412931406ab2e1.tar.gz
Backport: Avoid some casts.
Backport of changeset 7072:557c1fa29581.
-rw-r--r--win32/ScintillaWin.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 3f1fe7271..f81c89173 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1729,8 +1729,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
@@ -1742,7 +1743,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();