From 7eb5e99cacc31f442d8c806afba5ab2d143b9656 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 2 May 2022 19:52:27 +0100 Subject: [PATCH] Don't use array of a single POINT in wxMSW wxDC code No real changes, just use a simple POINT rather than POINT[1]. --- src/msw/dc.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 64650e1e00..2633223bd2 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -2196,20 +2196,20 @@ void wxMSWDCImpl::SetDeviceOrigin(wxCoord x, wxCoord y) wxPoint wxMSWDCImpl::DeviceToLogical(wxCoord x, wxCoord y) const { - POINT p[1]; - p[0].x = x; - p[0].y = y; - ::DPtoLP(GetHdc(), p, WXSIZEOF(p)); - return wxPoint(XDEV2LOG(p[0].x), YDEV2LOG(p[0].y)); + POINT p; + p.x = x; + p.y = y; + ::DPtoLP(GetHdc(), &p, 1); + return wxPoint(XDEV2LOG(p.x), YDEV2LOG(p.y)); } wxPoint wxMSWDCImpl::LogicalToDevice(wxCoord x, wxCoord y) const { - POINT p[1]; - p[0].x = x; - p[0].y = y; - ::LPtoDP(GetHdc(), p, WXSIZEOF(p)); - return wxPoint(p[0].x + m_deviceOriginX, p[0].y + m_deviceOriginY); + POINT p; + p.x = x; + p.y = y; + ::LPtoDP(GetHdc(), &p, 1); + return wxPoint(p.x + m_deviceOriginX, p.y + m_deviceOriginY); } wxSize wxMSWDCImpl::DeviceToLogicalRel(int x, int y) const