From dcd8f6ef0105578e10dc18975871bc59154e008c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 8 Jan 2017 22:30:15 +0000 Subject: Apply clang-tidy modernize to the codebase --- src/keys.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/keys.cc') 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"); } -- cgit v1.2.3