diff options
author | David Robillard <d@drobilla.net> | 2022-06-28 18:48:41 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-06-28 19:02:49 -0400 |
commit | 71c4a3a6d66e96661fd341e1a089c4d8bd63fb13 (patch) | |
tree | 615c31e8399736519119ca8b37bc3c97ec2c1242 /test/test_data.h | |
parent | 5d62313812b2fee9a4986e6b7ca1af40fb4f2fb6 (diff) | |
download | zix-71c4a3a6d66e96661fd341e1a089c4d8bd63fb13.tar.gz zix-71c4a3a6d66e96661fd341e1a089c4d8bd63fb13.tar.bz2 zix-71c4a3a6d66e96661fd341e1a089c4d8bd63fb13.zip |
Use uppercase integer literal suffixes
I give in.
Diffstat (limited to 'test/test_data.h')
-rw-r--r-- | test/test_data.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_data.h b/test/test_data.h index c5eaace..603a6c2 100644 --- a/test/test_data.h +++ b/test/test_data.h @@ -11,8 +11,8 @@ static inline uint32_t lcg32(const uint32_t i) { - static const uint32_t a = 134775813u; - static const uint32_t c = 1u; + static const uint32_t a = 134775813U; + static const uint32_t c = 1U; return (a * i) + c; } @@ -21,8 +21,8 @@ lcg32(const uint32_t i) static inline uint64_t lcg64(const uint64_t i) { - static const uint64_t a = 6364136223846793005ull; - static const uint64_t c = 1ull; + static const uint64_t a = 6364136223846793005ULL; + static const uint64_t c = 1ULL; return (a * i) + c; } @@ -42,10 +42,10 @@ lcg(const uintptr_t i) static inline size_t unique_rand(size_t i) { - i ^= 0x5CA1AB1Eu; // Juggle bits to avoid linear clumps + i ^= 0x5CA1AB1EU; // Juggle bits to avoid linear clumps // Largest prime < 2^32 which satisfies (2^32 = 3 mod 4) - static const size_t prime = 4294967291u; + static const size_t prime = 4294967291U; if (i >= prime) { return i; // Values >= prime are mapped to themselves } |