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.
This commit is contained in:
2025-10-12 19:42:53 +03:00
parent 37f624956b
commit f10dc60772

View File

@@ -176,11 +176,9 @@ namespace
std::uint32_t characteristics; std::uint32_t characteristics;
}; };
// ReSharper restore CppDeclaratorNeverUsed // ReSharper restore CppDeclaratorNeverUsed
}
using NtHeaderVariant = std::variant<ImageNtHeaders<NtArchitecture::x64_bit>, ImageNtHeaders<NtArchitecture::x32_bit>>;
namespace using NtHeaderVariant = std::variant<ImageNtHeaders<NtArchitecture::x64_bit>, ImageNtHeaders<NtArchitecture::x32_bit>>;
{
[[nodiscard]] [[nodiscard]]
std::optional<NtHeaderVariant> get_nt_header_from_file(std::fstream& file, const DosHeader& dos_header) std::optional<NtHeaderVariant> get_nt_header_from_file(std::fstream& file, const DosHeader& dos_header)
{ {