diff --git a/src/check.h b/src/check.h index c1cd5e85e4..ee89d7ae42 100644 --- a/src/check.h +++ b/src/check.h @@ -57,7 +57,7 @@ class CheckHandler { #pragma warning(disable : 4722) #endif BENCHMARK_NORETURN ~CheckHandler() BENCHMARK_NOEXCEPT_OP(false) { - log_ << std::endl; + log_ << '\n'; CallAbortHandler(); } #if defined(COMPILER_MSVC) diff --git a/src/colorprint.h b/src/colorprint.h index 9f6fab9b34..662e251c59 100644 --- a/src/colorprint.h +++ b/src/colorprint.h @@ -6,7 +6,7 @@ #include namespace benchmark { -enum LogColor { +enum LogColor : uint8_t { COLOR_DEFAULT, COLOR_RED, COLOR_GREEN, diff --git a/test/output_test.h b/test/output_test.h index c08fe1d87e..0793eb1dfa 100644 --- a/test/output_test.h +++ b/test/output_test.h @@ -21,7 +21,7 @@ #define SET_SUBSTITUTIONS(...) \ int CONCAT(dummy, __LINE__) = ::SetSubstitutions(__VA_ARGS__) -enum MatchRules { +enum MatchRules uint8_t { MR_Default, // Skip non-matching lines until a match is found. MR_Next, // Match must occur on the next line. MR_Not // No line between the current position and the next match matches @@ -37,7 +37,7 @@ struct TestCase { std::shared_ptr regex; }; -enum TestCaseID { +enum TestCaseID uint8_t { TC_ConsoleOut, TC_ConsoleErr, TC_JSONOut, @@ -101,7 +101,7 @@ struct Results { double NumIterations() const; - typedef enum { kCpuTime, kRealTime } BenchmarkTime; + typedef enum : uint8_t { kCpuTime, kRealTime } BenchmarkTime; // get cpu_time or real_time in seconds double GetTime(BenchmarkTime which) const;