summaryrefslogtreecommitdiff
path: root/src/normal.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-03-08 11:40:50 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-03-08 11:40:50 +0000
commit0bbaef6e48c7a22b59e2c70304f6ccbf17324412 (patch)
treea95dc56fac7cdc76383eb2ced803d58834f6b933 /src/normal.hh
parent3ece7bcf75d3cb7e2dad50497c11d1069f486c0e (diff)
Use a sorted array for keymap rather than an unordered map
with ~100 entry, a binary search finds in < 7 step, unordered map is overkill.
Diffstat (limited to 'src/normal.hh')
-rw-r--r--src/normal.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/normal.hh b/src/normal.hh
index 7f90075d..4a453415 100644
--- a/src/normal.hh
+++ b/src/normal.hh
@@ -18,12 +18,13 @@ struct NormalParams
struct NormalCmdDesc
{
+ Key key;
StringView docstring;
void (*func)(Context& context, NormalParams params);
};
-using KeyMap = UnorderedMap<Key, NormalCmdDesc>;
-extern const KeyMap keymap;
+using KeyMap = Vector<NormalCmdDesc>;
+extern KeyMap keymap;
}