diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-13 00:36:59 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-13 00:39:55 +0200 |
| commit | 190ff781eaee33e7a61aab44fc4133718cc0515b (patch) | |
| tree | 469cedfc87734589a4e9a0102f69324b9edb8f16 /src/resource.hpp | |
| parent | cmake: upgrade minimum version (diff) | |
| download | privilege-check-190ff781eaee33e7a61aab44fc4133718cc0515b.tar.gz privilege-check-190ff781eaee33e7a61aab44fc4133718cc0515b.zip | |
add .clang-format
Diffstat (limited to 'src/resource.hpp')
| -rw-r--r-- | src/resource.hpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/resource.hpp b/src/resource.hpp index 6039fab..1f7b9ad 100644 --- a/src/resource.hpp +++ b/src/resource.hpp @@ -11,24 +11,19 @@ #include <windows.h> #include <cstddef> - #include <string> -namespace resource -{ - inline std::wstring load_string(unsigned int id) - { - wchar_t* s = nullptr; +namespace resource { + +inline std::wstring load_string(unsigned int id) { + wchar_t* s = nullptr; - const auto ret = LoadStringW( - process::load_exe_module(), - id, - reinterpret_cast<wchar_t*>(&s), - 0); + const auto ret = LoadStringW(process::load_exe_module(), id, reinterpret_cast<wchar_t*>(&s), 0); - if (ret <= 0) - error::raise("LoadStringW"); + if (ret <= 0) + error::raise("LoadStringW"); - return {s, static_cast<std::size_t>(ret)}; - } + return {s, static_cast<std::size_t>(ret)}; } + +} // namespace resource |
