From 7a0f7b7046a05bb006956c6f6e678069a0a2c24a Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 12 May 2015 10:11:50 -0400 Subject: [PATCH] Pass XHTMLStream by reference. Problem found by coverity. The previous code worked because we are writing to the stream, and the actual odocstream is a member by reference of XHTMLStream. --- src/insets/InsetTOC.cpp | 4 ++-- src/insets/InsetTOC.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetTOC.cpp b/src/insets/InsetTOC.cpp index fc1f42bcae..11662ce9eb 100644 --- a/src/insets/InsetTOC.cpp +++ b/src/insets/InsetTOC.cpp @@ -148,7 +148,7 @@ void InsetTOC::makeTOCEntry(XHTMLStream & xs, } -void InsetTOC::makeTOCWithDepth(XHTMLStream xs, +void InsetTOC::makeTOCWithDepth(XHTMLStream & xs, Toc toc, OutputParams const & op) const { Toc::const_iterator it = toc.begin(); @@ -206,7 +206,7 @@ void InsetTOC::makeTOCWithDepth(XHTMLStream xs, } -void InsetTOC::makeTOCNoDepth(XHTMLStream xs, +void InsetTOC::makeTOCNoDepth(XHTMLStream & xs, Toc toc, const OutputParams & op) const { Toc::const_iterator it = toc.begin(); diff --git a/src/insets/InsetTOC.h b/src/insets/InsetTOC.h index ead482b2e8..183683628d 100644 --- a/src/insets/InsetTOC.h +++ b/src/insets/InsetTOC.h @@ -64,9 +64,9 @@ public: private: /// - void makeTOCWithDepth(XHTMLStream xs, Toc toc, const OutputParams & op) const; + void makeTOCWithDepth(XHTMLStream & xs, Toc toc, const OutputParams & op) const; /// - void makeTOCNoDepth(XHTMLStream xs, Toc toc, const OutputParams & op) const; + void makeTOCNoDepth(XHTMLStream & xs, Toc toc, const OutputParams & op) const; /// void makeTOCEntry(XHTMLStream & xs, Paragraph const & par, OutputParams const & op) const; -- 2.39.2