diff options
| author | Ruslan Mustakov | 2017-10-10 12:08:36 +0700 |
|---|---|---|
| committer | Ruslan Mustakov | 2017-10-10 12:09:59 +0700 |
| commit | 73e86187bc193c29f806ee00a77f2765dda27b01 (patch) | |
| tree | 10fce2a804b8d832c4f8041438b0742822412aa5 /core/io/logger.cpp | |
| parent | 17011f5d123879eb9fcd4ea25b92365f7d2061f7 (diff) | |
| download | godot-73e86187bc193c29f806ee00a77f2765dda27b01.tar.gz godot-73e86187bc193c29f806ee00a77f2765dda27b01.tar.zst godot-73e86187bc193c29f806ee00a77f2765dda27b01.zip | |
Diffstat (limited to 'core/io/logger.cpp')
| -rw-r--r-- | core/io/logger.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/io/logger.cpp b/core/io/logger.cpp index b94007d31..ad6371f1e 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -33,6 +33,17 @@ #include "os/os.h" #include "print_string.h" +// va_copy was defined in the C99, but not in C++ standards before C++11. +// When you compile C++ without --std=c++<XX> option, compilers still define +// va_copy, otherwise you have to use the internal version (__va_copy). +#if !defined(va_copy) +#if defined(__GNUC__) +#define va_copy(d, s) __va_copy(d, s) +#else +#define va_copy(d, s) ((d) = (s)) +#endif +#endif + bool Logger::should_log(bool p_err) { return (!p_err || _print_error_enabled) && (p_err || _print_line_enabled); } |
