Kaydet (Commit) 8b66c00a authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

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
üst cb9e5e78
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment