Replacing std::stringstream with std::format
Similar to #7113 (closed), we could replace usages of std::stringstream
with the faster and more readable new std::format
.
(see https://en.cppreference.com/w/cpp/utility/format/format)
So this
void Manager::setInt(std::string_view setting, std::string_view category, const int value)
{
std::ostringstream stream;
stream << value;
setString(setting, category, stream.str());
}
would become something like this
void Manager::setInt(std::string_view setting, std::string_view category, const int value)
{
setString(setting, category, std::format("{}", value));
}