From 2ac7d06a503b256b290678f5bba158bf7d219bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 4 Aug 2022 16:26:27 +0200 Subject: Add comments. --- c/win.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'c/win.cpp') 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::Maybe(const wchar_t* const lib) +std::optional 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) { -- cgit v1.2.3