use emplace_back()'s return to swap string

This commit is contained in:
Andrei BENCSIK 2022-11-18 22:01:03 +02:00 committed by Steve Cotton
parent 03a70c5a2d
commit aa3d399f9d

View File

@ -65,8 +65,7 @@ std::vector<std::string> win32_read_argv(const std::string& input)
std::vector<std::string> res; std::vector<std::string> res;
while(win32_parse_single_arg(start, end, buffer)) { while(win32_parse_single_arg(start, end, buffer)) {
res.emplace_back(); res.emplace_back().swap(buffer);
res.back().swap(buffer);
} }
return res; return res;