mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
finish SERVER-101 move BSONObjIterator::_more to BSONObjIterator::more
This commit is contained in:
parent
00df88c21d
commit
6b1d43b3b1
@ -530,7 +530,7 @@ namespace mongo {
|
||||
stringstream ss;
|
||||
|
||||
bool first = 1;
|
||||
for ( BSONObjIterator i(keys); i._more(); ) {
|
||||
for ( BSONObjIterator i(keys); i.more(); ) {
|
||||
BSONElement f = i.next();
|
||||
|
||||
if ( first )
|
||||
|
@ -1230,7 +1230,7 @@ namespace mongo {
|
||||
bool moreWithEOO() {
|
||||
return pos < theend;
|
||||
}
|
||||
bool _more(){
|
||||
bool more(){
|
||||
return pos < theend && pos[0];
|
||||
}
|
||||
/** @return the next element in the object. For the final element, element.eoo() will be true. */
|
||||
|
@ -156,12 +156,12 @@ namespace JsobjTests {
|
||||
ASSERT_EQUALS( Timestamp, o.getField( "a" ).type() );
|
||||
BSONObjIterator i( o );
|
||||
ASSERT( i.moreWithEOO() );
|
||||
ASSERT( i._more() );
|
||||
ASSERT( i.more() );
|
||||
|
||||
BSONElement e = i.next();
|
||||
ASSERT_EQUALS( Timestamp, e.type() );
|
||||
ASSERT( i.moreWithEOO() );
|
||||
ASSERT( ! i._more() );
|
||||
ASSERT( ! i.more() );
|
||||
|
||||
e = i.next();
|
||||
ASSERT( e.eoo() );
|
||||
|
@ -108,7 +108,7 @@ namespace mongo {
|
||||
BSONObj sharded = from.getObjectField( "sharded" );
|
||||
if ( ! sharded.isEmpty() ){
|
||||
BSONObjIterator i(sharded);
|
||||
while ( i._more() ){
|
||||
while ( i.more() ){
|
||||
BSONElement e = i.next();
|
||||
uassert( "sharded things have to be objects" , e.type() == Object );
|
||||
_sharded[e.fieldName()] = e.embeddedObject();
|
||||
|
@ -65,7 +65,7 @@ namespace mongo {
|
||||
|
||||
BSONObjBuilder b;
|
||||
BSONObjIterator i( query );
|
||||
while ( i._more() ){
|
||||
while ( i.more() ){
|
||||
BSONElement e = i.next();
|
||||
|
||||
if ( strcmp( e.fieldName() , "query" ) ){
|
||||
|
@ -66,7 +66,7 @@ namespace mongo {
|
||||
BSONObjBuilder r;
|
||||
|
||||
BSONObjIterator i(k);
|
||||
while( i._more() ) {
|
||||
while( i.more() ) {
|
||||
BSONElement e = i.next();
|
||||
uassert( "can only handle numbers here - which i think is correct" , e.isNumber() );
|
||||
r.append( e.fieldName() , -1 * e.number() );
|
||||
|
@ -42,7 +42,7 @@ namespace mongo {
|
||||
BSONFieldIterator( BSONHolder * holder ){
|
||||
|
||||
BSONObjIterator it( holder->_obj );
|
||||
while ( it._more() ){
|
||||
while ( it.more() ){
|
||||
BSONElement e = it.next();
|
||||
_names.push_back( e.fieldName() );
|
||||
}
|
||||
@ -811,7 +811,7 @@ namespace mongo {
|
||||
return;
|
||||
|
||||
BSONObjIterator i( *data );
|
||||
while ( i._more() ){
|
||||
while ( i.more() ){
|
||||
BSONElement e = i.next();
|
||||
_convertor->setProperty( _global , e.fieldName() , _convertor->toval( e ) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user