Postpone CRC cache invalidation. Do it only once after all data have
been moved.
Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
for (std::list<ptr>::iterator it = _buffers.begin();
it != _buffers.end();
++it) {
- nb.copy_in(pos, it->length(), it->c_str());
+ nb.copy_in(pos, it->length(), it->c_str(), false);
pos += it->length();
}
_memcopy_count += pos;
_buffers.clear();
_buffers.push_back(nb);
+ invalidate_crc();
}
void buffer::list::rebuild_aligned(unsigned align)