]> git.lyx.org Git - lyx.git/commitdiff
Make docstring parameters const references
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 12 Sep 2024 16:28:26 +0000 (18:28 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 12 Sep 2024 16:28:26 +0000 (18:28 +0200)
Spotted by Coverity scan.

src/insets/InsetLabel.h

index c2768af417420626f6e617dc731f2c15cd77440a..b4b3cb46f3b83f97bb4bdbd89200a662412aed40 100644 (file)
@@ -32,11 +32,11 @@ public:
        ///
        docstring const & formattedCounter() const { return formatted_counter_; }
        ///
-       void setCounterValue(docstring cv) { counter_value_ = cv; }
+       void setCounterValue(docstring const & cv) { counter_value_ = cv; }
        ///
-       void setPrettyCounter(docstring pc) { pretty_counter_ = pc; }
+       void setPrettyCounter(docstring const & pc) { pretty_counter_ = pc; }
        ///
-       void setFormattedCounter(docstring fc) { formatted_counter_ = fc; }
+       void setFormattedCounter(docstring const & fc) { formatted_counter_ = fc; }
        ///
        int rowFlags() const override { return CanBreakBefore | CanBreakAfter; }
        /// Updates only the label string, doesn't handle undo nor references.