]> git.lyx.org Git - lyx.git/commitdiff
Avoid a copy
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 12 Sep 2024 16:05:50 +0000 (18:05 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 12 Sep 2024 16:05:50 +0000 (18:05 +0200)
Spotted by Coverity scan.

src/Buffer.cpp

index f473f3dc6f12b07d9bf17bb57d24989fb589cc85..73f627646b9c2b7265b7188a096bf8dc812365c5 100644 (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);