diff options
author | vng <viktor.govako@gmail.com> | 2012-02-04 18:21:56 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:33:16 +0300 |
commit | f541b83d13b499c1fe7bf3228ed028e4e16c5ce5 (patch) | |
tree | 2741841f638bd77315b1730b9726220cb6006857 /indexer | |
parent | 2ff43f26b708913156622494852fa7245a64dbc3 (diff) |
[search] '-' is not a delimiter in categories. We use it as a separator.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/search_delimiters.cpp | 10 | ||||
-rw-r--r-- | indexer/search_delimiters.hpp | 16 |
2 files changed, 20 insertions, 6 deletions
diff --git a/indexer/search_delimiters.cpp b/indexer/search_delimiters.cpp index 237942dc5b..b4eb379016 100644 --- a/indexer/search_delimiters.cpp +++ b/indexer/search_delimiters.cpp @@ -60,4 +60,14 @@ bool Delimiters::operator()(strings::UniChar c) const return false; } +bool CategoryDelimiters::operator()(strings::UniChar c) const +{ + // In categories.txt we use '-' as a delimeter. + // Do not skip this. + if (c == '-') + return false; + + return Delimiters::operator()(c); +} + } diff --git a/indexer/search_delimiters.hpp b/indexer/search_delimiters.hpp index 848c670aff..95f77eaa25 100644 --- a/indexer/search_delimiters.hpp +++ b/indexer/search_delimiters.hpp @@ -4,11 +4,15 @@ namespace search { + class Delimiters + { + public: + bool operator()(strings::UniChar c) const; + }; -class Delimiters -{ -public: - bool operator()(strings::UniChar c) const; -}; - + class CategoryDelimiters : public Delimiters + { + public: + bool operator()(strings::UniChar c) const; + }; } |