mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-10 19:13:29 +00:00
Fix LOG(LogLevel) for MSVC compiler
This commit is contained in:
parent
2366721a82
commit
a911915aab
@ -89,10 +89,10 @@ std::ostream& base::get_log_stream(LogLevel level)
|
||||
return log_stream;
|
||||
}
|
||||
|
||||
void LOG(const char* format, ...)
|
||||
std::ostream& LOG(const char* format, ...)
|
||||
{
|
||||
if (log_level < INFO)
|
||||
return;
|
||||
return null_stream;
|
||||
|
||||
char buf[2048];
|
||||
va_list ap;
|
||||
@ -106,4 +106,5 @@ void LOG(const char* format, ...)
|
||||
#endif
|
||||
|
||||
va_end(ap);
|
||||
return log_stream;
|
||||
}
|
||||
|
@ -21,9 +21,6 @@ enum LogLevel {
|
||||
VERBOSE = 5, // Information step by step
|
||||
};
|
||||
|
||||
// E.g. LOG("text in information log level\n");
|
||||
void LOG(const char* format, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <iosfwd>
|
||||
|
||||
@ -36,6 +33,9 @@ namespace base {
|
||||
|
||||
} // namespace base
|
||||
|
||||
// E.g. LOG("text in information log level\n");
|
||||
std::ostream& LOG(const char* format, ...);
|
||||
|
||||
// E.g. LOG(INFO) << "some information\n";
|
||||
inline std::ostream& LOG(LogLevel level) {
|
||||
return base::get_log_stream(level);
|
||||
|
Loading…
x
Reference in New Issue
Block a user