summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-05-17 20:17:16 +0100
committerMaxime Coste <mawww@kakoune.org>2017-05-17 20:17:16 +0100
commit3917d2670908bc8aa8cc982da3cd891691badd56 (patch)
tree3cd4598f061afeb4032b68257e0f4f9edabfdb20 /src
parent7acf11c8519733eb73b9e5e8edca98a4d95d97ac (diff)
small code cleanups
Diffstat (limited to 'src')
-rw-r--r--src/file.cc2
-rw-r--r--src/input_handler.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/file.cc b/src/file.cc
index 49fa00e5..420c957b 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -394,7 +394,7 @@ Vector<String> list_files(StringView dirname, Filter filter)
if (not dir)
return {};
- auto closeDir = on_scope_end([=]{ closedir(dir); });
+ auto close_dir = on_scope_end([dir]{ closedir(dir); });
Vector<String> result;
while (dirent* entry = readdir(dir))
diff --git a/src/input_handler.cc b/src/input_handler.cc
index 07175af9..9a4d8c83 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -1480,7 +1480,7 @@ void InputHandler::handle_key(Key key)
{
const bool was_recording = is_recording();
++m_handle_key_level;
- auto dec = on_scope_end([&]{ --m_handle_key_level; });
+ auto dec = on_scope_end([this]{ --m_handle_key_level; });
auto keymap_mode = current_mode().keymap_mode();
KeymapManager& keymaps = m_context.keymaps();