refactor: IKeyState: use emplace in place of insert for set addition
This commit is contained in:
parent
1e7143b85e
commit
59c414ebad
1 changed files with 2 additions and 2 deletions
|
|
@ -127,14 +127,14 @@ void IKeyState::KeyInfo::split(const char *screens, std::set<std::string> &dst)
|
|||
return;
|
||||
}
|
||||
if (screens[0] == '*') {
|
||||
dst.insert("*");
|
||||
dst.emplace("*");
|
||||
return;
|
||||
}
|
||||
|
||||
const char *i = screens + 1;
|
||||
while (*i != '\0') {
|
||||
const char *j = strchr(i, ':');
|
||||
dst.insert(std::string(i, j - i));
|
||||
dst.emplace(std::string(i, j - i));
|
||||
i = j + 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue