mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 08:25:43 +08:00
clang-format
This commit is contained in:
parent
9ba7fc94a5
commit
a8169a3d6b
@ -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<spdlog::logger> 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<spdlog::logger> log)
|
||||
|
||||
void bench_mt(int howmany, std::shared_ptr<spdlog::logger> 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<std::thread> threads;
|
||||
threads.reserve(thread_count);
|
||||
|
@ -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<const char**>(argv));
|
||||
load_argv_levels(argc, const_cast<const char **>(argv));
|
||||
}
|
||||
|
||||
} // namespace cfg
|
||||
|
@ -63,7 +63,7 @@ template<typename T>
|
||||
inline void pad_uint(T n, unsigned int width, memory_buf_t &dest)
|
||||
{
|
||||
static_assert(std::is_unsigned<T>::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');
|
||||
}
|
||||
|
@ -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";
|
||||
|
@ -86,7 +86,7 @@ TEST_CASE("full_queue", "[mpmc_blocking_q]")
|
||||
spdlog::details::mpmc_blocking_queue<int> q(q_size);
|
||||
for (int i = 0; i < static_cast<int>(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);
|
||||
|
@ -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]")
|
||||
|
@ -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]")
|
||||
|
Loading…
Reference in New Issue
Block a user