commit e76cb2941a7596e6a8b8460cf4375bf496c8da4c
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Thu Oct 30 11:09:52 2025 +0100
Pass string parameters by address.
Spotted by Coverity Scan.
---
src/Text.cpp | 2 +-
src/insets/InsetSpecialChar.cpp | 2 +-
src/insets/InsetSpecialChar.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Text.cpp b/src/Text.cpp
index 213baf7feb..0bd272c5fe 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -3536,7 +3536,7 @@ void regexpDispatch(Cursor & cur, FuncRequest const & cmd)
}
-void specialChar(Cursor & cur, string const kind)
+void specialChar(Cursor & cur, string const & kind)
{
cur.recordUndo();
cap::replaceSelection(cur);
diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp
index 98f6d1d9c5..bd14085a6d 100644
--- a/src/insets/InsetSpecialChar.cpp
+++ b/src/insets/InsetSpecialChar.cpp
@@ -45,7 +45,7 @@ namespace lyx {
using support::Lexer;
-InsetSpecialChar::InsetSpecialChar(Buffer * buf, string const k)
+InsetSpecialChar::InsetSpecialChar(Buffer * buf, string const & k)
: Inset(buf), kind_(k), unknown_(false)
{
if (buf)
diff --git a/src/insets/InsetSpecialChar.h b/src/insets/InsetSpecialChar.h
index 65310b80f0..4440bd2775 100644
--- a/src/insets/InsetSpecialChar.h
+++ b/src/insets/InsetSpecialChar.h
@@ -59,7 +59,7 @@ public:
///
InsetSpecialChar() : Inset(nullptr), kind_("softhyphen"),
unknown_(false) {}
///
- explicit InsetSpecialChar(Buffer * buf, std::string const k);
+ explicit InsetSpecialChar(Buffer * buf, std::string const & k);
///
docstring toolTip(BufferView const & bv, int x, int y) const override;
/// some special chars allow line breaking after them
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs