tdf#163486: PVS: simplify expression

V728 	An excessive check can be simplified. The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression.

Change-Id: I31edbbc7ce3b10085c5f1404e74485ea180ddec3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176577
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Xisco Fauli 2024-11-14 11:28:27 +01:00
parent a37890e704
commit d6e81eaf73

View file

@ -77,7 +77,7 @@ sal_Int64 SAL_CALL AccessibleGridControlTable::getAccessibleIndexInParent()
ensureIsAlive();
if(m_aTable.HasRowHeader() && m_aTable.HasColHeader())
return 0;
else if((!m_aTable.HasRowHeader() && m_aTable.HasColHeader()) || (m_aTable.HasRowHeader() && !m_aTable.HasColHeader()) )
else if(m_aTable.HasRowHeader() != m_aTable.HasColHeader())
return 1;
else
return 2;