[PostingIterator] Move positions() method to VectorPositionInfoIterator
ClosedPublic

Authored by bruns on Jun 15 2019, 7:34 PM.

Details

Summary

The positions() method is only used inside the PhraseAndIterator and
requires either a VectorPositionInfoIterator or a DBPositionIterator,
as these are the only ones reimplementing the positions() method.

Actually, VectorPositionInfoIterator and DBPositionIterator have
identical implementations, save the constructor argument. The conversion
of the constructor argument can be trivially inlined and DBPositionIterator
can be removed completely.

This indirectly improves the test coverage (VectorPositionInfoIterator is
used in the PhraseAndIteratorTest) and removes duplicate code.

Test Plan

ctest

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Jun 15 2019, 7:34 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptJun 15 2019, 7:34 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Jun 15 2019, 7:34 PM
ngraham accepted this revision.Jun 16 2019, 5:12 PM
This revision is now accepted and ready to land.Jun 16 2019, 5:12 PM
This revision was automatically updated to reflect the committed changes.