refactor: use strprintf for creating unknown-service-flag string

No need to use a stringstream here.
This commit is contained in:
Sebastian Falbesoner 2022-08-20 15:01:57 +02:00
parent c73c8d53fe
commit 706c8e0969

View File

@ -199,12 +199,7 @@ static std::string serviceFlagToStr(size_t bit)
// Not using default, so we get warned when a case is missing // Not using default, so we get warned when a case is missing
} }
std::ostringstream stream; return strprintf("UNKNOWN[2^%u]", bit);
stream.imbue(std::locale::classic());
stream << "UNKNOWN[";
stream << "2^" << bit;
stream << "]";
return stream.str();
} }
std::vector<std::string> serviceFlagsToStr(uint64_t flags) std::vector<std::string> serviceFlagsToStr(uint64_t flags)