From 5ebcd3de98bd109b6dbcbddd7ef1d63d9601aa5f Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 14 Sep 2019 14:22:37 -0700 Subject: [PATCH] Remove some unnecessary string formatting --- src/builtin_bind.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/builtin_bind.cpp b/src/builtin_bind.cpp index 0bd60682a..a3fa5abd2 100644 --- a/src/builtin_bind.cpp +++ b/src/builtin_bind.cpp @@ -133,10 +133,9 @@ void builtin_bind_t::list(const wchar_t *bind_mode, bool user, io_streams_t &str /// are defined for this terminal are printed. void builtin_bind_t::key_names(bool all, io_streams_t &streams) { const wcstring_list_t names = input_terminfo_get_names(!all); - for (size_t i = 0; i < names.size(); i++) { - const wcstring &name = names.at(i); - - streams.out.append_format(L"%ls\n", name.c_str()); + for (const wcstring &name : names) { + streams.out.append(name); + streams.out.append(L'\n'); } }