From bbf75d15e13228108ea3ffa278da1f6597b1108b Mon Sep 17 00:00:00 2001 From: Shane Powell Date: Sat, 22 Feb 2025 11:58:11 +1300 Subject: [PATCH] fix compiler break due to compiler std header changes fix x86 compiler break debug_module_info_size_aligned fix --- DbgHelpUtils/filesystem_utils.h | 2 +- DbgHelpUtils/symbol_engine.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DbgHelpUtils/filesystem_utils.h b/DbgHelpUtils/filesystem_utils.h index bbdb33d..c36d216 100644 --- a/DbgHelpUtils/filesystem_utils.h +++ b/DbgHelpUtils/filesystem_utils.h @@ -1,6 +1,6 @@ #pragma once #include -// ReSharper disable once CppUnusedIncludeDirective +#include #include #include #include diff --git a/DbgHelpUtils/symbol_engine.cpp b/DbgHelpUtils/symbol_engine.cpp index 349b003..9a4f4b6 100644 --- a/DbgHelpUtils/symbol_engine.cpp +++ b/DbgHelpUtils/symbol_engine.cpp @@ -1082,10 +1082,10 @@ namespace dlg_help_utils::dbg_help auto const debug_module_info_size = sizeof(IMAGE_DEBUG_DIRECTORY) + cv_record_size; // Most recent DbgHelp.dll now requires sizeof(IMAGE_DEBUG_DIRECTORY) + cv_record_size to be 8bytes-aligned - auto const mandatoryAlignment = 8; - auto const debug_module_info_size_aligned = (debug_module_info_size + mandatoryAlignment) & (~uint64_t(mandatoryAlignment - 1)); + constexpr auto mandatoryAlignment = 8; + auto const debug_module_info_size_aligned = (debug_module_info_size + mandatoryAlignment) & (~static_cast(mandatoryAlignment - 1)); - auto const debug_module_info = std::make_unique(debug_module_info_size_aligned); + auto const debug_module_info = std::make_unique(static_cast(debug_module_info_size_aligned)); auto* info = reinterpret_cast(debug_module_info.get()); info->TimeDateStamp = module_time_stamp;