Skip to content

Commit c72a916

Browse files
committed
Use UPPERCASE for array constants
1 parent a809819 commit c72a916

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/tagtransform-c.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct layers_type
2626
bool roads;
2727
};
2828

29-
constexpr std::array<layers_type, 25> const layers = {
29+
constexpr std::array<layers_type, 25> const LAYERS = {
3030
{{"proposed", 1, false}, {"construction", 2, false},
3131
{"steps", 10, false}, {"cycleway", 10, false},
3232
{"bridleway", 10, false}, {"footway", 10, false},
@@ -60,7 +60,7 @@ void add_z_order(taglist_t *tags, bool *roads)
6060
*roads = false;
6161

6262
if (highway) {
63-
for (auto const &layer : layers) {
63+
for (auto const &layer : LAYERS) {
6464
if (*highway == layer.highway) {
6565
z_order += layer.offset;
6666
*roads = layer.roads;

src/wkb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ geom::geometry_t ewkb_to_geom(std::string_view wkb)
578578

579579
namespace {
580580

581-
constexpr std::array<char, 256> const hex_table = {
581+
constexpr std::array<char, 256> const HEX_TABLE = {
582582
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
583583
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
584584
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -594,7 +594,7 @@ constexpr std::array<char, 256> const hex_table = {
594594
unsigned char decode_hex_char(char c) noexcept
595595
{
596596
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
597-
return hex_table[static_cast<std::size_t>(static_cast<unsigned char>(c))];
597+
return HEX_TABLE[static_cast<std::size_t>(static_cast<unsigned char>(c))];
598598
}
599599

600600
std::string decode_hex(std::string_view hex_string)

0 commit comments

Comments
 (0)