diff options
author | Tor Egge <tegge@oath.com> | 2017-08-24 15:26:33 +0000 |
---|---|---|
committer | Tor Egge <tegge@oath.com> | 2017-08-24 15:26:33 +0000 |
commit | 7130e4a693eb2d5bc5e0e5d99a29141850f9a51a (patch) | |
tree | 0a32923017df149945b9b347e38535ef1ba00537 /searchlib | |
parent | 4ae4e98e2e20ecec9e33c3b7bfcb9a138fc1cd27 (diff) |
Change WeightedRef to struct.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp index 3d63078054c..9d351eadd62 100644 --- a/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp +++ b/searchlib/src/vespa/searchlib/attribute/imported_search_context.cpp @@ -68,18 +68,15 @@ ImportedSearchContext::createIterator(fef::TermFieldMatchData* matchData, bool s namespace { -class WeightedRef { - EntryRef _revMapIdx; - int32_t _weight; +struct WeightedRef { + EntryRef revMapIdx; + int32_t weight; -public: - WeightedRef(EntryRef revMapIdx, int32_t weight) - : _revMapIdx(revMapIdx), - _weight(weight) + WeightedRef(EntryRef revMapIdx_, int32_t weight_) + : revMapIdx(revMapIdx_), + weight(weight_) { } - EntryRef getRevMapIdx() const { return _revMapIdx; } - int32_t getWeight() const { return _weight; } }; struct TargetResult { @@ -156,7 +153,7 @@ void ImportedSearchContext::makeMergedPostings() _merger.reserveArray(targetResult.weightedRefs.size(), targetResult.sizeSum); const auto &reverseMapping = _reference_attribute.getReverseMapping(); for (const auto &weightedRef : targetResult.weightedRefs) { - _merger.addToArray(ReverseMappingPostingList(reverseMapping, weightedRef.getRevMapIdx(), weightedRef.getWeight())); + _merger.addToArray(ReverseMappingPostingList(reverseMapping, weightedRef.revMapIdx, weightedRef.weight)); } _merger.merge(); } |