Sitelet https://github.com/erigontech/silkpre/commit/3322bb898ac9528fc2cf9a8df1e48360420d0c1a
Skip to content

Commit 3322bb8

Browse files
authored
Use std:: in endianess check (#9)
This fixes compatibility with newer intx.
1 parent afa1c5f commit 3322bb8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/silkpre/precompile.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <gmp.h>
2020

2121
#include <algorithm>
22+
#include <bit>
2223
#include <cstring>
2324
#include <limits>
2425

@@ -476,7 +477,7 @@ SilkpreOutput silkpre_blake2_f_run(const uint8_t* input, size_t len) {
476477
state.f[0] = std::numeric_limits<uint64_t>::max();
477478
}
478479

479-
static_assert(intx::byte_order_is_little_endian);
480+
static_assert(std::endian::native == std::endian::little);
480481
static_assert(sizeof(state.h) == 8 * 8);
481482
std::memcpy(&state.h, input + 4, 8 * 8);
482483

0 commit comments

Comments
 (0)