Skip to content
Browse files

recheck ok() - fix for the fix SERVER-3428

  • Loading branch information...
1 parent 9134b16 commit a85dd523b71ef5f364b527e6679476e942b7bd4c gregs committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 db/geo/2d.cpp
View
6 db/geo/2d.cpp
@@ -1126,12 +1126,12 @@ namespace mongo {
virtual BSONObj current() { assert(ok()); return _cur->_o; }
virtual DiskLoc currLoc() { assert(ok()); return _cur->_loc; }
virtual bool advance() {
- bool isOk = ok();
- if( isOk ){
+ if( ok() ){
_cur++;
incNscanned();
+ return ok();
}
- return isOk;
+ return false;
}
virtual BSONObj currKey() const { return _cur->_key; }

0 comments on commit a85dd52

Please sign in to comment.
Something went wrong with that request. Please try again.