From 83f17892d642c8b2c1b1b2eac0929629911fe076 Mon Sep 17 00:00:00 2001 From: orange Date: Sat, 3 Jan 2026 08:57:56 +0300 Subject: [PATCH] added unlikely --- source/utility/elf_pattern_scan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/utility/elf_pattern_scan.cpp b/source/utility/elf_pattern_scan.cpp index ec487b6..8177983 100644 --- a/source/utility/elf_pattern_scan.cpp +++ b/source/utility/elf_pattern_scan.cpp @@ -273,7 +273,7 @@ namespace omath const std::string_view& pattern, const std::string_view& target_section_name) { - if (module_base_address == nullptr) + if (module_base_address == nullptr) [[unlikely]] return std::nullopt; const auto* base = static_cast(module_base_address); @@ -289,7 +289,7 @@ namespace omath const auto arch = ei_class_value == elfclass64 ? FileArch::x64 : ei_class_value == elfclass32 ? FileArch::x32 : std::optional{}; - if (!arch.has_value()) + if (!arch.has_value()) [[unlikely]] return std::nullopt; if (arch == FileArch::x64)