summaryrefslogtreecommitdiff
path: root/src/ranked_match.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-10-22 19:49:08 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-10-22 19:49:08 +0100
commitc77cb7c777ffc6f23ad53003d3531c1957fcdd0b (patch)
tree2f4454188d84c1a6ed20169ad2b6b5f62b384e80 /src/ranked_match.hh
parent019b3235b0e7aaad086631e1ee9b3102f096d349 (diff)
Extract WordDB::RankedWord as RankedMatch in its own file
Diffstat (limited to 'src/ranked_match.hh')
-rw-r--r--src/ranked_match.hh21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ranked_match.hh b/src/ranked_match.hh
new file mode 100644
index 00000000..2e248dc1
--- /dev/null
+++ b/src/ranked_match.hh
@@ -0,0 +1,21 @@
+#ifndef ranked_match_hh_INCLUDED
+#define ranked_match_hh_INCLUDED
+
+#include "string.hh"
+#include "vector.hh"
+
+namespace Kakoune
+{
+
+struct RankedMatch
+{
+ StringView word;
+ int rank;
+};
+using RankedMatchList = Vector<RankedMatch>;
+
+int match_rank(StringView candidate, StringView query);
+
+}
+
+#endif // ranked_match_hh_INCLUDED