mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
refactor(Core/Misc): add braces and impove codestyle (#6402)
This commit is contained in:
@@ -13,13 +13,17 @@ std::vector<std::string_view> Acore::Tokenize(std::string_view str, char sep, bo
|
||||
for (size_t end = str.find(sep); end != std::string_view::npos; end = str.find(sep, start))
|
||||
{
|
||||
if (keepEmpty || (start < end))
|
||||
{
|
||||
tokens.push_back(str.substr(start, end - start));
|
||||
}
|
||||
|
||||
start = end + 1;
|
||||
}
|
||||
|
||||
if (keepEmpty || (start < str.length()))
|
||||
{
|
||||
tokens.push_back(str.substr(start));
|
||||
}
|
||||
|
||||
return tokens;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user