Merge pull request #3 from lioncash/forward

logvisor: std::forward arguments where applicable
This commit is contained in:
Phillip Stephens 2019-08-26 15:55:08 -07:00 committed by GitHub
commit 8ea97c524c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -220,7 +220,7 @@ public:
return;
_vreport(severity, fmt::to_string_view<Char>(format),
fmt::basic_format_args<fmt::buffer_context<Char>>(
fmt::internal::make_args_checked<Args...>(format, args...)));
fmt::internal::make_args_checked<Args...>(format, std::forward<Args>(args)...)));
}
template <typename Char>
@ -242,10 +242,9 @@ public:
void reportSource(Level severity, const char* file, unsigned linenum, const S& format, Args&&... args) {
if (MainLoggers.empty() && severity != Level::Fatal)
return;
_vreportSource(
severity, file, linenum, fmt::to_string_view<Char>(format),
fmt::basic_format_args<fmt::buffer_context<Char>>(
fmt::internal::make_args_checked<Args...>(format, args...)));
_vreportSource(severity, file, linenum, fmt::to_string_view<Char>(format),
fmt::basic_format_args<fmt::buffer_context<Char>>(
fmt::internal::make_args_checked<Args...>(format, std::forward<Args>(args)...)));
}
template <typename Char>