updated build system

This commit is contained in:
2024-08-31 19:41:05 -05:00
parent 12a27c4449
commit 58dcf60365
2 changed files with 3 additions and 3 deletions

View File

@ -114,8 +114,8 @@ inline auto generate_random_between(data_t begin, data_t end) -> data_t {
throw std::range_error("end must be greater than begin");
}
thread_local std::mt19937 gen(static_cast<unsigned long>(
std::time(nullptr) ^ std::random_device rd{}()));
thread_local std::mt19937 gen(
static_cast<unsigned long>(std::time(nullptr) ^ std::random_device{}()));
std::uniform_int_distribution<data_t> dis(begin, end);
return dis(gen);
}

View File

@ -65,7 +65,7 @@ auto create_random_file(std::size_t size) -> utils::file::i_file & {
randombytes_buf(buf.data(), buf.size());
#else // !defined(PROJECT_ENABLE_LIBSODIUM)
thread_local std::mt19937 gen(static_cast<unsigned long>(
std::time(nullptr) ^ std::random_device rd{}()));
std::time(nullptr) ^ std::random_device{}()));
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)