From c095018183f100e044ee749aa5b99ac913b7637b Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 20 Feb 2025 08:28:27 +1100 Subject: Move SizeOfRect to header to allow use in ScintillaWin.cxx where it simplifies and avoids type warnings. --- win32/PlatWin.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'win32/PlatWin.h') diff --git a/win32/PlatWin.h b/win32/PlatWin.h index 192bdf6a7..86022a0cd 100644 --- a/win32/PlatWin.h +++ b/win32/PlatWin.h @@ -32,6 +32,10 @@ constexpr Point PointFromPOINT(POINT pt) noexcept { return Point::FromInts(pt.x, pt.y); } +constexpr SIZE SizeOfRect(RECT rc) noexcept { + return { rc.right - rc.left, rc.bottom - rc.top }; +} + constexpr HWND HwndFromWindowID(WindowID wid) noexcept { return static_cast(wid); } -- cgit v1.2.3