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 /benchmark | |
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 'benchmark')
-rw-r--r-- | benchmark/.clang-tidy | 1 | ||||
-rw-r--r-- | benchmark/dict_bench.c | 12 | ||||
-rw-r--r-- | benchmark/tree_bench.c | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/benchmark/.clang-tidy b/benchmark/.clang-tidy index 8bbb5c1..01a5eb7 100644 --- a/benchmark/.clang-tidy +++ b/benchmark/.clang-tidy @@ -4,7 +4,6 @@ Checks: > *, -*-magic-numbers, - -*-uppercase-literal-suffix, -altera-*, -android-cloexec-fopen, -bugprone-easily-swappable-parameters, diff --git a/benchmark/dict_bench.c b/benchmark/dict_bench.c index b9c8cc4..82a4b78 100644 --- a/benchmark/dict_bench.c +++ b/benchmark/dict_bench.c @@ -36,8 +36,8 @@ typedef struct { 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; } @@ -51,7 +51,7 @@ identity(const void* record) static size_t zix_chunk_hash(const ZixChunk* const chunk) { - return zix_digest(0u, chunk->buf, chunk->len); + return zix_digest(0U, chunk->buf, chunk->len); } static bool @@ -65,10 +65,10 @@ static const unsigned seed = 1; static Inputs read_inputs(FILE* const fd) { - static const size_t max_n_strings = 1u << 20u; - static const Inputs no_inputs = {NULL, 0u, NULL}; + static const size_t max_n_strings = 1U << 20U; + static const Inputs no_inputs = {NULL, 0U, NULL}; - Inputs inputs = {NULL, 0u, NULL}; + Inputs inputs = {NULL, 0U, NULL}; size_t buf_len = 1; size_t this_str_len = 0; for (int c = 0; (c = fgetc(fd)) != EOF;) { diff --git a/benchmark/tree_bench.c b/benchmark/tree_bench.c index b825d96..1fca1a3 100644 --- a/benchmark/tree_bench.c +++ b/benchmark/tree_bench.c @@ -141,7 +141,7 @@ bench_zix_btree(size_t n_elems, { start_test("ZixBTree"); - uintptr_t r = 0u; + uintptr_t r = 0U; ZixBTreeIter ti = zix_btree_end_iter; ZixBTree* t = zix_btree_new(NULL, int_cmp, NULL); @@ -206,7 +206,7 @@ bench_glib(size_t n_elems, { start_test("GSequence"); - uintptr_t r = 0u; + uintptr_t r = 0U; GSequence* t = g_sequence_new(NULL); // Insert n_elems elements |