Replace std::ostringstream usage with fmt::format

This commit is contained in:
get
2023-06-17 19:23:49 -05:00
parent 44498872e9
commit ffabb6c57b
6 changed files with 27 additions and 49 deletions

View File

@ -162,15 +162,12 @@ void Device::AddCombinedInput(std::string name, const std::pair<std::string, std
std::string DeviceQualifier::ToString() const
{
if (source.empty() && (cid < 0) && name.empty())
return "";
return {};
std::ostringstream ss;
ss << source << '/';
if (cid > -1)
ss << cid;
ss << '/' << name;
return ss.str();
return fmt::format("{}/{}/{}", source, cid, name);
else
return fmt::format("{}//{}", source, name);
}
//