From cc40330e00cc8a222f31c53551873f5d2ae66b14 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 12 Sep 2024 17:59:41 +0200 Subject: [PATCH] Avoid a couple of copies Spotted by Coverity scan. --- src/insets/InsetCitation.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 8dc71541bb..73a17e70ff 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -476,7 +476,7 @@ docstring InsetCitation::complexLabel(bool for_xhtml) const break; } } - + string cite_type = getCmdName(); bool const uppercase = isUpperCase(cite_type[0]); if (uppercase) @@ -502,8 +502,6 @@ docstring InsetCitation::complexLabel(bool for_xhtml) const && (keys.size() > 1 || !getParam("pretextlist").empty() || !getParam("posttextlist").empty()); - QualifiedList pres = getQualifiedLists(getParam("pretextlist")); - QualifiedList posts = getQualifiedLists(getParam("posttextlist")); CiteItem ci; ci.textBefore = getParam("before"); @@ -512,8 +510,8 @@ docstring InsetCitation::complexLabel(bool for_xhtml) const ci.Starred = starred; ci.max_size = UINT_MAX; ci.isQualified = qualified; - ci.pretexts = pres; - ci.posttexts = posts; + ci.pretexts = getQualifiedLists(getParam("pretextlist")); + ci.posttexts = getQualifiedLists(getParam("posttextlist")); if (for_xhtml) { ci.max_key_size = UINT_MAX; ci.context = CiteItem::Export; -- 2.39.5