aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/os.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/os.hpp')
-rw-r--r--src/os.hpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/os.hpp b/src/os.hpp
index 7aeaf54..c9a89a1 100644
--- a/src/os.hpp
+++ b/src/os.hpp
@@ -11,24 +11,14 @@
namespace os
{
- OSVERSIONINFOW get_version_info()
- {
- OSVERSIONINFOW info;
- ZeroMemory(&info, sizeof(info));
- info.dwOSVersionInfoSize = sizeof(info);
-
- if (!GetVersionExW(&info))
- error::raise("GetVersionExW");
-
- return info;
- }
+ OSVERSIONINFOW get_version_info();
- bool is_vista_or_later(const OSVERSIONINFOW& info)
+ inline bool is_vista_or_later(const OSVERSIONINFOW& info)
{
return info.dwMajorVersion >= 6;
}
- bool is_vista_or_later()
+ inline bool is_vista_or_later()
{
return is_vista_or_later(get_version_info());
}