0
0
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:
Eliot Horowitz 2009-06-09 12:32:04 -04:00
parent 00df88c21d
commit 6b1d43b3b1
7 changed files with 9 additions and 9 deletions

View File

@ -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 )

View File

@ -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. */

View File

@ -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() );

View File

@ -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();

View File

@ -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" ) ){

View File

@ -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() );

View File

@ -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 ) );
}