mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-16 00:45:48 +08:00
some cleanup
This commit is contained in:
parent
9716ff69c4
commit
d12a858897
@ -70,6 +70,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES)
|
#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES)
|
||||||
|
using filename_t = std::wstring;
|
||||||
#define SPDLOG_FILENAME_T(s) L##s
|
#define SPDLOG_FILENAME_T(s) L##s
|
||||||
SPDLOG_INLINE std::string filename_to_str(const filename_t &filename)
|
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);
|
return c.to_bytes(filename);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
using filename_t = std::string;
|
||||||
#define SPDLOG_FILENAME_T(s) s
|
#define SPDLOG_FILENAME_T(s) s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -210,14 +212,7 @@ private:
|
|||||||
std::string msg_;
|
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
|
struct source_loc
|
||||||
{
|
{
|
||||||
|
@ -27,5 +27,3 @@ SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const
|
|||||||
{
|
{
|
||||||
return static_cast<spdlog::level::level_enum>(level_.load(std::memory_order_relaxed));
|
return static_cast<spdlog::level::level_enum>(level_.load(std::memory_order_relaxed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user