aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-01 13:47:01 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-01 13:47:01 +1000
commitcbaf771bba7302c98ec5dc8a6374b9a4d59351ff (patch)
tree1d35a2153b9bb0a374821f93861d0cbce0419aeb /win32/ScintillaWin.cxx
parent2d0860ae4620af68d33a1691bf48cdb45d6b14c6 (diff)
downloadscintilla-mirror-cbaf771bba7302c98ec5dc8a6374b9a4d59351ff.tar.gz
Backport: Use RectFromPRectangle to avoid casts.
Backport of changeset 6770:c14d2ee02108.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 51d462659..655d99464 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) {