diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-01 13:47:01 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-01 13:47:01 +1000 |
commit | 6065b35281afe152b61d346850bbcdd8e26419ee (patch) | |
tree | b38d6144827db68adbdc61ffee5c64a1caaa590a /win32/ScintillaWin.cxx | |
parent | 305b903fe092c08d2873785d1e2638cbfbe831ab (diff) | |
download | scintilla-mirror-6065b35281afe152b61d346850bbcdd8e26419ee.tar.gz |
Use RectFromPRectangle to avoid casts.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 34302b3fc..4335c1164 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -702,8 +702,8 @@ bool BoundsContains(PRectangle rcBounds, HRGN hRgnBounds, PRectangle rcCheck) { contains = false; } else if (hRgnBounds) { // In bounding rectangle so check more accurately using region - HRGN hRgnCheck = ::CreateRectRgn(static_cast<int>(rcCheck.left), static_cast<int>(rcCheck.top), - static_cast<int>(rcCheck.right), static_cast<int>(rcCheck.bottom)); + const RECT rcw = RectFromPRectangle(rcCheck); + HRGN hRgnCheck = ::CreateRectRgnIndirect(&rcw); if (hRgnCheck) { HRGN hRgnDifference = ::CreateRectRgn(0, 0, 0, 0); if (hRgnDifference) { |