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

fix _DEBUG builds

This commit is contained in:
Mathias Stearn 2011-05-06 19:14:42 -04:00
parent 8e216ef190
commit 04ac31d075

View File

@ -288,9 +288,9 @@ namespace mongo {
*/
template< class V >
inline int BucketBasics<V>::_alloc(int bytes) {
dassert( this->emptySize > bytes );
this->topSize += bytes;
this->emptySize -= bytes;
dassert( ((int)this->emptySize) >= 0 ); // this is unsigned in V1 so never fails
int ofs = totalDataSize() - this->topSize;
assert( ofs > 0 );
return ofs;