From 4e3e80109a005f3d24e164f766de6076cc07a689 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 19 Oct 2018 17:12:35 +0300 Subject: [PATCH] Code formatting --- bench/bench.cpp | 10 +++++----- example/example.cpp | 2 +- include/spdlog/details/fmt_helper.h | 2 +- include/spdlog/details/logger_impl.h | 1 - 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bench/bench.cpp b/bench/bench.cpp index 7ba0acf9..9c06cc0e 100644 --- a/bench/bench.cpp +++ b/bench/bench.cpp @@ -192,11 +192,11 @@ void bench_default_api(int howmany, std::shared_ptr log) void bench_c_string(int howmany, std::shared_ptr log) { - const char *msg = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pharetra metus cursus " \ - "lacus placerat congue. Nulla egestas, mauris a tincidunt tempus, enim lectus volutpat mi, eu consequat sem " \ - "libero nec massa. In dapibus ipsum a diam rhoncus gravida. Etiam non dapibus eros. Donec fringilla dui sed " \ - "augue pretium, nec scelerisque est maximus. Nullam convallis, sem nec blandit maximus, nisi turpis ornare " \ - "nisl, sit amet volutpat neque massa eu odio. Maecenas malesuada quam ex, posuere congue nibh turpis duis."; + const char *msg = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pharetra metus cursus " + "lacus placerat congue. Nulla egestas, mauris a tincidunt tempus, enim lectus volutpat mi, eu consequat sem " + "libero nec massa. In dapibus ipsum a diam rhoncus gravida. Etiam non dapibus eros. Donec fringilla dui sed " + "augue pretium, nec scelerisque est maximus. Nullam convallis, sem nec blandit maximus, nisi turpis ornare " + "nisl, sit amet volutpat neque massa eu odio. Maecenas malesuada quam ex, posuere congue nibh turpis duis."; using std::chrono::high_resolution_clock; auto orig_default = spdlog::default_logger(); spdlog::set_default_logger(log); diff --git a/example/example.cpp b/example/example.cpp index 6ee37af3..1eea343e 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -147,7 +147,7 @@ void async_example() void binary_example() { std::vector buf; - for(int i = 0; i < 80; i++) + for (int i = 0; i < 80; i++) { buf.push_back(static_cast(i & 0xff)); } diff --git a/include/spdlog/details/fmt_helper.h b/include/spdlog/details/fmt_helper.h index 818c988f..5ad979df 100644 --- a/include/spdlog/details/fmt_helper.h +++ b/include/spdlog/details/fmt_helper.h @@ -29,7 +29,7 @@ template inline void append_string_view(fmt::string_view view, fmt::basic_memory_buffer &dest) { auto *buf_ptr = view.data(); - if(buf_ptr != nullptr) + if (buf_ptr != nullptr) { dest.append(buf_ptr, buf_ptr + view.size()); } diff --git a/include/spdlog/details/logger_impl.h b/include/spdlog/details/logger_impl.h index 7e307d7f..e9b7a8e8 100644 --- a/include/spdlog/details/logger_impl.h +++ b/include/spdlog/details/logger_impl.h @@ -218,7 +218,6 @@ inline void spdlog::logger::log(level::level_enum lvl, const wchar_t *fmt, const wbuf_to_utf8buf(wbuf, buf); details::log_msg log_msg(&name_, lvl, to_string_view(buf)); sink_it_(log_msg); - } SPDLOG_CATCH_AND_HANDLE }