mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Avoid a copy
Spotted by Coverity scan.
This commit is contained in:
parent
cc40330e00
commit
b1bbf64a28
@ -590,9 +590,8 @@ Buffer * Buffer::cloneWithChildren() const
|
|||||||
{
|
{
|
||||||
BufferMap bufmap;
|
BufferMap bufmap;
|
||||||
cloned_buffers.emplace_back(new CloneList);
|
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
|
// make sure we got cloned
|
||||||
BufferMap::const_iterator bit = bufmap.find(this);
|
BufferMap::const_iterator bit = bufmap.find(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user