diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-02-24 20:45:08 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-02-24 20:45:08 +1100 |
| commit | dab226a2a216856558a69978deab91da0242eeea (patch) | |
| tree | 71b471b14ebec3da7f4cb15f5a9558e82c022e0b /win32/PlatWin.h | |
| parent | 552fb98d044c35ddeb3402539d0219b584ed484f (diff) | |
| download | scintilla-mirror-dab226a2a216856558a69978deab91da0242eeea.tar.gz | |
Use noexcept and constexpr where possible and reasonable.
Diffstat (limited to 'win32/PlatWin.h')
| -rw-r--r-- | win32/PlatWin.h | 6 |
1 files changed, 5 insertions, 1 deletions
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<LONG>(prc.left), static_cast<LONG>(prc.top), + static_cast<LONG>(prc.right), static_cast<LONG>(prc.bottom) }; + return rc; +} #if defined(USE_D2D) extern bool LoadD2D(); |
