use firstElementFieldName()

This commit is contained in:
dwight
2011-05-23 10:49:50 -04:00
parent bd5b607137
commit 8a0660ac31
16 changed files with 28 additions and 28 deletions

View File

@@ -773,7 +773,7 @@ namespace mongo {
void FieldRangeSet::processQueryField( const BSONElement &e, bool optimize ) {
bool equality = ( getGtLtOp( e ) == BSONObj::Equality );
if ( equality && e.type() == Object ) {
equality = ( strcmp( e.embeddedObject().firstElement().fieldName(), "$not" ) != 0 );
equality = ( strcmp( e.embeddedObject().firstElementFieldName(), "$not" ) != 0 );
}
if ( equality || ( e.type() == Object && !e.embeddedObject()[ "$regex" ].eoo() ) ) {