void ClientCursor::setLastLoc_inlock(DiskLoc L) { verify( _pos != -2 ); // defensive - see ~ClientCursor if ( L == _lastLoc ) return; CCByLoc& bl = byLoc(); if ( !_lastLoc.isNull() ) { bl.erase( ByLocKey( _lastLoc, _cursorid ) ); } if ( !L.isNull() ) bl[ByLocKey(L,_cursorid)] = this; _lastLoc = L; }
void ClientCursor::setLastLoc_inlock(DiskLoc L) { assert( pos != -2 ); // defensive - see ~ClientCursor if ( L == _lastLoc ) return; CCByLoc& bl = byLoc(); if ( !_lastLoc.isNull() ) { CCByLoc::iterator i = kv_find(bl, _lastLoc, this); if ( i != bl.end() ) bl.erase(i); } if ( !L.isNull() ) bl.insert( make_pair(L, this) ); _lastLoc = L; }