From 13b05102f2d9dcecd9d0fe24e49000867c5b835a Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 11 Sep 2024 17:30:33 +0200 Subject: [PATCH] Pass a docstring parameter by address Spotted by Coverity scan. --- src/insets/InsetCommandParams.cpp | 2 +- src/insets/InsetCommandParams.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index a0d02e2245..6701c20d5f 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -99,7 +99,7 @@ static ParamInfo const & findInfo(InsetCode code, string const & cmdName) ParamInfo::ParamData::ParamData(std::string const & s, ParamType t, ParamHandling h, bool ignore, - docstring default_value) + docstring const & default_value) : name_(s), type_(t), handling_(h), ignore_(ignore), default_value_(default_value) {} diff --git a/src/insets/InsetCommandParams.h b/src/insets/InsetCommandParams.h index 5f463454c0..2faaf3f545 100644 --- a/src/insets/InsetCommandParams.h +++ b/src/insets/InsetCommandParams.h @@ -55,7 +55,7 @@ public: /// ParamData(std::string const &, ParamType, ParamHandling = HANDLING_NONE, bool ignore = false, - docstring default_value = docstring()); + docstring const & default_value = docstring()); /// std::string name() const { return name_; } /// -- 2.39.5