summaryrefslogtreecommitdiff
path: root/src/keys.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-01-08 22:30:15 +0000
committerMaxime Coste <mawww@kakoune.org>2017-01-08 22:39:01 +0000
commitdcd8f6ef0105578e10dc18975871bc59154e008c (patch)
tree2e0e2e11d4afcf9c351c3a7dd8c9847b253d3017 /src/keys.cc
parent9dfd17a5bc584a66711707044bdf27ff57e7aebb (diff)
Apply clang-tidy modernize to the codebase
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");
}