From eeac54304af4a06ab9e4e3ce944944a609c68a8a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Jan 2020 03:30:56 +0300 Subject: refactoring --- src/dbghelp.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/dbghelp.cpp') diff --git a/src/dbghelp.cpp b/src/dbghelp.cpp index 94fa7ab..26eff79 100644 --- a/src/dbghelp.cpp +++ b/src/dbghelp.cpp @@ -96,7 +96,7 @@ ModuleInfo DbgHelp::load_pdb(const std::string& path) const { ModuleInfo DbgHelp::get_module_info(Address offline_base) const { ModuleInfo info; - if (!SymGetModuleInfo64(id, offline_base, &static_cast(info))) + if (!SymGetModuleInfo64(id, offline_base, &static_cast(info))) throw error::windows(GetLastError()); return info; @@ -132,16 +132,16 @@ SymbolInfo DbgHelp::resolve_symbol(const std::string& name) const { } LineInfo DbgHelp::resolve_line(Address offline) const { - IMAGEHLP_LINE64 raw; - std::memset(&raw, 0, sizeof(raw)); - raw.SizeOfStruct = sizeof(raw); + IMAGEHLP_LINE64 impl; + std::memset(&impl, 0, sizeof(impl)); + impl.SizeOfStruct = sizeof(impl); DWORD displacement = 0; - if (!SymGetLineFromAddr64(id, offline, &displacement, &raw)) + if (!SymGetLineFromAddr64(id, offline, &displacement, &impl)) throw error::windows(GetLastError()); - return LineInfo{raw}; + return LineInfo{impl}; } } // namespace pdb -- cgit v1.2.3