From 2d873785a5a6addc1a14a87a1a68541aa0b4808d Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 10 Dec 2016 02:05:05 +0200 Subject: [PATCH] astyle --- include/spdlog/details/os.h | 30 +++++++++---------- .../spdlog/details/pattern_formatter_impl.h | 2 +- include/spdlog/fmt/bundled/format.h | 12 ++++---- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index e0f3d70f..b63ce667 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -36,7 +36,7 @@ #else // unix -#include +#include #include #ifdef __linux__ @@ -44,7 +44,7 @@ #elif __FreeBSD__ #include //Use thr_self() syscall under FreeBSD to get thread id -#endif +#endif #endif //unix @@ -145,14 +145,14 @@ SPDLOG_CONSTEXPR static int eol_size = sizeof(SPDLOG_EOL) - 1; inline void prevent_child_fd(FILE *f) { #ifdef _WIN32 - auto file_handle = (HANDLE)_get_osfhandle(_fileno(f)); - if (!::SetHandleInformation(file_handle, HANDLE_FLAG_INHERIT, 0)) - throw spdlog_ex("SetHandleInformation failed", errno); + auto file_handle = (HANDLE)_get_osfhandle(_fileno(f)); + if (!::SetHandleInformation(file_handle, HANDLE_FLAG_INHERIT, 0)) + throw spdlog_ex("SetHandleInformation failed", errno); #else - auto fd = fileno(f); - if(fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) - throw spdlog_ex("fcntl with FD_CLOEXEC failed", errno); -#endif + auto fd = fileno(f); + if(fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + throw spdlog_ex("fcntl with FD_CLOEXEC failed", errno); +#endif } @@ -164,16 +164,16 @@ inline int fopen_s(FILE** fp, const filename_t& filename, const filename_t& mode *fp = _wfsopen((filename.c_str()), mode.c_str(), _SH_DENYWR); #else *fp = _fsopen((filename.c_str()), mode.c_str(), _SH_DENYWR); -#endif +#endif #else //unix - *fp = fopen((filename.c_str()), mode.c_str()); -#endif + *fp = fopen((filename.c_str()), mode.c_str()); +#endif #ifdef SPDLOG_PREVENT_CHILD_FD - if(*fp != nullptr) - prevent_child_fd(*fp); + if(*fp != nullptr) + prevent_child_fd(*fp); #endif - return *fp == nullptr; + return *fp == nullptr; } diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index 106c0439..3f4e9a2c 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -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 beab91d0..e5e2e2ef 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 @@ struct ArgArray 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':