Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2024-10-29 21:06:54 +0100
committerMartin Hořeňovský2024-10-29 21:06:54 +0100
commit119a7bbe53ae8959f51c021c63bbd5a1734c5261 (patch)
tree877e2e6a06b79bf1091d338a81c390952cb6fc0f /src
parent9c5a4cf44e494bbd2e5dac151c400b3f4a4c9cbc (diff)
downloadcatch3-119a7bbe53ae8959f51c021c63bbd5a1734c5261.tar.gz
Cleanup clang-tidy warning about enum sizes
Diffstat (limited to 'src')
-rw-r--r--src/catch2/catch_tostring.cpp5
-rw-r--r--src/catch2/reporters/catch_reporter_console.cpp7
2 files changed, 9 insertions, 3 deletions
diff --git a/src/catch2/catch_tostring.cpp b/src/catch2/catch_tostring.cpp
index 3f034d1a..83327cfb 100644
--- a/src/catch2/catch_tostring.cpp
+++ b/src/catch2/catch_tostring.cpp
@@ -22,7 +22,10 @@ namespace Detail {
const int hexThreshold = 255;
struct Endianness {
- enum Arch { Big, Little };
+ enum Arch : uint8_t {
+ Big,
+ Little
+ };
static Arch which() {
int one = 1;
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index c5678548..9529f39a 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -214,7 +214,7 @@ struct RowBreak {};
struct OutputFlush {};
class Duration {
- enum class Unit {
+ enum class Unit : uint8_t {
Auto,
Nanoseconds,
Microseconds,
@@ -286,7 +286,10 @@ public:
};
} // end anon namespace
-enum class Justification { Left, Right };
+enum class Justification : uint8_t {
+ Left,
+ Right
+};
struct ColumnInfo {
std::string name;