Skip to content

Commit

Permalink
this looks too complicated! (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire authored Dec 19, 2024
1 parent 7b6ccf1 commit e49169f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/ada/checkers-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint16_t>(static_cast<uint16_t>(0x7830));
constexpr uint16_t word0x = 0x7830;
uint16_t two_first_bytes =
static_cast<uint16_t>(input[0]) |
static_cast<uint16_t>((static_cast<uint16_t>(input[1]) << 8));
Expand Down

0 comments on commit e49169f

Please sign in to comment.