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
|
@ -100,7 +100,10 @@ vector<string> string_to_vector(const string_view str)
|
|||
|
||||
while (getline(input, element, ','))
|
||||
{
|
||||
vec.push_back(element);
|
||||
if (!element.empty())
|
||||
{
|
||||
vec.push_back(element);
|
||||
}
|
||||
}
|
||||
|
||||
return vec;
|
||||
|
|
Reference in New Issue
Block a user