diff options
Diffstat (limited to 'indexer/ftraits.hpp')
-rw-r--r-- | indexer/ftraits.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indexer/ftraits.hpp b/indexer/ftraits.hpp index 35ac7f3241..6a301c5a9f 100644 --- a/indexer/ftraits.hpp +++ b/indexer/ftraits.hpp @@ -110,7 +110,7 @@ class UGC : public TraitsBase<UGC, UGCItem> ASSERT_EQUAL(row.size(), 5, ()); UGCItem item(ReadMasks(row), ParseByWhitespaces(row[kCategoriesPos])); - auto typePath = ParseByWhitespaces(row[kTypePos]); + auto typePath = ParseByDashes(row[kTypePos]); if (IsUGCAvailable(item.m_mask)) m_matcher.AppendType(std::move(typePath), std::move(item)); @@ -147,6 +147,16 @@ class UGC : public TraitsBase<UGC, UGCItem> return {std::istream_iterator<std::string>(iss), std::istream_iterator<std::string>()}; } + std::vector<std::string> ParseByDashes(std::string const & str) + { + std::vector<std::string> result; + std::istringstream iss(str); + for (std::string tmp; std::getline(iss, tmp, '-'); ) + result.push_back(tmp); + + return result; + } + public: static bool IsUGCAvailable(UGCTypeMask mask) { return mask != UGCTYPE_NONE; } static bool IsRatingAvailable(UGCTypeMask mask) { return mask & UGCTYPE_RATING; } |