Avoid a copy

Spotted by Coverity scan.
This commit is contained in:
Jean-Marc Lasgouttes 2024-09-12 18:05:50 +02:00
parent cc40330e00
commit b1bbf64a28

View File

@ -590,9 +590,8 @@ Buffer * Buffer::cloneWithChildren() const
{
BufferMap bufmap;
cloned_buffers.emplace_back(new CloneList);
CloneList_ptr clones = cloned_buffers.back();
cloneWithChildren(bufmap, clones);
cloneWithChildren(bufmap, cloned_buffers.back());
// make sure we got cloned
BufferMap::const_iterator bit = bufmap.find(this);