diff --git a/bench/bench.cpp b/bench/bench.cpp index 39334323..424333fc 100644 --- a/bench/bench.cpp +++ b/bench/bench.cpp @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) threads = std::stoi(argv[2]); } - if(threads > max_threads) + if (threads > max_threads) { throw std::runtime_error(fmt::format("Number of threads exceeds maximum({}})", max_threads)); } @@ -139,9 +139,9 @@ int main(int argc, char *argv[]) void bench(int howmany, std::shared_ptr log) { - using std::chrono::high_resolution_clock; using std::chrono::duration; using std::chrono::duration_cast; + using std::chrono::high_resolution_clock; auto start = high_resolution_clock::now(); for (auto i = 0; i < howmany; ++i) @@ -158,9 +158,9 @@ void bench(int howmany, std::shared_ptr log) void bench_mt(int howmany, std::shared_ptr log, int thread_count) { - using std::chrono::high_resolution_clock; using std::chrono::duration; using std::chrono::duration_cast; + using std::chrono::high_resolution_clock; std::vector threads; threads.reserve(thread_count); diff --git a/include/spdlog/cfg/argv.h b/include/spdlog/cfg/argv.h index 6d71864e..82bc1835 100644 --- a/include/spdlog/cfg/argv.h +++ b/include/spdlog/cfg/argv.h @@ -38,7 +38,7 @@ void load_argv_levels(int argc, const char **argv) void load_argv_levels(int argc, char **argv) { - load_argv_levels(argc, const_cast(argv)); + load_argv_levels(argc, const_cast(argv)); } } // namespace cfg diff --git a/include/spdlog/details/fmt_helper.h b/include/spdlog/details/fmt_helper.h index 91883478..01c62f3b 100644 --- a/include/spdlog/details/fmt_helper.h +++ b/include/spdlog/details/fmt_helper.h @@ -63,7 +63,7 @@ template inline void pad_uint(T n, unsigned int width, memory_buf_t &dest) { static_assert(std::is_unsigned::value, "pad_uint must get unsigned T"); - for(auto digits = count_digits(n); digits < width; digits++) + for (auto digits = count_digits(n); digits < width; digits++) { dest.push_back('0'); } diff --git a/tests/test_daily_logger.cpp b/tests/test_daily_logger.cpp index f2d22d49..a3e70e68 100644 --- a/tests/test_daily_logger.cpp +++ b/tests/test_daily_logger.cpp @@ -113,7 +113,7 @@ static void test_rotate(int days_to_run, uint16_t max_days, uint16_t expected_n_ using spdlog::log_clock; using spdlog::details::log_msg; using spdlog::sinks::daily_file_sink_st; - + prepare_logdir(); std::string basename = "test_logs/daily_rotate.txt"; diff --git a/tests/test_mpmc_q.cpp b/tests/test_mpmc_q.cpp index 2d191bad..5b0e41d9 100644 --- a/tests/test_mpmc_q.cpp +++ b/tests/test_mpmc_q.cpp @@ -86,7 +86,7 @@ TEST_CASE("full_queue", "[mpmc_blocking_q]") spdlog::details::mpmc_blocking_queue q(q_size); for (int i = 0; i < static_cast(q_size); i++) { - q.enqueue(i+0); // i+0 to force rvalue and avoid tidy warnings on the same time if we std::move(i) instead + q.enqueue(i + 0); // i+0 to force rvalue and avoid tidy warnings on the same time if we std::move(i) instead } q.enqueue_nowait(123456); diff --git a/tests/test_pattern_formatter.cpp b/tests/test_pattern_formatter.cpp index 22d578fb..848398fd 100644 --- a/tests/test_pattern_formatter.cpp +++ b/tests/test_pattern_formatter.cpp @@ -308,7 +308,7 @@ TEST_CASE("clone-formatter-2", "[pattern_formatter]") class custom_test_flag : public spdlog::custom_flag_formatter { public: - explicit custom_test_flag(std::string txt) + explicit custom_test_flag(std::string txt) : some_txt{std::move(txt)} {} @@ -359,7 +359,7 @@ TEST_CASE("clone-custom_formatter", "[pattern_formatter]") #ifdef _WIN32 static const char *const test_path = "\\a\\b\\myfile.cpp"; #else -static const char * const test_path = "/a/b//myfile.cpp"; +static const char *const test_path = "/a/b//myfile.cpp"; #endif TEST_CASE("short filename formatter-1", "[pattern_formatter]") diff --git a/tests/test_registry.cpp b/tests/test_registry.cpp index 04bce458..cd8bab84 100644 --- a/tests/test_registry.cpp +++ b/tests/test_registry.cpp @@ -1,7 +1,7 @@ #include "includes.h" -static const char * const tested_logger_name = "null_logger"; -static const char * const tested_logger_name2 = "null_logger2"; +static const char *const tested_logger_name = "null_logger"; +static const char *const tested_logger_name2 = "null_logger2"; #ifndef SPDLOG_NO_EXCEPTIONS TEST_CASE("register_drop", "[registry]")