summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-18 08:27:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-18 09:46:28 +0200
commit5fb66ae5595b7435e8954df31473fad15a74b8c2 (patch)
tree3b3f0ce3eafa10557a7e78b10851c97ee16c7ebf /hwpfilter
parent181a1b36ac728e3a43e054496ceb53fd3315abdb (diff)
clang-tidy readability-simplify-boolean-expr
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hiodev.cxx5
-rw-r--r--hwpfilter/source/hwpfile.cxx4
2 files changed, 2 insertions, 7 deletions
diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index 7fd808906c69..6416bb080cbe 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -270,10 +270,7 @@ void HMemIODev::flush()
bool HMemIODev::state() const
{
- if (pos <= length)
- return false;
- else
- return true;
+ return pos > length;
}
bool HMemIODev::setCompressed(bool )
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 223b4bb7a984..258ea9370ef5 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -119,9 +119,7 @@ int HWPFile::SetState(int errcode)
bool HWPFile::Read1b(unsigned char &out)
{
- if (!hiodev || !hiodev->read1b(out))
- return false;
- return true;
+ return hiodev && hiodev->read1b(out);
}
bool HWPFile::Read1b(char &out)