summaryrefslogtreecommitdiff
path: root/db/matcher.cpp
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2011-04-04 14:50:52 -0700
committerAaron <aaron@10gen.com>2011-04-05 13:14:16 -0700
commitdaee9aca49e99a09bee882c1843fd8b0e419602e (patch)
tree88d81dda14f9f37c1acb053bd428b0a4400ae9a1 /db/matcher.cpp
parenta29f3931af3b208f515b0546e1facc4a679e689c (diff)
downloadmongo-daee9aca49e99a09bee882c1843fd8b0e419602e.tar.gz
SERVER-2896 matcher retMissing refactoring
Diffstat (limited to 'db/matcher.cpp')
-rw-r--r--db/matcher.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/matcher.cpp b/db/matcher.cpp
index ff86b12f8ee..4994425e434 100644
--- a/db/matcher.cpp
+++ b/db/matcher.cpp
@@ -543,7 +543,7 @@ namespace mongo {
int retMissing( const ElementMatcher &bm ) {
if ( bm.compareOp != BSONObj::opEXISTS )
return 0;
- return ( bm.toMatch.boolean() ^ bm.isNot ) ? -1 : 1;
+ return bm.toMatch.boolean() ? -1 : 1;
}
/* Check if a particular field matches.
@@ -788,7 +788,7 @@ namespace mongo {
BSONElement& m = bm.toMatch;
// -1=mismatch. 0=missing element. 1=match
int cmp = matchesDotted(m.fieldName(), m, jsobj, bm.compareOp, bm , false , details );
- if ( bm.compareOp != BSONObj::opEXISTS && bm.isNot )
+ if ( bm.isNot )
cmp = -cmp;
if ( cmp < 0 )
return false;