aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-06-02 01:14:26 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-06-02 01:14:26 -0700
commit464187491f910ab2cb8bb0a1bdc6013f10fcd319 (patch)
tree5b51990117d7778e6e536dd424ace26c376931a7 /common.h
parentfd15d30987af6104c060b91c60dbe34c8c3a42d7 (diff)
Formatting
Diffstat (limited to 'common.h')
-rw-r--r--common.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/common.h b/common.h
index 735867bc..57fe7fa1 100644
--- a/common.h
+++ b/common.h
@@ -250,22 +250,22 @@ enum fuzzy_match_type_t
{
/* We match the string exactly: FOOBAR matches FOOBAR */
fuzzy_match_exact = 0,
-
+
/* We match a prefix of the string: FO matches FOOBAR */
fuzzy_match_prefix,
-
+
/* We match the string exactly, but in a case insensitive way: foobar matches FOOBAR */
fuzzy_match_case_insensitive,
-
+
/* We match a prefix of the string, in a case insensitive way: foo matches FOOBAR */
fuzzy_match_prefix_case_insensitive,
-
+
/* We match a substring of the string: OOBA matches FOOBAR */
fuzzy_match_substring,
-
+
/* A subsequence match with insertions only: FBR matches FOOBAR */
fuzzy_match_subsequence_insertions_only,
-
+
/* We don't match the string */
fuzzy_match_none
};
@@ -302,14 +302,14 @@ static inline bool match_type_shares_prefix(fuzzy_match_type_t t)
struct string_fuzzy_match_t
{
enum fuzzy_match_type_t type;
-
+
/* Strength of the match. The value depends on the type. Lower is stronger. */
size_t match_distance_first;
size_t match_distance_second;
-
+
/* Constructor */
string_fuzzy_match_t(enum fuzzy_match_type_t t, size_t distance_first = 0, size_t distance_second = 0);
-
+
/* Return -1, 0, 1 if this match is (respectively) better than, equal to, or worse than rhs */
int compare(const string_fuzzy_match_t &rhs) const;
};