Skip to content

Commit 9bdc384

Browse files
authored
style(clang-tidy): fix modernize-use-bool-literals (#1815)
Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
1 parent 5dec046 commit 9bdc384

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core/uuid/uuid.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <sourcemeta/core/uuid.h>
22

3+
#include <array> // std::array
34
#include <cstdint> // std::uint8_t
45
#include <random> // std::random_device, std::mt19937, std::uniform_int_distribution
56
#include <string_view> // std::string_view
@@ -11,8 +12,9 @@ auto uuidv4() -> std::string {
1112
static std::random_device device;
1213
static std::mt19937 generator{device()};
1314
static constexpr std::string_view digits = "0123456789abcdef";
14-
static constexpr bool dash[] = {0, 0, 0, 0, 1, 0, 1, 0,
15-
1, 0, 1, 0, 0, 0, 0, 0};
15+
static constexpr std::array<bool, 16> dash = {
16+
{false, false, false, false, true, false, true, false, true, false, true,
17+
false, false, false, false, false}};
1618
std::uniform_int_distribution<decltype(digits)::size_type> distribution(0,
1719
15);
1820
std::string result;

0 commit comments

Comments
 (0)