From: Jean-Marc Lasgouttes Date: Wed, 11 Sep 2024 15:30:33 +0000 (+0200) Subject: Pass a docstring parameter by address X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=13b05102f2d9dcecd9d0fe24e49000867c5b835a;p=lyx.git Pass a docstring parameter by address Spotted by Coverity scan. --- 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_; } ///