aboutsummaryrefslogtreecommitdiff
path: root/c/win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/win.cpp')
-rw-r--r--c/win.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/c/win.cpp b/c/win.cpp
index 703c011..a120f96 100644
--- a/c/win.cpp
+++ b/c/win.cpp
@@ -3,8 +3,11 @@
#include "win.h"
-Win32Error::Win32Error() : code(GetLastError()) {}
-Win32Error::Win32Error(const DWORD code) : code(code) {}
+Win32Error::Win32Error() noexcept
+ : code(GetLastError()) {}
+
+Win32Error::Win32Error(const DWORD code) noexcept
+ : code(code) {}
Win32Error::~Win32Error()
{
@@ -40,14 +43,15 @@ const wchar_t* Win32Error::What() const noexcept
return m_wszMsg;
}
-std::optional<Library> Library::Maybe(const wchar_t* const lib)
+std::optional<Library> Library::Maybe(const wchar_t* const lib) noexcept
{
HMODULE hModule = LoadLibrary(lib);
if (!hModule) return {};
return Library(hModule);
}
-Library::Library(const HMODULE hModule) : m_hModule(hModule) {}
+Library::Library(const HMODULE hModule) noexcept
+ : m_hModule(hModule) {}
Library::Library(const wchar_t* const lib)
{