From 69905917cf2c46fa0093df7323e5326450d1246b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 14 Oct 2016 00:00:22 +0300 Subject: move code from headers to .cpp files --- src/resource.hpp | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'src/resource.hpp') diff --git a/src/resource.hpp b/src/resource.hpp index 24fc2db..0e3186c 100644 --- a/src/resource.hpp +++ b/src/resource.hpp @@ -5,32 +5,13 @@ #pragma once -#include "error.hpp" - -#include +#include #include namespace resource { - HMODULE load_exe_module() - { - const auto module = GetModuleHandle(NULL); - if (module == NULL) - error::raise("GetModuleHandle"); - return module; - } - - std::wstring load_string(unsigned int id) - { - wchar_t* s = nullptr; - - const auto ret = LoadStringW( - load_exe_module(), id, reinterpret_cast(&s), 0); - - if (ret <= 0) - error::raise("LoadStringW"); + HMODULE load_exe_module(); - return {s, static_cast(ret)}; - } + std::wstring load_string(unsigned int id); } -- cgit v1.2.3