diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 11:34:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 13:46:26 +0200 |
commit | 6f6f1680ec35b1616c2fc54e5ee8c3b85edf333b (patch) | |
tree | 5ec6cfdde2c0c848416155d1d8cab72a3254525e /hwpfilter/source/hstyle.cxx | |
parent | 8581d880f8aa8c2be15c875db291cebbb42841c7 (diff) |
loplugin:simplifybool in hwpfilter..lotuswordpro
Change-Id: Iedfd492c963eb89fe75fdd73cae630e7e1dae119
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95100
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter/source/hstyle.cxx')
-rw-r--r-- | hwpfilter/source/hstyle.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hwpfilter/source/hstyle.cxx b/hwpfilter/source/hstyle.cxx index 95f3570d25fd..88aa73b77ab0 100644 --- a/hwpfilter/source/hstyle.cxx +++ b/hwpfilter/source/hstyle.cxx @@ -59,7 +59,7 @@ HWPStyle::~HWPStyle() char *HWPStyle::GetName(int n) const { - if (!(n >= 0 && n < nstyles)) + if (n < 0 || n >= nstyles) return nullptr; return DATA[n].name; } @@ -67,7 +67,7 @@ char *HWPStyle::GetName(int n) const void HWPStyle::SetName(int n, char const *name) { - if (!(n >= 0 && n < nstyles)) + if (n < 0 || n >= nstyles) return; if (name) @@ -90,7 +90,7 @@ void HWPStyle::SetName(int n, char const *name) CharShape *HWPStyle::GetCharShape(int n) const { - if (!(n >= 0 && n < nstyles)) + if (n < 0 || n >= nstyles) return nullptr; return &DATA[n].cshape; } @@ -110,7 +110,7 @@ void HWPStyle::SetCharShape(int n, CharShape const * cshapep) ParaShape *HWPStyle::GetParaShape(int n) const { - if (!(n >= 0 && n < nstyles)) + if (n < 0 || n >= nstyles) return nullptr; return &DATA[n].pshape; } |