Use const ref instead of passing by value.

Thinko caught by coverity.
This commit is contained in:
Richard Heck 2015-05-12 12:52:36 -04:00
parent 7a0f7b7046
commit fb4c70650c
2 changed files with 4 additions and 4 deletions

View File

@ -149,7 +149,7 @@ void InsetTOC::makeTOCEntry(XHTMLStream & xs,
void InsetTOC::makeTOCWithDepth(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 it = toc.begin();
Toc::const_iterator const en = toc.end(); Toc::const_iterator const en = toc.end();
@ -207,7 +207,7 @@ void InsetTOC::makeTOCWithDepth(XHTMLStream & xs,
void InsetTOC::makeTOCNoDepth(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 it = toc.begin();
Toc::const_iterator const en = toc.end(); Toc::const_iterator const en = toc.end();

View File

@ -64,9 +64,9 @@ public:
private: 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; void makeTOCEntry(XHTMLStream & xs, Paragraph const & par, OutputParams const & op) const;