commit 8e181e992da3054fc1a0221615f9dd4920332ace
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Thu Sep 12 18:33:45 2024 +0200

    Avoid a couple of copies.
    
    Spotted by Coverity scan.
---
 src/frontends/qt/Menus.cpp | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp
index abd625509c..480c03013d 100644
--- a/src/frontends/qt/Menus.cpp
+++ b/src/frontends/qt/Menus.cpp
@@ -1725,10 +1725,6 @@ void MenuDefinition::expandCiteStyles(BufferView const * 
bv)
                && (keys.size() > 1
                    || !citinset->getParam("pretextlist").empty()
                    || !citinset->getParam("posttextlist").empty());
-       vector<pair<docstring, docstring>> pres =
-               citinset->getQualifiedLists(citinset->getParam("pretextlist"));
-       vector<pair<docstring, docstring>> posts =
-               citinset->getQualifiedLists(citinset->getParam("posttextlist"));
 
        CiteItem ci;
        ci.textBefore = citinset->getParam("before");
@@ -1738,8 +1734,10 @@ void MenuDefinition::expandCiteStyles(BufferView const * 
bv)
        ci.context = CiteItem::Dialog;
        ci.max_size = 40;
        ci.isQualified = qualified;
-       ci.pretexts = pres;
-       ci.posttexts = posts;
+       ci.pretexts =
+               citinset->getQualifiedLists(citinset->getParam("pretextlist"));
+       ci.posttexts =
+               citinset->getQualifiedLists(citinset->getParam("posttextlist"));
        BiblioInfo::CiteStringMap citeStrings =
                buf->masterBibInfo().getCiteStrings(keys, citeStyleList, 
bv->buffer(), ci);
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to