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 /xmloff/source | |
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 'xmloff/source')
-rw-r--r-- | xmloff/source/style/chrlohdl.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx index 2c1ffc2e0f7b..3225b4371801 100644 --- a/xmloff/source/style/chrlohdl.cxx +++ b/xmloff/source/style/chrlohdl.cxx @@ -147,7 +147,7 @@ bool XMLCharScriptHdl::equals( const css::uno::Any& r1, const css::uno::Any& r2 bool bEmptyVariant2 = aLocale2.Variant.isEmpty(); if (bEmptyVariant1 && bEmptyVariant2) bRet = true; - else if ((bEmptyVariant1 && !bEmptyVariant2) || (!bEmptyVariant1 && bEmptyVariant2)) + else if (bEmptyVariant1 != bEmptyVariant2) ; // stays false else { |