Use std::istringstream or std::ostringstream instead of std::stringstream where possible.

This removes std::iostream from the inheritance chain, which reduces
overhead slightly.
This commit is contained in:
David Korth
2019-09-14 16:40:34 -04:00
parent 6e549bb668
commit c2dd2e8a2e
14 changed files with 20 additions and 20 deletions

View File

@ -464,7 +464,7 @@ std::string FormatSize(u64 bytes)
// Don't need exact values, only 5 most significant digits
const double unit_size = std::pow(2, unit * 10);
std::stringstream ss;
std::ostringstream ss;
ss << std::fixed << std::setprecision(2);
ss << bytes / unit_size << ' ' << Common::GetStringT(unit_symbols[unit]);
return ss.str();