From 3fdc7996db80019074b0753fee589de2260e5d76 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 9 Apr 2018 15:14:13 +0300 Subject: [PATCH] code formatting --- include/spdlog/details/os.h | 2 +- include/spdlog/details/pattern_formatter_impl.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index cd3e702b..e48f8272 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -245,7 +245,7 @@ inline size_t filesize(FILE *f) } #else // unix 32 bits or cygwin struct stat st; - + if (fstat(fd, &st) == 0) { return static_cast(st.st_size); diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index b801221b..e3d70878 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -480,11 +480,10 @@ class full_formatter SPDLOG_FINAL : public flag_formatter msg.formatted << '['; // wrap the level name with color - msg.color_range_start = msg.formatted.size(); - msg.formatted << level::to_str(msg.level); - msg.color_range_end = msg.formatted.size(); + msg.color_range_start = msg.formatted.size(); + msg.formatted << level::to_str(msg.level); + msg.color_range_end = msg.formatted.size(); msg.formatted << "] " << fmt::StringRef(msg.raw.data(), msg.raw.size()); - } };