From 5d23e88c16511e3c263d6360b04a2a874500fb1e Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 2 Dec 2016 17:40:40 +0200 Subject: [PATCH] astyle --- include/spdlog/details/os.h | 4 ++-- .../spdlog/details/pattern_formatter_impl.h | 6 ++--- include/spdlog/fmt/bundled/format.h | 22 +++++++++---------- include/spdlog/sinks/wincolor_sink.h | 6 ++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index a5ca8b2f..af1e4cc4 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -316,7 +316,7 @@ inline size_t _thread_id() inline size_t thread_id() { static thread_local const size_t tid = _thread_id(); - return tid; + return tid; } @@ -364,7 +364,7 @@ inline std::string errno_str(int err_num) #endif } -inline int pid() +inline int pid() { #ifdef _WIN32 diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index 9a6e10ea..106c0439 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -365,12 +365,12 @@ class t_formatter:public flag_formatter } }; -// Current pid +// Current pid class pid_formatter:public flag_formatter { void format(details::log_msg& msg, const std::tm&) override { - msg.formatted << details::os::pid(); + msg.formatted << details::os::pid(); } }; @@ -507,7 +507,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag) { switch (flag) { - // logger name + // logger name case 'n': _formatters.push_back(std::unique_ptr(new details::name_formatter())); break; diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c6cf8110..beab91d0 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -475,7 +475,7 @@ template class BasicPrintfArgFormatter; template > + typename ArgFormatter = fmt::ArgFormatter > class BasicFormatter; /** @@ -2647,15 +2647,15 @@ inline uint64_t make_type(const T &arg) } template - struct ArgArray; +struct ArgArray; template struct ArgArray { typedef Value Type[N > 0 ? N : 1]; -template -static Value make(const T &value) + template + static Value make(const T &value) { #ifdef __clang__ Value result = MakeValue(value); @@ -2667,7 +2667,7 @@ static Value make(const T &value) return MakeValue(value); #endif } - }; +}; template struct ArgArray @@ -3513,7 +3513,7 @@ void BasicWriter::write_double(T value, const FormatSpec &spec) // MSVC's printf doesn't support 'F'. type = 'f'; #endif - // Fall through. + // Fall through. case 'E': case 'G': case 'A': @@ -4571,7 +4571,7 @@ struct UdlArg template NamedArgWithType operator=(T &&value) const { - return{ str, std::forward(value) }; + return { str, std::forward(value) }; } }; @@ -4593,12 +4593,12 @@ std::string message = "The answer is {}"_format(42); inline internal::UdlFormat operator"" _format(const char *s, std::size_t) { - return{ s }; + return { s }; } inline internal::UdlFormat operator"" _format(const wchar_t *s, std::size_t) { - return{ s }; + return { s }; } /** @@ -4614,12 +4614,12 @@ print("Elapsed time: {s:.2f} seconds", "s"_a=1.23); inline internal::UdlArg operator"" _a(const char *s, std::size_t) { - return{ s }; + return { s }; } inline internal::UdlArg operator"" _a(const wchar_t *s, std::size_t) { - return{ s }; + return { s }; } } // inline namespace literals diff --git a/include/spdlog/sinks/wincolor_sink.h b/include/spdlog/sinks/wincolor_sink.h index 5f1c2771..63ecbe21 100644 --- a/include/spdlog/sinks/wincolor_sink.h +++ b/include/spdlog/sinks/wincolor_sink.h @@ -66,7 +66,7 @@ public: // change the color for the given level void set_color(level::level_enum level, WORD color) { - std::lock_guard lock(base_sink::_mutex); + std::lock_guard lock(base_sink::_mutex); colors_[level] = color; } @@ -91,7 +91,7 @@ template class wincolor_stdout_sink: public wincolor_sink { public: - wincolor_stdout_sink() : wincolor_sink(GetStdHandle(STD_OUTPUT_HANDLE)) + wincolor_stdout_sink() : wincolor_sink(GetStdHandle(STD_OUTPUT_HANDLE)) {} }; @@ -105,7 +105,7 @@ template class wincolor_stderr_sink: public wincolor_sink { public: - wincolor_stderr_sink() : wincolor_sink(GetStdHandle(STD_ERROR_HANDLE)) + wincolor_stderr_sink() : wincolor_sink(GetStdHandle(STD_ERROR_HANDLE)) {} };