refactor: IKeyState: use emplace in place of insert for set addition
This commit is contained in:
committed by
Chris Rizzitello
parent
1e7143b85e
commit
59c414ebad
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user