summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2013-05-23 00:04:19 -0400
committerEliot Horowitz <eliot@10gen.com>2013-05-30 11:49:11 -0400
commita6d055026c3a13b423e099e9d080256ac040f706 (patch)
tree75c0b7087a7eef5ada15ec4b6f17063229236f36 /src
parent3b1257a5224d1e9df71ee1b4631ca32f2cf438f2 (diff)
downloadmongo-a6d055026c3a13b423e099e9d080256ac040f706.tar.gz
SERVER-6400: remove _allHaveTomatch since it was never used
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/matcher/expression_leaf.cpp17
-rw-r--r--src/mongo/db/matcher/expression_leaf.h6
2 files changed, 5 insertions, 18 deletions
diff --git a/src/mongo/db/matcher/expression_leaf.cpp b/src/mongo/db/matcher/expression_leaf.cpp
index a470661171d..db3c819cbbe 100644
--- a/src/mongo/db/matcher/expression_leaf.cpp
+++ b/src/mongo/db/matcher/expression_leaf.cpp
@@ -109,17 +109,10 @@ namespace mongo {
}
if ( found ) {
- if ( !_allHaveToMatch ) {
- if ( details && details->needRecord() ) {
- // this block doesn't have to be inside the _allHaveToMatch handler
- // but this matches the old semantics
- details->setElemMatchKey( x.fieldName() );
- }
- return true;
+ if ( details && details->needRecord() ) {
+ details->setElemMatchKey( x.fieldName() );
}
- }
- else if ( _allHaveToMatch ) {
- return false;
+ return true;
}
}
@@ -163,7 +156,6 @@ namespace mongo {
case EQ:
case GT:
case GTE:
- _allHaveToMatch = false;
break;
default:
return Status( ErrorCodes::BadValue, "bad match type for ComparisonMatchExpression" );
@@ -411,8 +403,6 @@ namespace mongo {
if ( found ) {
if ( details && details->needRecord() ) {
- // this block doesn't have to be inside the _allHaveToMatch handler
- // but this matches the old semantics
details->setElemMatchKey( x.fieldName() );
}
return true;
@@ -501,7 +491,6 @@ namespace mongo {
void InMatchExpression::init( const StringData& path ) {
initPath( path );
- _allHaveToMatch = false;
}
bool InMatchExpression::_matchesRealElement( const BSONElement& e ) const {
diff --git a/src/mongo/db/matcher/expression_leaf.h b/src/mongo/db/matcher/expression_leaf.h
index f29a3c09d08..1f4501bedc7 100644
--- a/src/mongo/db/matcher/expression_leaf.h
+++ b/src/mongo/db/matcher/expression_leaf.h
@@ -30,8 +30,8 @@ namespace mongo {
class LeafMatchExpression : public MatchExpression {
public:
- LeafMatchExpression( MatchType matchType ) : MatchExpression( matchType ) {
- _allHaveToMatch = false;
+ LeafMatchExpression( MatchType matchType )
+ : MatchExpression( matchType ) {
}
virtual ~LeafMatchExpression(){}
@@ -43,11 +43,9 @@ namespace mongo {
virtual bool matchesSingleElement( const BSONElement& e ) const = 0;
const StringData path() const { return _path; }
- bool allHaveToMatch() const { return _allHaveToMatch; }
protected:
void initPath( const StringData& path );
- bool _allHaveToMatch;
private:
bool _matches( const FieldRef& fieldRef,