Skip to content

Commit 1a3ef2a

Browse files
committed
Avoid compile_signature in Chromium benchmark
1 parent 6c2f768 commit 1a3ef2a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/benchmark/Chromium.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
#define WIDE_STR_(x) L ## #x
1010
#define WIDE_STR(x) WIDE_STR_(x)
1111

12-
static constexpr auto DllMainSignature = hat::compile_signature<"48 89 5C 24 08 48 89 74 24 10 57 48 83 EC ?? 49 8B F8">();
12+
static const hat::signature DllMainSignature = [] {
13+
auto result = hat::parse_signature("48 89 5C 24 08 48 89 74 24 10 57 48 83 EC ?? 49 8B F8");
14+
if (!result.has_value()) {
15+
std::terminate();
16+
}
17+
return result.value();
18+
}();
1319

1420
static std::span<const std::byte> get_file_data() {
1521
static std::vector<std::byte> data = []{

0 commit comments

Comments
 (0)