Skip to content

Commit

Permalink
SERVER-1752 Remove unused Cursor::matcherPtr() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
astaple committed Oct 10, 2012
1 parent 0235bac commit 25985c2
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/mongo/db/btree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,6 @@ namespace mongo {
virtual BSONObj prettyIndexBounds() const;

virtual CoveredIndexMatcher *matcher() const { return _matcher.get(); }
virtual shared_ptr< CoveredIndexMatcher > matcherPtr() const { return _matcher; }

virtual void setMatcher( shared_ptr< CoveredIndexMatcher > matcher ) { _matcher = matcher; }

Expand Down
3 changes: 0 additions & 3 deletions src/mongo/db/cursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ namespace mongo {

// Used when we want fast matcher lookup
virtual CoveredIndexMatcher *matcher() const { return 0; }
// Used when we need to share this matcher with someone else
virtual shared_ptr< CoveredIndexMatcher > matcherPtr() const { return shared_ptr< CoveredIndexMatcher >(); }

virtual bool currentMatches( MatchDetails *details = 0 ) {
return !matcher() || matcher()->matchesCurrent( this, details );
Expand Down Expand Up @@ -264,7 +262,6 @@ namespace mongo {
virtual bool supportGetMore() { return true; }
virtual bool supportYields() { return true; }
virtual CoveredIndexMatcher *matcher() const { return _matcher.get(); }
virtual shared_ptr< CoveredIndexMatcher > matcherPtr() const { return _matcher; }
virtual void setMatcher( shared_ptr< CoveredIndexMatcher > matcher ) { _matcher = matcher; }
virtual const Projection::KeyOnly *keyFieldsOnly() const { return _keyFieldsOnly.get(); }
virtual void setKeyFieldsOnly( const shared_ptr<Projection::KeyOnly> &keyFieldsOnly ) {
Expand Down
10 changes: 0 additions & 10 deletions src/mongo/db/geo/2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1557,11 +1557,6 @@ namespace mongo {
else return GeoCursorBase::emptyMatcher.get();
}

virtual shared_ptr< CoveredIndexMatcher > matcherPtr() const {
if( _matcher.get() ) return _matcher;
else return GeoCursorBase::emptyMatcher;
}

// Are we finished getting points?
virtual bool moreToDo() {
return _state != DONE;
Expand Down Expand Up @@ -2517,11 +2512,6 @@ namespace mongo {
else return emptyMatcher.get();
}

virtual shared_ptr< CoveredIndexMatcher > matcherPtr() const {
if( _s->_matcher.get() ) return _s->_matcher;
else return emptyMatcher;
}

shared_ptr<GeoSearch> _s;
GeoHopper::Holder::iterator _cur;
GeoHopper::Holder::iterator _end;
Expand Down
1 change: 0 additions & 1 deletion src/mongo/db/queryoptimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ namespace mongo {

virtual bool isMultiKey() const { return _mps->hasMultiKey(); }

virtual shared_ptr< CoveredIndexMatcher > matcherPtr() const { return _matcher; }
virtual CoveredIndexMatcher* matcher() const { return _matcher.get(); }

virtual bool capped() const { return _c->capped(); }
Expand Down
8 changes: 0 additions & 8 deletions src/mongo/db/queryoptimizercursorimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,14 +508,6 @@ namespace mongo {

virtual long long nscanned() { return _takeover ? _takeover->nscanned() : _nscanned; }

virtual shared_ptr<CoveredIndexMatcher> matcherPtr() const {
if ( _takeover ) {
return _takeover->matcherPtr();
}
assertOk();
return _currOp->queryPlan().matcher();
}

virtual CoveredIndexMatcher *matcher() const {
if ( _takeover ) {
return _takeover->matcher();
Expand Down
2 changes: 0 additions & 2 deletions src/mongo/dbtests/queryoptimizercursortests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ namespace QueryOptimizerCursorTests {
// _id 10 {_id:1}
ASSERT_EQUALS( 10, c->current().getIntField( "_id" ) );
ASSERT( !c->matcher()->matchesCurrent( c.get() ) );
ASSERT( !c->matcherPtr()->matchesCurrent( c.get() ) );
ASSERT( c->advance() );

// _id 0 {a:1}
Expand All @@ -653,7 +652,6 @@ namespace QueryOptimizerCursorTests {
// _id 11 {_id:1}
ASSERT_EQUALS( BSON( "_id" << 11 << "a" << 12 ), c->current() );
ASSERT( c->matcher()->matchesCurrent( c.get() ) );
ASSERT( c->matcherPtr()->matchesCurrent( c.get() ) );
ASSERT( !c->getsetdup( c->currLoc() ) );
ASSERT( c->advance() );

Expand Down

0 comments on commit 25985c2

Please sign in to comment.