mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-20 06:24:17 +00:00
Merge pull request #4156 from FearlessTobi/port-1060
Port #1060 from yuzu: "logging/backend: Use const reference to refer to log filter"
This commit is contained in:
commit
c99d197ff7
1 changed files with 3 additions and 2 deletions
|
@ -280,13 +280,14 @@ Backend* GetBackend(std::string_view backend_name) {
|
||||||
void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename,
|
void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename,
|
||||||
unsigned int line_num, const char* function, const char* format,
|
unsigned int line_num, const char* function, const char* format,
|
||||||
const fmt::format_args& args) {
|
const fmt::format_args& args) {
|
||||||
auto filter = Impl::Instance().GetGlobalFilter();
|
auto& instance = Impl::Instance();
|
||||||
|
const auto& filter = instance.GetGlobalFilter();
|
||||||
if (!filter.CheckMessage(log_class, log_level))
|
if (!filter.CheckMessage(log_class, log_level))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Entry entry =
|
Entry entry =
|
||||||
CreateEntry(log_class, log_level, filename, line_num, function, fmt::vformat(format, args));
|
CreateEntry(log_class, log_level, filename, line_num, function, fmt::vformat(format, args));
|
||||||
|
|
||||||
Impl::Instance().PushEntry(std::move(entry));
|
instance.PushEntry(std::move(entry));
|
||||||
}
|
}
|
||||||
} // namespace Log
|
} // namespace Log
|
||||||
|
|
Loading…
Reference in a new issue