use emplace_back()'s return to swap string
This commit is contained in:
parent
03a70c5a2d
commit
aa3d399f9d
1 changed files with 1 additions and 2 deletions
|
@ -65,8 +65,7 @@ std::vector<std::string> win32_read_argv(const std::string& input)
|
|||
std::vector<std::string> res;
|
||||
|
||||
while(win32_parse_single_arg(start, end, buffer)) {
|
||||
res.emplace_back();
|
||||
res.back().swap(buffer);
|
||||
res.emplace_back().swap(buffer);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
Loading…
Add table
Reference in a new issue