diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-22 09:33:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-23 06:59:31 +0100 |
commit | 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e (patch) | |
tree | c1b90f74e1ce9e9f3a852f398890899459189cab /hwpfilter | |
parent | c24c32bf71b8e64bd0d36e511f554e1f6c015842 (diff) |
loplugin:simplifybool for negation of comparison operator
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791
Reviewed-on: https://gerrit.libreoffice.org/45068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpread.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx index 149c4f239301..cd29aae17e25 100644 --- a/hwpfilter/source/hwpread.cxx +++ b/hwpfilter/source/hwpread.cxx @@ -123,7 +123,7 @@ bool Bookmark::Read(HWPFile & hwpf) if (!hwpf.Read2b(dummy)) return false; - if (!(len == 34))// 2 * (BMK_COMMENT_LEN + 1) + 2 + if (len != 34)// 2 * (BMK_COMMENT_LEN + 1) + 2 { return hwpf.SetState(HWP_InvalidFileFormat); } @@ -282,7 +282,7 @@ bool TxtBox::Read(HWPFile & hwpf) UpdateBBox(this); ncell = nCell; - if (!(ncell > 0)){ + if (ncell <= 0){ return hwpf.SetState(HWP_InvalidFileFormat); } @@ -656,7 +656,7 @@ bool AutoNum::Read(HWPFile & hwpf) hwpf.Read2b(&number, 1); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -679,7 +679,7 @@ bool NewNum::Read(HWPFile & hwpf) hwpf.Read2b(&number, 1); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -701,7 +701,7 @@ bool ShowPageNum::Read(HWPFile & hwpf) hwpf.Read2b(&shape, 1); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } m_nPageNumber = hwpf.getCurrentPage(); @@ -725,7 +725,7 @@ bool PageNumCtrl::Read(HWPFile & hwpf) hwpf.Read2b(&what, 1); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -744,7 +744,7 @@ bool MailMerge::Read(HWPFile & hwpf) hwpf.Read1b(field_name, 20); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -762,7 +762,7 @@ bool Compose::Read(HWPFile & hwpf) hwpf.Read2b(compose, 3); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -781,7 +781,7 @@ bool Hyphen::Read(HWPFile & hwpf) hwpf.Read2b(&width, 1); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -802,7 +802,7 @@ bool TocMark::Read(HWPFile & hwpf) hwpf.Read2b(&kind, 1); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -825,7 +825,7 @@ bool IndexMark::Read(HWPFile & hwpf) hwpf.Read2b(&pgno, 1); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -851,7 +851,7 @@ bool Outline::Read(HWPFile & hwpf) hwpf.Read2b(deco, 14); hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -870,7 +870,7 @@ bool KeepSpace::Read(HWPFile & hwpf) { hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); @@ -889,7 +889,7 @@ bool FixedSpace::Read(HWPFile & hwpf) { hwpf.Read2b(&dummy, 1); - if (!(hh == dummy)){ + if (hh != dummy){ return hwpf.SetState(HWP_InvalidFileFormat); } return !hwpf.State(); |