From 8b66c00a0c87f81ecb78b27dbf0a6ded6e94a048 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Wed, 27 Feb 2013 06:54:28 +0100 Subject: [PATCH] janitorial: simplify test expression without semantics change The "sComposerFilter != m_sRowSetFilter" could not influence the result. Proof. The right hand-side of the || is evaluated only when m_sRowSetFilter.isEmpty() So the only case where the removed test could have an influence is when m_sRowSetFilter.isEmpty(). However, the right hand-side of the && is evaluated only when !sComposerFilter.isEmpty(). We have m_sRowSetFilter.isEmpty() and !sComposerFilter.isEmpty(). In particular, (sComposerFilter != m_sRowSetFilter) is true. Qed. Change-Id: I1484d78cf2d7a5e8ca44f382eb7c440c84d8c10e --- dbaccess/source/core/api/OptimisticSet.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 546a984f56dd..cbfcb6280b43 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -157,7 +157,7 @@ void OptimisticSet::makeNewStatement( ) fillJoinedColumns_throw(m_aSqlIterator.getJoinConditions()); const ::rtl::OUString sComposerFilter = m_xComposer->getFilter(); - if ( !m_sRowSetFilter.isEmpty() || (!sComposerFilter.isEmpty() && sComposerFilter != m_sRowSetFilter) ) + if ( !m_sRowSetFilter.isEmpty() || !sComposerFilter.isEmpty() ) { FilterCreator aFilterCreator; if ( !sComposerFilter.isEmpty() && sComposerFilter != m_sRowSetFilter )