fix: MSVC 14.3 complained about shadowing a symbol of second with local variable s

This commit is contained in:
Mateusz Pusz
2023-05-12 12:29:48 +02:00
parent c1385d2a67
commit 92ff1ecc07

View File

@@ -53,12 +53,12 @@ std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>&
{ {
if (os.width()) { if (os.width()) {
// std::setw() applies to the whole quantity output so it has to be first put into std::string // std::setw() applies to the whole quantity output so it has to be first put into std::string
std::basic_ostringstream<CharT, Traits> s; std::basic_ostringstream<CharT, Traits> oss;
s.flags(os.flags()); oss.flags(os.flags());
s.imbue(os.getloc()); oss.imbue(os.getloc());
s.precision(os.precision()); oss.precision(os.precision());
detail::to_stream(s, q); detail::to_stream(oss, q);
return os << s.str(); return os << std::move(oss).str();
} }
detail::to_stream(os, q); detail::to_stream(os, q);