commit 3e2ca12af7e039c43b52bc4ce39022ac2f2df9f1 Author: Richard Kimberly Heck <rikih...@lyx.org> Date: Thu Feb 13 12:07:58 2025 -0500
In this case, the temporary variable can be a reference, which avoids three extra function calls. --- src/Buffer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 7f0ec11caa..0571e4d579 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3966,10 +3966,11 @@ void Buffer::getUsedBranches(std::list<docstring> & result, bool const from_mast for (Inset const & it : inset()) { if (it.lyxCode() == BRANCH_CODE) { InsetBranch const & br = static_cast<InsetBranch const &>(it); - if (!from_master && !params().branchlist().find(br.branch())) - result.push_back(br.branch()); - else if (from_master && !masterBuffer()->params().branchlist().find(br.branch())) - result.push_back(br.branch()); + docstring const & branch = br.branch(); + if (!from_master && !params().branchlist().find(branch)) + result.push_back(branch); + else if (from_master && !masterBuffer()->params().branchlist().find(branch)) + result.push_back(branch); continue; } if (it.lyxCode() == INCLUDE_CODE) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs