From dab226a2a216856558a69978deab91da0242eeea Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 24 Feb 2019 20:45:08 +1100 Subject: Use noexcept and constexpr where possible and reasonable. --- win32/PlatWin.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'win32/PlatWin.h') diff --git a/win32/PlatWin.h b/win32/PlatWin.h index cf357f72d..62b87fa3c 100644 --- a/win32/PlatWin.h +++ b/win32/PlatWin.h @@ -13,7 +13,11 @@ namespace Scintilla { extern void Platform_Initialise(void *hInstance); extern void Platform_Finalise(bool fromDllMain); -RECT RectFromPRectangle(PRectangle prc) noexcept; +constexpr RECT RectFromPRectangle(PRectangle prc) noexcept { + RECT rc = { static_cast(prc.left), static_cast(prc.top), + static_cast(prc.right), static_cast(prc.bottom) }; + return rc; +} #if defined(USE_D2D) extern bool LoadD2D(); -- cgit v1.2.3