File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -73,14 +73,15 @@ bool LogAcceptCategory(const char* category);
73
73
/* * Send a string to the log output */
74
74
int LogPrintStr (const std::string &str);
75
75
76
- #define LogPrintf (...) LogPrint(NULL , __VA_ARGS__)
77
-
78
- template <typename ... Args>
79
- static inline int LogPrint (const char * category, const char * fmt, const Args&... args)
80
- {
81
- if (!LogAcceptCategory (category)) return 0 ; \
82
- return LogPrintStr (tfm::format (fmt, args...));
83
- }
76
+ #define LogPrint (category, ...) do { \
77
+ if (LogAcceptCategory ((category))) { \
78
+ LogPrintStr (tfm::format (__VA_ARGS__)); \
79
+ } \
80
+ } while (0 )
81
+
82
+ #define LogPrintf (...) do { \
83
+ LogPrintStr (tfm::format (__VA_ARGS__)); \
84
+ } while (0 )
84
85
85
86
template <typename ... Args>
86
87
bool error (const char * fmt, const Args&... args)
You can’t perform that action at this time.
0 commit comments