Skip to content

Commit e792264

Browse files
committed
Use smaller enums
Found by clang-tidy In src/taginfo-impl.hpp we can't use a smaller type, because we use bool operators on those values which promotes them to ints which leads to other problems.
1 parent 35c6d73 commit e792264

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/output-pgsql.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
#include "tagtransform.hpp"
2424

2525
#include <array>
26+
#include <cstdint>
2627
#include <memory>
2728

2829
class output_pgsql_t : public output_t
2930
{
3031
public:
31-
enum table_id
32+
enum table_id : std::uint8_t
3233
{
3334
t_point = 0,
3435
t_line,

src/taginfo-impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <utility>
2020
#include <vector>
2121

22-
enum column_flags : unsigned int
22+
enum column_flags : unsigned int // NOLINT(performance-enum-size)
2323
{
2424
FLAG_POLYGON = 1, /* For polygon table */
2525
FLAG_LINEAR = 2, /* For lines table */

0 commit comments

Comments
 (0)