aboutsummaryrefslogtreecommitdiff
path: root/c/win.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-04 16:26:27 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-04 17:25:01 +0200
commit2ac7d06a503b256b290678f5bba158bf7d219bdd (patch)
tree86abdf303f8a3059efbd040c6eae95accf5b432c /c/win.cpp
parent407b6cab4093b3c0ee23412ac07cf83fd9f03b82 (diff)
downloadEpisodeBrowser-2ac7d06a503b256b290678f5bba158bf7d219bdd.tar.gz
Add comments.
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)
{