From 190ff781eaee33e7a61aab44fc4133718cc0515b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 13 Jun 2026 00:36:59 +0200 Subject: add .clang-format --- src/error.hpp | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'src/error.hpp') diff --git a/src/error.hpp b/src/error.hpp index 04ec8c9..8a0778c 100644 --- a/src/error.hpp +++ b/src/error.hpp @@ -12,26 +12,23 @@ typedef std::system_error Error; -namespace error -{ - inline Error make(const char* function_name) - { - const auto ec = GetLastError(); - return {static_cast(ec), std::system_category(), function_name}; - } - - inline void raise(const char* function_name) - { - throw make(function_name); - } - - inline void report(const std::exception& e) - { - MessageBoxA(NULL, e.what(), NULL, MB_OK); - } - - inline int get_code(const Error& e) - { - return e.code().value(); - } +namespace error { + +inline Error make(const char* function_name) { + const auto ec = GetLastError(); + return {static_cast(ec), std::system_category(), function_name}; +} + +inline void raise(const char* function_name) { + throw make(function_name); +} + +inline void report(const std::exception& e) { + MessageBoxA(NULL, e.what(), NULL, MB_OK); +} + +inline int get_code(const Error& e) { + return e.code().value(); } + +} // namespace error -- cgit v1.3