mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
add (void)0 when logging is disabled
This commit is contained in:
parent
a2890f2778
commit
f25f0e0e40
@ -173,16 +173,15 @@ void drop_all();
|
||||
# define SPDLOG_TRACE(logger, ...) logger->trace("[ " __FILE__ ":" SPDLOG_STR_HELPER(__LINE__) " ] " __VA_ARGS__)
|
||||
# endif
|
||||
#else
|
||||
#define SPDLOG_TRACE(logger, ...)
|
||||
# define SPDLOG_TRACE(logger, ...) (void)0
|
||||
#endif
|
||||
|
||||
#ifdef SPDLOG_DEBUG_ON
|
||||
# define SPDLOG_DEBUG(logger, ...) logger->debug(__VA_ARGS__)
|
||||
#else
|
||||
#define SPDLOG_DEBUG(logger, ...)
|
||||
# define SPDLOG_DEBUG(logger, ...) (void)0
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
#include "details/spdlog_impl.h"
|
||||
|
Loading…
Reference in New Issue
Block a user