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 @@ -74,14 +74,15 @@ bool LogAcceptCategory(const char* category);
74
74
/* * Send a string to the log output */
75
75
int LogPrintStr (const std::string &str);
76
76
77
- #define LogPrintf (...) LogPrint(NULL , __VA_ARGS__)
78
-
79
- template <typename ... Args>
80
- static inline int LogPrint (const char * category, const char * fmt, const Args&... args)
81
- {
82
- if (!LogAcceptCategory (category)) return 0 ; \
83
- return LogPrintStr (tfm::format (fmt, args...));
84
- }
77
+ #define LogPrint (category, ...) do { \
78
+ if (LogAcceptCategory ((category))) { \
79
+ LogPrintStr (tfm::format (__VA_ARGS__)); \
80
+ } \
81
+ } while (0 )
82
+
83
+ #define LogPrintf (...) do { \
84
+ LogPrintStr (tfm::format (__VA_ARGS__)); \
85
+ } while (0 )
85
86
86
87
template <typename ... Args>
87
88
bool error (const char * fmt, const Args&... args)
You can’t perform that action at this time.
0 commit comments