diff options
author | Zufu Liu <unknown> | 2020-02-09 09:19:56 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2020-02-09 09:19:56 +1100 |
commit | eea3df558f3293ebedc7b88773e0706cdae23972 (patch) | |
tree | ae7d41ffe130b0e1c1fb2b31071e0cfbf4f79282 /win32/PlatWin.cxx | |
parent | 7b35a02b461847b7d6260dc9e6a988651d8a290b (diff) | |
download | scintilla-mirror-eea3df558f3293ebedc7b88773e0706cdae23972.tar.gz |
Feature [feature-requests:#1340] Move and use Point functions to avoid casting.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 348cbb255..2c537d766 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -622,7 +622,7 @@ void SurfaceGDI::Polygon(Point *pts, size_t npts, ColourDesired fore, ColourDesi BrushColour(back); std::vector<POINT> outline; for (size_t i=0; i<npts; i++) { - POINT pt = {static_cast<LONG>(pts[i].x), static_cast<LONG>(pts[i].y)}; + POINT pt = POINTFromPoint(pts[i]); outline.push_back(pt); } ::Polygon(hdc, &outline[0], static_cast<int>(npts)); @@ -2474,9 +2474,9 @@ void ListBoxX::Create(Window &parent_, int ctrlID_, Point location_, int lineHei hinstanceParent, this); - POINT locationw = {static_cast<LONG>(location.x), static_cast<LONG>(location.y)}; + POINT locationw = POINTFromPoint(location); ::MapWindowPoints(hwndParent, NULL, &locationw, 1); - location = Point::FromInts(locationw.x, locationw.y); + location = PointFromPOINT(locationw); } void ListBoxX::SetFont(Font &font) { @@ -2799,7 +2799,7 @@ void ListBoxX::ResizeToCursor() { PRectangle rc = GetPosition(); POINT ptw; ::GetCursorPos(&ptw); - const Point pt = Point::FromInts(ptw.x, ptw.y) + dragOffset; + const Point pt = PointFromPOINT(ptw) + dragOffset; switch (resizeHit) { case HTLEFT: |