We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b6ccf1 commit e49169fCopy full SHA for e49169f
include/ada/checkers-inl.h
@@ -13,8 +13,7 @@ namespace ada::checkers {
13
constexpr bool has_hex_prefix_unsafe(std::string_view input) {
14
// This is actually efficient code, see has_hex_prefix for the assembly.
15
constexpr bool is_little_endian = std::endian::native == std::endian::little;
16
- constexpr auto word0x =
17
- std::bit_cast<uint16_t>(static_cast<uint16_t>(0x7830));
+ constexpr uint16_t word0x = 0x7830;
18
uint16_t two_first_bytes =
19
static_cast<uint16_t>(input[0]) |
20
static_cast<uint16_t>((static_cast<uint16_t>(input[1]) << 8));
0 commit comments