From d12a858897f35776960103f4c730440d46a6153e Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 6 Apr 2019 01:37:27 +0300 Subject: [PATCH] some cleanup --- include/spdlog/common.h | 11 +++-------- src/sink.cpp | 2 -- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 275ea23b..933589af 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -70,6 +70,7 @@ #endif #if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) +using filename_t = std::wstring; #define SPDLOG_FILENAME_T(s) L##s SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) { @@ -77,6 +78,7 @@ SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) return c.to_bytes(filename); } #else +using filename_t = std::string; #define SPDLOG_FILENAME_T(s) s #endif @@ -210,14 +212,7 @@ private: std::string msg_; }; -// -// wchar support for windows file names (SPDLOG_WCHAR_FILENAMES must be defined) -// -#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) -using filename_t = std::wstring; -#else -using filename_t = std::string; -#endif + struct source_loc { diff --git a/src/sink.cpp b/src/sink.cpp index 0d308748..7f9e84e5 100644 --- a/src/sink.cpp +++ b/src/sink.cpp @@ -27,5 +27,3 @@ SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const { return static_cast(level_.load(std::memory_order_relaxed)); } - -