commit 4e2b767f618b1c3ec90edd3141428067066212a2 Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Fri Feb 14 01:18:13 2025 +0100
Avoid temporary variables (spotted by Coverity Scan) --- src/lyxfind.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index b4cbcd6bb7..2966fc5dfc 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -3684,7 +3684,7 @@ void MatchStringAdv::CreateRegexp(FindAndReplaceOptions const & opt, string cons static void modifyRegexForMatchWord(string &t) { - string s(""); + string s; regex wordre("(\\\\)*((\\.|\\\\b))"); size_t lastpos = 0; smatch sub; @@ -3701,8 +3701,7 @@ static void modifyRegexForMatchWord(string &t) lastpos = sub.position(2) + sub.length(2); } if (lastpos == 0) { - s = "\\b" + t + "\\b"; - t = s; + t = "\\b" + t + "\\b"; return; } else if (lastpos < t.length()) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs