Don't add empty elements to vector.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
45f69b1c75
commit
399ee40571
|
@ -99,9 +99,12 @@ vector<string> string_to_vector(const string_view str)
|
|||
string element;
|
||||
|
||||
while (getline(input, element, ','))
|
||||
{
|
||||
if (!element.empty())
|
||||
{
|
||||
vec.push_back(element);
|
||||
}
|
||||
}
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
|
Reference in New Issue
Block a user