summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-14 17:14:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-11 11:38:15 +0200
commit1f08bff31238d5818c54a0b86570689644dff087 (patch)
treed4d6f4b62a3c48ddeb85ba89818247c17f2578c8 /filter
parentff130af9661a57d290dbf89b54a4c0ce8d0f71ea (diff)
new loplugin:shouldreturnbool
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx6
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index b5691b93c38a..b27546e1343f 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -102,7 +102,8 @@ namespace XSLT
on_close(void * context)
{
Reader * tmp = static_cast<Reader*> (context);
- return tmp->closeOutput();
+ tmp->closeOutput();
+ return 0;
}
};
/**
@@ -251,7 +252,7 @@ namespace XSLT
return len;
}
- int
+ void
Reader::closeOutput()
{
css::uno::Reference<XOutputStream> xos = m_transformer->getOutputStream();
@@ -261,7 +262,6 @@ namespace XSLT
xos.get()->closeOutput();
}
m_transformer->done();
- return 0;
}
void
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index 2e434033f93c..7261978ed6ed 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -61,7 +61,7 @@ namespace XSLT
int read(char * buffer, int len);
int write(const char * buffer, int len);
void forceStateStopped();
- int closeOutput();
+ void closeOutput();
private:
virtual ~Reader() override;