]> git.lyx.org Git - features.git/commitdiff
Use const ref instead of passing by value.
authorRichard Heck <rgheck@lyx.org>
Tue, 12 May 2015 16:52:36 +0000 (12:52 -0400)
committerRichard Heck <rgheck@lyx.org>
Tue, 12 May 2015 16:52:36 +0000 (12:52 -0400)
Thinko caught by coverity.

src/insets/InsetTOC.cpp
src/insets/InsetTOC.h

index 11662ce9eb28b18546c6b32fbc0861e1bb012258..d413892a05836e3890dfb2a86035f449e9fd2dea 100644 (file)
@@ -149,7 +149,7 @@ void InsetTOC::makeTOCEntry(XHTMLStream & xs,
 
 
 void InsetTOC::makeTOCWithDepth(XHTMLStream & xs, 
-               Toc toc, OutputParams const & op) const
+               Toc const & toc, OutputParams const & op) const
 {
        Toc::const_iterator it = toc.begin();
        Toc::const_iterator const en = toc.end();
@@ -207,7 +207,7 @@ void InsetTOC::makeTOCWithDepth(XHTMLStream & xs,
 
 
 void InsetTOC::makeTOCNoDepth(XHTMLStream & xs, 
-               Toc toc, const OutputParams & op) const
+               Toc const & toc, const OutputParams & op) const
 {
        Toc::const_iterator it = toc.begin();
        Toc::const_iterator const en = toc.end();
index 183683628d40fc4dea929b6e4772ee72d11ec4f1..074ad535dbf6e8f4b6de193670af8d00f224eee7 100644 (file)
@@ -64,9 +64,9 @@ public:
 
 private:
        ///
-       void makeTOCWithDepth(XHTMLStream & xs, Toc toc, const OutputParams & op) const;
+       void makeTOCWithDepth(XHTMLStream & xs, Toc const & toc, const OutputParams & op) const;
        ///
-       void makeTOCNoDepth(XHTMLStream & xs, Toc toc, const OutputParams & op) const;
+       void makeTOCNoDepth(XHTMLStream & xs, Toc const & toc, const OutputParams & op) const;
        ///
        void makeTOCEntry(XHTMLStream & xs, Paragraph const & par, OutputParams const & op) const;