From bd857d24443b8c8f5d2f58047c3f8ac5f058acea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 17 Aug 2022 02:33:26 +0200 Subject: Make FileView more type-safe. --- c/win.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'c/win.h') diff --git a/c/win.h b/c/win.h index e9a6839..a77362f 100644 --- a/c/win.h +++ b/c/win.h @@ -53,7 +53,7 @@ T* Library::GetProcAddress(const char* const szProc) noexcept template inline T Require(const T x) { - if (!x) throw Win32Error(); + if (!x) throw Win32Error{}; return x; } @@ -62,7 +62,7 @@ template inline T Prefer(const T x) { if (!x) { - EBMessageBox(Win32Error().What(), L"System Error", MB_ICONWARNING); + EBMessageBox(Win32Error{}.What(), L"System Error", MB_ICONWARNING); return (T)0; } return x; -- cgit v1.2.3