diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-07-23 05:29:32 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-07-25 07:56:57 +0000 |
commit | c703043e1d0ff1501ecd5c19c490a4911240744a (patch) | |
tree | db84e9461bce0f766658afb03c8f27de99f2b897 /searchlib | |
parent | 78a211072a21ec5f368b99bce19c1b703d98152d (diff) |
Use WordFolder as helper instead of inheriting static stuff.
Diffstat (limited to 'searchlib')
4 files changed, 4 insertions, 5 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/string_search_helper.h b/searchlib/src/vespa/searchlib/attribute/string_search_helper.h index 7bfcf0e4292..5763ddcb80a 100644 --- a/searchlib/src/vespa/searchlib/attribute/string_search_helper.h +++ b/searchlib/src/vespa/searchlib/attribute/string_search_helper.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastlib/text/unicodeutil.h> #include <vespa/vespalib/regex/regex.h> namespace vespalib { class FuzzyMatcher; } @@ -30,6 +29,7 @@ public: const vespalib::Regex & getRegex() const noexcept { return _regex; } const FuzzyMatcher & getFuzzyMatcher() const noexcept { return *_fuzzyMatcher; } private: + using ucs4_t = unsigned int; vespalib::Regex _regex; std::unique_ptr<FuzzyMatcher> _fuzzyMatcher; std::unique_ptr<ucs4_t[]> _ucs4; diff --git a/searchlib/src/vespa/searchlib/query/query_term_ucs4.cpp b/searchlib/src/vespa/searchlib/query/query_term_ucs4.cpp index 8c3c2514877..27cadeeb300 100644 --- a/searchlib/src/vespa/searchlib/query/query_term_ucs4.cpp +++ b/searchlib/src/vespa/searchlib/query/query_term_ucs4.cpp @@ -31,7 +31,7 @@ QueryTermUCS4::QueryTermUCS4(const string & termS, Type type) : } } -const ucs4_t * +const QueryTermUCS4::ucs4_t * QueryTermUCS4::fillUCS4() { /* * Double checked locking...... @@ -49,7 +49,7 @@ QueryTermUCS4::fillUCS4() { return next; } -std::unique_ptr<ucs4_t[]> +std::unique_ptr<QueryTermUCS4::ucs4_t[]> QueryTermUCS4::asUcs4() const { auto ucs4 = std::make_unique<ucs4_t[]>(_cachedTermLen + 1); vespalib::Utf8Reader r(getTermString()); diff --git a/searchlib/src/vespa/searchlib/query/query_term_ucs4.h b/searchlib/src/vespa/searchlib/query/query_term_ucs4.h index 673927cf685..a987a22f67b 100644 --- a/searchlib/src/vespa/searchlib/query/query_term_ucs4.h +++ b/searchlib/src/vespa/searchlib/query/query_term_ucs4.h @@ -2,7 +2,6 @@ #pragma once #include "query_term_simple.h" -#include <vespa/fastlib/text/unicodeutil.h> #include <atomic> namespace search { @@ -12,6 +11,7 @@ namespace search { */ class QueryTermUCS4 : public QueryTermSimple { public: + using ucs4_t = unsigned int; QueryTermUCS4(const QueryTermUCS4 &) = delete; QueryTermUCS4 & operator = (const QueryTermUCS4 &) = delete; QueryTermUCS4(QueryTermUCS4 &&) = delete; diff --git a/searchlib/src/vespa/searchlib/query/streaming/queryterm.h b/searchlib/src/vespa/searchlib/query/streaming/queryterm.h index 51987225692..8c7b8385d6b 100644 --- a/searchlib/src/vespa/searchlib/query/streaming/queryterm.h +++ b/searchlib/src/vespa/searchlib/query/streaming/queryterm.h @@ -4,7 +4,6 @@ #include "hit.h" #include "querynode.h" #include "querynoderesultbase.h" -#include <vespa/fastlib/text/unicodeutil.h> #include <vespa/searchlib/query/query_term_ucs4.h> #include <vespa/searchlib/query/weight.h> #include <vespa/vespalib/objects/objectvisitor.h> |