From 58699a2bd4c5cc313219f9db5aa5482f99ad423b Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 15 May 2016 01:01:01 +0300 Subject: [PATCH] astyle --- include/spdlog/details/async_log_helper.h | 8 ++++---- include/spdlog/details/async_logger_impl.h | 2 +- include/spdlog/details/pattern_formatter_impl.h | 2 +- include/spdlog/tweakme.h | 2 +- tests/file_log.cpp | 8 ++++---- tests/format.cpp | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/spdlog/details/async_log_helper.h b/include/spdlog/details/async_log_helper.h index eb7f476c..f6f00282 100644 --- a/include/spdlog/details/async_log_helper.h +++ b/include/spdlog/details/async_log_helper.h @@ -340,13 +340,13 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_ using namespace std::this_thread; using std::chrono::milliseconds; using std::chrono::microseconds; - + auto time_since_op = now - last_op_time; - + // spin upto 50 micros if (time_since_op <= microseconds(50)) return; - + // yield upto 150 micros if (time_since_op <= microseconds(100)) return yield(); @@ -356,7 +356,7 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_ if (time_since_op <= milliseconds(200)) return sleep_for(milliseconds(20)); - // sleep for 200 ms + // sleep for 200 ms return sleep_for(milliseconds(200)); } diff --git a/include/spdlog/details/async_logger_impl.h b/include/spdlog/details/async_logger_impl.h index ebacdb59..8fa698dd 100644 --- a/include/spdlog/details/async_logger_impl.h +++ b/include/spdlog/details/async_logger_impl.h @@ -49,7 +49,7 @@ inline spdlog::async_logger::async_logger(const std::string& logger_name, async_logger(logger_name, { single_sink - }, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb) {} +}, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb) {} inline void spdlog::async_logger::flush() diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index 31e7c828..313bfc85 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -619,7 +619,7 @@ inline void spdlog::pattern_formatter::format(details::log_msg& msg) f->format(msg, tm_time); } //write eol - msg.formatted.write(details::os::eol, details::os::eol_size); + msg.formatted.write(details::os::eol, details::os::eol_size); } catch(const fmt::FormatError& e) { diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h index 01cba98f..2d6f606c 100644 --- a/include/spdlog/tweakme.h +++ b/include/spdlog/tweakme.h @@ -65,6 +65,6 @@ /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows) +// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows) // #define SPDLOG_EOL ";-)\n" /////////////////////////////////////////////////////////////////////////////// diff --git a/tests/file_log.cpp b/tests/file_log.cpp index 3eedbeec..f9b23f71 100644 --- a/tests/file_log.cpp +++ b/tests/file_log.cpp @@ -80,8 +80,8 @@ TEST_CASE("daily_logger", "[daily_logger]]") TEST_CASE("daily_logger with dateonly calculator", "[daily_logger_dateonly]]") { using sink_type = spdlog::sinks::daily_file_sink< - std::mutex, - spdlog::sinks::dateonly_daily_file_name_calculator>; + std::mutex, + spdlog::sinks::dateonly_daily_file_name_calculator>; prepare_logdir(); //calculate filename (time based) @@ -112,8 +112,8 @@ struct custom_daily_file_name_calculator TEST_CASE("daily_logger with custom calculator", "[daily_logger_custom]]") { using sink_type = spdlog::sinks::daily_file_sink< - std::mutex, - custom_daily_file_name_calculator>; + std::mutex, + custom_daily_file_name_calculator>; prepare_logdir(); //calculate filename (time based) diff --git a/tests/format.cpp b/tests/format.cpp index 880bbc8d..af8ee63b 100644 --- a/tests/format.cpp +++ b/tests/format.cpp @@ -12,7 +12,7 @@ std::string log_info(const T& what, spdlog::level::level_enum logger_level = spd oss_logger.set_level(logger_level); oss_logger.set_pattern("%v"); oss_logger.info() << what; - + return oss.str().substr(0, oss.str().length() - spdlog::details::os::eol_size); }