From f10dc60772d75ff469c93684a32514ccbec27649 Mon Sep 17 00:00:00 2001 From: Orange Date: Sun, 12 Oct 2025 19:42:53 +0300 Subject: [PATCH] Removes redundant NtHeaderVariant declaration Moves the `NtHeaderVariant` definition outside the unnamed namespace, to avoid repetition and improve code consistency. This change is part of the ongoing work on feature/hide_pe_defs. --- source/utility/pe_pattern_scan.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/utility/pe_pattern_scan.cpp b/source/utility/pe_pattern_scan.cpp index d15d0ea..9a79e6d 100644 --- a/source/utility/pe_pattern_scan.cpp +++ b/source/utility/pe_pattern_scan.cpp @@ -176,11 +176,9 @@ namespace std::uint32_t characteristics; }; // ReSharper restore CppDeclaratorNeverUsed -} -using NtHeaderVariant = std::variant, ImageNtHeaders>; -namespace -{ + using NtHeaderVariant = std::variant, ImageNtHeaders>; + [[nodiscard]] std::optional get_nt_header_from_file(std::fstream& file, const DosHeader& dos_header) {