summaryrefslogtreecommitdiff
path: root/src/keys.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/keys.cc')
-rw-r--r--src/keys.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keys.cc b/src/keys.cc
index c9031732..193d4d52 100644
--- a/src/keys.cc
+++ b/src/keys.cc
@@ -64,14 +64,14 @@ KeyList parse_keys(StringView str)
{
if (*it != '<')
{
- result.push_back({Key::Modifiers::None, *it});
+ result.emplace_back(Key::Modifiers::None, *it);
continue;
}
Utf8It end_it = std::find(it, str_end, '>');
if (end_it == str_end)
{
- result.push_back({Key::Modifiers::None, *it});
+ result.emplace_back(Key::Modifiers::None, *it);
continue;
}
@@ -95,12 +95,12 @@ KeyList parse_keys(StringView str)
if (name_it != end(keynamemap))
result.push_back(canonicalize_ifn({ modifier, name_it->key }));
else if (desc.char_length() == 1)
- result.push_back(Key{ modifier, desc[0_char] });
+ result.emplace_back(modifier, desc[0_char]);
else if (to_lower(desc[0_byte]) == 'f' and desc.length() <= 3)
{
int val = str_to_int(desc.substr(1_byte));
if (val >= 1 and val <= 12)
- result.push_back(Key{ modifier, Key::F1 + (val - 1) });
+ result.emplace_back(modifier, Key::F1 + (val - 1));
else
throw runtime_error("Only F1 through F12 are supported");
}