aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-03-18 19:22:38 +1100
committerNeil <nyamatongwe@gmail.com>2019-03-18 19:22:38 +1100
commit7e4bd49b1315de495ad37ed7d19897abdcf44b94 (patch)
tree8737893d8ce56a276bd673d4d236ed2ab66f3b9a /win32/PlatWin.cxx
parent0bc5b663b3166f562053413ce9381ad481e68a99 (diff)
downloadscintilla-mirror-7e4bd49b1315de495ad37ed7d19897abdcf44b94.tar.gz
Backport: Add some operators to Point to simplify client code.
Backport of changeset 7321:d488340e94c0.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 1c937a194..20fcdbfd4 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -2385,9 +2385,7 @@ void ListBoxX::ResizeToCursor() {
PRectangle rc = GetPosition();
POINT ptw;
::GetCursorPos(&ptw);
- Point pt = Point::FromInts(ptw.x, ptw.y);
- pt.x += dragOffset.x;
- pt.y += dragOffset.y;
+ const Point pt = Point::FromInts(ptw.x, ptw.y) + dragOffset;
switch (resizeHit) {
case HTLEFT: