0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

getOwned() on all cursor objects

This commit is contained in:
Eliot Horowitz 2010-07-27 12:48:11 -04:00
parent 11a2d82651
commit 18132e81cb

View File

@ -197,19 +197,19 @@ namespace mongo {
BSONObj d = cursor->next();
if ( min.isEmpty() ){
min = d["min"].Obj();
max = d["max"].Obj();
min = d["min"].Obj().getOwned();
max = d["max"].Obj().getOwned();
continue;
}
if ( max == d["min"].Obj() ){
max = d["max"].Obj();
max = d["max"].Obj().getOwned();
continue;
}
p->gotRange( min.getOwned() , max.getOwned() );
min = d["min"].Obj();
max = d["max"].Obj();
min = d["min"].Obj().getOwned();
max = d["max"].Obj().getOwned();
}
assert( ! min.isEmpty() );
p->gotRange( min.getOwned() , max.getOwned() );