Fix clang-tidy performance-faster-string-find warnings

This commit is contained in:
Eduardo Almeida
2022-10-06 22:25:16 +00:00
parent c1e7757315
commit afb0f160d4
22 changed files with 71 additions and 71 deletions

View File

@@ -78,8 +78,8 @@ static std::map<uint32_t, uint32_t> ssThreshValue; //!< SlowStart threshold val
static uint32_t
GetNodeIdFromContext (std::string context)
{
std::size_t const n1 = context.find_first_of ("/", 1);
std::size_t const n2 = context.find_first_of ("/", n1 + 1);
std::size_t const n1 = context.find_first_of ('/', 1);
std::size_t const n2 = context.find_first_of ('/', n1 + 1);
return std::stoul (context.substr (n1 + 1, n2 - n1 - 1));
}