diff options
| author | 2018-04-05 22:42:09 -0600 | |
|---|---|---|
| committer | 2018-04-05 22:42:09 -0600 | |
| commit | f9945f8a3b9f2980dc9b3c9a76343df4d254faa2 (patch) | |
| tree | 43a4ea01ad3c7a90942ad1d14f3233c5eb5634db /src | |
| parent | Merge pull request #308 from bunnei/misc-fixes-2 (diff) | |
| download | yuzu-f9945f8a3b9f2980dc9b3c9a76343df4d254faa2.tar.gz yuzu-f9945f8a3b9f2980dc9b3c9a76343df4d254faa2.tar.xz yuzu-f9945f8a3b9f2980dc9b3c9a76343df4d254faa2.zip | |
Update fmtlib to fix msvc warnings
Additionally, when updating fmtlib, there was a change in fmtlib broke
how the old logging macro was overloaded, so this works around that by
just naming the fmtlib macro impl something different
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/logging/backend.cpp | 5 | ||||
| -rw-r--r-- | src/common/logging/log.h | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 625730c6a..26cd75a3e 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -146,8 +146,9 @@ void LogMessage(Class log_class, Level log_level, const char* filename, unsigned | |||
| 146 | PrintColoredMessage(entry); | 146 | PrintColoredMessage(entry); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, | 149 | void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, |
| 150 | const char* function, const char* format, const fmt::format_args& args) { | 150 | unsigned int line_num, const char* function, const char* format, |
| 151 | const fmt::format_args& args) { | ||
| 151 | if (filter && !filter->CheckMessage(log_class, log_level)) | 152 | if (filter && !filter->CheckMessage(log_class, log_level)) |
| 152 | return; | 153 | return; |
| 153 | Entry entry = | 154 | Entry entry = |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 3c9da7f55..45821850c 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -105,13 +105,15 @@ void LogMessage(Class log_class, Level log_level, const char* filename, unsigned | |||
| 105 | ; | 105 | ; |
| 106 | 106 | ||
| 107 | /// Logs a message to the global logger, using fmt | 107 | /// Logs a message to the global logger, using fmt |
| 108 | void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, | 108 | void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, |
| 109 | const char* function, const char* format, const fmt::format_args& args); | 109 | unsigned int line_num, const char* function, const char* format, |
| 110 | const fmt::format_args& args); | ||
| 110 | 111 | ||
| 111 | template <typename... Args> | 112 | template <typename... Args> |
| 112 | void FmtLogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, | 113 | void FmtLogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, |
| 113 | const char* function, const char* format, const Args&... args) { | 114 | const char* function, const char* format, const Args&... args) { |
| 114 | LogMessage(log_class, log_level, filename, line_num, function, format, fmt::make_args(args...)); | 115 | FmtLogMessageImpl(log_class, log_level, filename, line_num, function, format, |
| 116 | fmt::make_args(args...)); | ||
| 115 | } | 117 | } |
| 116 | 118 | ||
| 117 | } // namespace Log | 119 | } // namespace Log |