D21835: [PostingIterator] Move positions() method to VectorPositionInfoIterator
Stefan Brüns
noreply at phabricator.kde.org
Sat Jun 15 20:34:34 BST 2019
bruns created this revision.
bruns added reviewers: Baloo, ngraham, astippich, poboiko.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.
REVISION 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
REPOSITORY
R293 Baloo
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D21835
AFFECTED FILES
autotests/unit/engine/phraseanditeratortest.cpp
autotests/unit/engine/positiondbtest.cpp
src/engine/phraseanditerator.cpp
src/engine/phraseanditerator.h
src/engine/positiondb.cpp
src/engine/positiondb.h
src/engine/postingiterator.cpp
src/engine/postingiterator.h
src/engine/transaction.cpp
src/engine/vectorpositioninfoiterator.cpp
src/engine/vectorpositioninfoiterator.h
To: bruns, #baloo, ngraham, astippich, poboiko
Cc: kde-frameworks-devel, LeGast00n, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190615/4d05e0df/attachment.html>
More information about the Kde-frameworks-devel
mailing list