diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-14 19:36:53 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-14 20:07:47 +0300 |
commit | 0bff1d2776e0da589dd98eca69e7f04fb07dfd02 (patch) | |
tree | f7f8b905a34133d80e93d20770bdb092c04e247d /include/pdb/error.hpp | |
parent | clang-format: don't BinPackArguments (diff) | |
download | winapi-debug-0bff1d2776e0da589dd98eca69e7f04fb07dfd02.tar.gz winapi-debug-0bff1d2776e0da589dd98eca69e7f04fb07dfd02.zip |
clang-format all the code
Diffstat (limited to '')
-rw-r--r-- | include/pdb/error.hpp | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/include/pdb/error.hpp b/include/pdb/error.hpp index 6640907..2b9a8be 100644 --- a/include/pdb/error.hpp +++ b/include/pdb/error.hpp @@ -10,33 +10,28 @@ #include <string> #include <system_error> -namespace pdb -{ - namespace error - { - class CategoryWindows : public std::error_category - { - public: - CategoryWindows() = default; - - const char* name() const noexcept { return "Windows"; } - - std::string message(int) const; - }; - - inline const CategoryWindows& category_windows() - { - static const CategoryWindows instance; - return instance; - } - - inline std::system_error windows(DWORD code) - { - static_assert(sizeof(DWORD) == sizeof(int), "Aren't DWORDs the same size as ints?"); - - return std::system_error{ - static_cast<int>(code), - category_windows()}; - } - } +namespace pdb { +namespace error { + +class CategoryWindows : public std::error_category { +public: + CategoryWindows() = default; + + const char* name() const noexcept { return "Windows"; } + + std::string message(int) const; +}; + +inline const CategoryWindows& category_windows() { + static const CategoryWindows instance; + return instance; } + +inline std::system_error windows(DWORD code) { + static_assert(sizeof(DWORD) == sizeof(int), "Aren't DWORDs the same size as ints?"); + + return std::system_error{static_cast<int>(code), category_windows()}; +} + +} // namespace error +} // namespace pdb |