diff options
Diffstat (limited to 'source/blender/blenlib/intern/string_search.cc')
-rw-r--r-- | source/blender/blenlib/intern/string_search.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/source/blender/blenlib/intern/string_search.cc b/source/blender/blenlib/intern/string_search.cc index 08ba473f96b..02b0b814659 100644 --- a/source/blender/blenlib/intern/string_search.cc +++ b/source/blender/blenlib/intern/string_search.cc @@ -35,14 +35,6 @@ static int64_t count_utf8_code_points(StringRef str) return static_cast<int64_t>(BLI_strnlen_utf8(str.data(), static_cast<size_t>(str.size()))); } -/** - * Computes the cost of transforming string a into b. The cost/distance is the minimal number of - * operations that need to be executed. Valid operations are deletion, insertion, substitution and - * transposition. - * - * This function is utf8 aware in the sense that it works at the level of individual code points - * (1-4 bytes long) instead of on individual bytes. - */ int damerau_levenshtein_distance(StringRef a, StringRef b) { constexpr int deletion_cost = 1; @@ -106,10 +98,6 @@ int damerau_levenshtein_distance(StringRef a, StringRef b) return v1.last(); } -/** - * Returns -1 when this is no reasonably good match. - * Otherwise returns the number of errors in the match. - */ int get_fuzzy_match_errors(StringRef query, StringRef full) { /* If it is a perfect partial match, return immediately. */ @@ -346,10 +334,6 @@ static int score_query_against_words(Span<StringRef> query_words, Span<StringRef return total_match_score; } -/** - * Splits a string into words and normalizes them (currently that just means converting to lower - * case). The returned strings are allocated in the given allocator. - */ void extract_normalized_words(StringRef str, LinearAllocator<> &allocator, Vector<StringRef, 64> &r_words) @@ -417,10 +401,6 @@ StringSearch *BLI_string_search_new() return new StringSearch(); } -/** - * Add a new possible result to the search. - * The caller keeps ownership of all parameters. - */ void BLI_string_search_add(StringSearch *search, const char *str, void *user_data) { using namespace blender; @@ -431,11 +411,6 @@ void BLI_string_search_add(StringSearch *search, const char *str, void *user_dat {search->allocator.construct_array_copy(words.as_span()), (int)str_ref.size(), user_data}); } -/** - * Filter and sort all previously added search items. - * Returns an array containing the filtered user data. - * The caller has to free the returned array. - */ int BLI_string_search_query(StringSearch *search, const char *query, void ***r_data) { using namespace blender; |