Make Reassembler::TotalSize a constant time operation

This commit is contained in:
Jon Siwek 2018-05-22 09:18:58 -05:00
parent 647fe3f494
commit 436a93b38a
3 changed files with 6 additions and 7 deletions

View file

@ -255,12 +255,7 @@ void Reassembler::ClearOldBlocks()
uint64 Reassembler::TotalSize() const
{
uint64 size = 0;
for ( DataBlock* b = blocks; b; b = b->next )
size += b->Size();
return size;
return size_of_all_blocks;
}
void Reassembler::Describe(ODesc* d) const