mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
Undo fix #529 (causes a warning under gcc and clang when no args passed)
This commit is contained in:
parent
de595fe2b7
commit
6dd928dc3c
@ -165,13 +165,15 @@ void drop_all();
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef SPDLOG_TRACE_ON
|
#ifdef SPDLOG_TRACE_ON
|
||||||
|
#define SPDLOG_STR_H(x) #x
|
||||||
|
#define SPDLOG_STR_HELPER(x) SPDLOG_STR_H(x)
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define SPDLOG_TRACE(logger, s, ...) logger->trace(fmt::format("[ {}({}) ] {}", __FILE__, __LINE__, (s)).c_str(), ##__VA_ARGS__);
|
#define SPDLOG_TRACE(logger, ...) logger->trace("[ " __FILE__ "(" SPDLOG_STR_HELPER(__LINE__) ") ] " __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define SPDLOG_TRACE(logger, s, ...) logger->trace(fmt::format("[ {}:{} ] {}", __FILE__, __LINE__, (s)).c_str(), ##__VA_ARGS__);
|
#define SPDLOG_TRACE(logger, ...) logger->trace("[ " __FILE__ ":" SPDLOG_STR_HELPER(__LINE__) " ] " __VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define SPDLOG_TRACE(logger, s, ...)
|
#define SPDLOG_TRACE(logger, ...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPDLOG_DEBUG_ON
|
#ifdef SPDLOG_DEBUG_ON
|
||||||
|
Loading…
Reference in New Issue
Block a user