updated build system
This commit is contained in:
@ -64,9 +64,8 @@ auto create_random_file(std::size_t size) -> utils::file::i_file & {
|
||||
#if defined(PROJECT_ENABLE_LIBSODIUM)
|
||||
randombytes_buf(buf.data(), buf.size());
|
||||
#else // !defined(PROJECT_ENABLE_LIBSODIUM)
|
||||
thread_local std::random_device rd{};
|
||||
thread_local std::mt19937 gen(
|
||||
static_cast<unsigned long>(std::time(nullptr) ^ rd()));
|
||||
thread_local std::mt19937 gen(static_cast<unsigned long>(
|
||||
std::time(nullptr) ^ std::random_device rd{}()));
|
||||
std::uniform_int_distribution<std::uint8_t> dis(0U, 255U);
|
||||
std::generate(buf.begin(), buf.end(), [&]() -> auto { return dis(gen); });
|
||||
#endif // defined(PROJECT_ENABLE_LIBSODIUM)
|
||||
|
Reference in New Issue
Block a user