From 2f5e519d77b8dc4177c6f9f1dfb47f22820adc3e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 5 Jun 2026 17:55:20 +0200 Subject: upgrade from typedef to using --- include/winapi/debug/address.hpp | 2 +- include/winapi/debug/dbghelp.hpp | 4 ++-- include/winapi/debug/module.hpp | 2 +- include/winapi/debug/post_mortem.hpp | 2 +- include/winapi/debug/symbol.hpp | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'include/winapi') diff --git a/include/winapi/debug/address.hpp b/include/winapi/debug/address.hpp index 9fe6e2b..1feb80a 100644 --- a/include/winapi/debug/address.hpp +++ b/include/winapi/debug/address.hpp @@ -14,7 +14,7 @@ namespace winapi { -typedef DWORD64 Address; +using Address = DWORD64; namespace address { diff --git a/include/winapi/debug/dbghelp.hpp b/include/winapi/debug/dbghelp.hpp index 29e56e7..8fc2cda 100644 --- a/include/winapi/debug/dbghelp.hpp +++ b/include/winapi/debug/dbghelp.hpp @@ -29,12 +29,12 @@ public: ModuleInfo load_pdb(std::string_view path) const; - typedef std::function OnModule; + using OnModule = std::function; void enum_modules(const OnModule&) const; ModuleInfo resolve_module(Address) const; - typedef std::function OnSymbol; + using OnSymbol = std::function; static constexpr auto all_symbols = "*!*"; void enum_symbols(const ModuleInfo&, std::string_view mask, const OnSymbol&) const; void enum_symbols(const ModuleInfo&, const OnSymbol&) const; diff --git a/include/winapi/debug/module.hpp b/include/winapi/debug/module.hpp index 767aab9..020219f 100644 --- a/include/winapi/debug/module.hpp +++ b/include/winapi/debug/module.hpp @@ -16,7 +16,7 @@ namespace winapi { class ModuleInfo { public: - typedef IMAGEHLP_MODULEW64 Impl; + using Impl = IMAGEHLP_MODULEW64; ModuleInfo(); explicit ModuleInfo(const Impl& impl); diff --git a/include/winapi/debug/post_mortem.hpp b/include/winapi/debug/post_mortem.hpp index 5ddc85e..b031bbf 100644 --- a/include/winapi/debug/post_mortem.hpp +++ b/include/winapi/debug/post_mortem.hpp @@ -25,7 +25,7 @@ public: Address add_pdb(Address online_base, std::string_view path); - typedef std::function OnSymbol; + using OnSymbol = std::function; void enum_symbols(const OnSymbol&) const; void enum_symbols(Address offline_base, const OnSymbol&) const; void enum_symbols(const Module&, const OnSymbol&) const; diff --git a/include/winapi/debug/symbol.hpp b/include/winapi/debug/symbol.hpp index a46e9bb..828a040 100644 --- a/include/winapi/debug/symbol.hpp +++ b/include/winapi/debug/symbol.hpp @@ -21,7 +21,7 @@ namespace winapi { namespace symbol { // MinGW-w64 (as of version 7.0) doesn't have SymTagEnum -typedef ULONG Tag; +using Tag = ULONG; constexpr Tag SYM_TAG_FUNCTION = 5; @@ -34,7 +34,7 @@ static_assert(static_cast(SymTagFunction) == SYM_TAG_FUNCTION, class SymbolInfo { public: - typedef SYMBOL_INFOW Impl; + using Impl = SYMBOL_INFOW; SymbolInfo(); explicit SymbolInfo(const Impl& impl); @@ -86,7 +86,7 @@ private: class LineInfo { public: - typedef IMAGEHLP_LINEW64 Impl; + using Impl = IMAGEHLP_LINEW64; explicit LineInfo(const Impl& impl); -- cgit v1.3