From 4347b5975283ca1a591b6c3d4559ed360e187022 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 21 Oct 2018 15:53:34 +0100 Subject: pvs-studio: V728 An excessive check can be simplified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Caolán McNamara --- scripting/source/basprov/basprov.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripting') diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index ce71c003d75d..31fa993fcecc 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -421,8 +421,8 @@ namespace basprov bool bCreate = false; if ( m_bIsAppScriptCtx ) { - bool bShared = isLibraryShared( xLibContainer, pLibNames[i] ); - if ( ( m_bIsUserCtx && !bShared ) || ( !m_bIsUserCtx && bShared ) ) + const bool bShared = isLibraryShared( xLibContainer, pLibNames[i] ); + if (m_bIsUserCtx != bShared) bCreate = true; } else -- cgit