From 1e5e3a2d86928a9d70d09ad6dca0fb71683a3878 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Thu, 19 Dec 2024 10:20:58 -0500 Subject: [PATCH] this looks too complicated! --- include/ada/checkers-inl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/ada/checkers-inl.h b/include/ada/checkers-inl.h index b5c238440..afe962715 100644 --- a/include/ada/checkers-inl.h +++ b/include/ada/checkers-inl.h @@ -13,8 +13,7 @@ namespace ada::checkers { constexpr bool has_hex_prefix_unsafe(std::string_view input) { // This is actually efficient code, see has_hex_prefix for the assembly. constexpr bool is_little_endian = std::endian::native == std::endian::little; - constexpr auto word0x = - std::bit_cast(static_cast(0x7830)); + constexpr uint16_t word0x = 0x7830; uint16_t two_first_bytes = static_cast(input[0]) | static_cast((static_cast(input[1]) << 8));