X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FKeyMap.cpp;h=af5f5b8223eaf1c685bb7654c6672b606a010123;hb=057d83d8ae782c9cae06a108707b82cc77315cde;hp=7628d0dfdbb37b9fa25d99bc6385627d4bd8cc56;hpb=f09a9fe2e60e4aeaca23b42b2bf30f5d64cfd9b1;p=lyx.git diff --git a/src/KeyMap.cpp b/src/KeyMap.cpp index 7628d0dfdb..af5f5b8223 100644 --- a/src/KeyMap.cpp +++ b/src/KeyMap.cpp @@ -106,6 +106,8 @@ void KeyMap::bind(KeySequence * seq, FuncRequest const & func, unsigned int r) KeyModifier const mod2 = seq->modifiers[r].second; // check if key is already there + // FIXME perf: Profiling shows that this is responsible of 99% of the + // cost of GuiPrefs::applyView() Table::iterator end = table.end(); for (Table::iterator it = table.begin(); it != end; ++it) { if (code == it->code @@ -479,7 +481,7 @@ docstring KeyMap::printBindings(FuncRequest const & func, Bindings bindings = findBindings(func); if (bindings.empty()) return docstring(); - + odocstringstream res; Bindings::const_iterator cit = bindings.begin(); Bindings::const_iterator cit_end = bindings.end(); @@ -542,7 +544,7 @@ KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) con } if (!has_action) list.push_back(Binding(FuncRequest(action), KeySequence(0, 0), tag)); - } + } } return list; }