diff options
Diffstat (limited to 'c/win.cpp')
-rw-r--r-- | c/win.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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) { |