File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -62,17 +62,15 @@ bool LogAcceptCategory(const char* category);
6262/* * Send a string to the log output */
6363int LogPrintStr (const std::string& str);
6464
65- #define LogPrintf (...) LogPrint(NULL , __VA_ARGS__)
66-
67- /* * Get format string from VA_ARGS for error reporting */
68- template <typename ... Args> std::string FormatStringFromLogArgs (const char *fmt, const Args&... args) { return fmt; }
69-
70- template <typename ... Args>
71- static inline int LogPrint (const char * category, const char * fmt, const Args&... args)
72- {
73- if (!LogAcceptCategory (category)) return 0 ; \
74- return LogPrintStr (tfm::format (fmt, args...));
75- }
65+ #define LogPrint (category, ...) do { \
66+ if (LogAcceptCategory ((category))) { \
67+ LogPrintStr (tfm::format (__VA_ARGS__)); \
68+ } \
69+ } while (0 )
70+
71+ #define LogPrintf (...) do { \
72+ LogPrintStr (tfm::format (__VA_ARGS__)); \
73+ } while (0 )
7674
7775template <typename ... Args>
7876bool error (const char * fmt, const Args&... args)
You can’t perform that action at this time.
0 commit comments