mirror of
https://github.com/nlohmann/json.git
synced 2026-10-01 05:23:47 +07:00
GCC -Werror=useless-cast rejected static_cast<std::size_t>(next() % n): on 64-bit Linux std::uint64_t and std::size_t are the same type, while the cast is needed where std::size_t is 32 bits wide. Draw the sizes from a 32-bit value instead, which converts to std::size_t implicitly on every platform. Signed-off-by: Niels Lohmann <mail@nlohmann.me>