diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-21 15:53:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-22 12:42:07 +0200 |
commit | 4347b5975283ca1a591b6c3d4559ed360e187022 (patch) | |
tree | d607931cc2143988fe344f32b8f311bcf4f3ef51 /sw/source/filter/ww8 | |
parent | b55fda6d9eb83460382c0da74eb5cd3a3d03cd7f (diff) |
pvs-studio: V728 An excessive check can be simplified
for...
"The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression"
subcases, where the args are already bool
Change-Id: Ica8b5c4974c513f7f7ad8acf17ca931e85ebc8af
Reviewed-on: https://gerrit.libreoffice.org/62146
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/writerwordglue.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index c34e9f6e3e06..b803a43a1329 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -433,8 +433,7 @@ namespace sw { // Check top only if both object have a header or if // both object don't have a header - if ( ( HasHeader() && rOther.HasHeader() ) || - ( !HasHeader() && !rOther.HasHeader() ) ) + if (HasHeader() == rOther.HasHeader()) { if (dyaTop != rOther.dyaTop) return false; @@ -442,8 +441,7 @@ namespace sw // Check bottom only if both object have a footer or if // both object don't have a footer - if ( ( HasFooter() && rOther.HasFooter() ) || - ( !HasFooter() && !rOther.HasFooter() ) ) + if (HasFooter() == rOther.HasFooter()) { if (dyaBottom != rOther.dyaBottom) return false; |