fixing ...\include\spdlog\pattern_formatter-inl.h(1319): warning C26800: Use of a moved from object: ''user_chars'' (lifetime.1).
This commit is contained in:
parent
e593f6695c
commit
b1059035b7
@ -1308,7 +1308,7 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter
|
||||
if (*it == '%') {
|
||||
if (user_chars) // append user chars found so far
|
||||
{
|
||||
formatters_.push_back(std::move(user_chars));
|
||||
formatters_.emplace_back(user_chars.release());
|
||||
}
|
||||
|
||||
auto padding = handle_padspec_(++it, end);
|
||||
@ -1332,7 +1332,7 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter
|
||||
}
|
||||
if (user_chars) // append raw chars found so far
|
||||
{
|
||||
formatters_.push_back(std::move(user_chars));
|
||||
}
|
||||
formatters_.emplace_back(user_chars.release());
|
||||
}
|
||||
}
|
||||
} // namespace spdlog
|
||||
|
Loading…
Reference in New Issue
Block a user