From eeac54304af4a06ab9e4e3ce944944a609c68a8a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Jan 2020 03:30:56 +0300 Subject: refactoring --- src/module.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/module.cpp') diff --git a/src/module.cpp b/src/module.cpp index 9f12599..6ee0c08 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -14,18 +14,18 @@ namespace pdb { -ModuleInfo::ModuleInfo() : ModuleInfo{create_raw()} {} +ModuleInfo::ModuleInfo() : ModuleInfo{create_impl()} {} -ModuleInfo::ModuleInfo(const Raw& raw) : raw{raw} { - if (raw.SizeOfStruct != sizeof(raw)) +ModuleInfo::ModuleInfo(const Impl& impl) : impl{impl} { + if (impl.SizeOfStruct != sizeof(impl)) throw std::runtime_error{"invalid IMAGEHLP_MODULE64.SizeOfStruct"}; } -ModuleInfo::Raw ModuleInfo::create_raw() { - Raw raw; - std::memset(&raw, 0, sizeof(raw)); - raw.SizeOfStruct = sizeof(raw); - return raw; +ModuleInfo::Impl ModuleInfo::create_impl() { + Impl impl; + std::memset(&impl, 0, sizeof(impl)); + impl.SizeOfStruct = sizeof(impl); + return impl; } Address Module::translate_offline_address(Address offline) const { -- cgit v1.2.3