aboutsummaryrefslogtreecommitdiff
path: root/c/win.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-17 02:33:26 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-17 02:33:26 +0200
commitbd857d24443b8c8f5d2f58047c3f8ac5f058acea (patch)
tree0ef5f3c9abf5ccd6ee6a9e376ceac985de2409fd /c/win.h
parent8351d4c42c76584415e02a40d41f497a8f042c72 (diff)
downloadEpisodeBrowser-bd857d24443b8c8f5d2f58047c3f8ac5f058acea.tar.gz
Make FileView more type-safe.
Diffstat (limited to 'c/win.h')
-rw-r--r--c/win.h4
1 files changed, 2 insertions, 2 deletions
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 <typename T>
inline T Require(const T x)
{
- if (!x) throw Win32Error();
+ if (!x) throw Win32Error{};
return x;
}
@@ -62,7 +62,7 @@ template <typename T>
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;