diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-22 14:23:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-23 08:04:54 +0100 |
commit | 2a1fb4401da16f6a18c0bd05fe4b460a3048f9b5 (patch) | |
tree | e659812bc29bb01db62cde81f3d218758b26e07c /sax | |
parent | 7f42b0f96a2798ae99aa65b84b0db3b2af2b282b (diff) |
loplugin:passstuffbyref improved returns
improve the detection of stuff we can return by const &, instead of by
copying
Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69
Reviewed-on: https://gerrit.libreoffice.org/46915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/fastserializer.cxx | 2 | ||||
-rw-r--r-- | sax/source/tools/fastserializer.hxx | 2 | ||||
-rw-r--r-- | sax/source/tools/fshelper.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index a0ae255b36eb..6257853a64a8 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -377,7 +377,7 @@ namespace sax_fastparser { writeBytes(sSlashAndClosingBracket, N_CHARS(sSlashAndClosingBracket)); } - css::uno::Reference< css::io::XOutputStream > FastSaxSerializer::getOutputStream() const + css::uno::Reference< css::io::XOutputStream > const & FastSaxSerializer::getOutputStream() const { return maCachedOutputStream.getOutputStream(); } diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx index 74e5de223e10..c166f38f0b8c 100644 --- a/sax/source/tools/fastserializer.hxx +++ b/sax/source/tools/fastserializer.hxx @@ -51,7 +51,7 @@ public: explicit FastSaxSerializer(const css::uno::Reference< css::io::XOutputStream >& xOutputStream); ~FastSaxSerializer(); - css::uno::Reference< css::io::XOutputStream > getOutputStream() const; + css::uno::Reference< css::io::XOutputStream > const & getOutputStream() const; /// called by FSHelper to put data in for writeTokenValueList TokenValueList& getTokenValueList() { return maTokenValues; } diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 0b71769a0fed..bd35903bd7a6 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -125,7 +125,7 @@ FastSerializerHelper* FastSerializerHelper::writeId(sal_Int32 tokenId) return this; } -css::uno::Reference< css::io::XOutputStream > FastSerializerHelper::getOutputStream() const +css::uno::Reference< css::io::XOutputStream > const & FastSerializerHelper::getOutputStream() const { return mpSerializer->getOutputStream(); } |