Kaydet (Commit) 1cb0b37a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Rephrase comparisons between bool and sal_Bool

...to cater for forthcoming loplugin:implicitboolconversion improvements

Change-Id: I88c0c4681137022005c3a4c418e91cb17bc17148
üst 61b44da9
......@@ -1199,7 +1199,7 @@ sal_Bool SAL_CALL AnimationNode::getAutoReverse() throw (RuntimeException, std::
void SAL_CALL AnimationNode::setAutoReverse( sal_Bool _autoreverse ) throw (RuntimeException, std::exception)
{
Guard< Mutex > aGuard( maMutex );
if( _autoreverse != (mbAutoReverse ? 1 : 0) )
if( bool(_autoreverse) != mbAutoReverse )
{
mbAutoReverse = _autoreverse;
fireChangeListener();
......@@ -1466,7 +1466,7 @@ void SAL_CALL AnimationNode::setAccumulate( sal_Bool _accumulate )
throw (RuntimeException, std::exception)
{
Guard< Mutex > aGuard( maMutex );
if( _accumulate != (mbAccumulate ? 1 : 0) )
if( bool(_accumulate) != mbAccumulate )
{
mbAccumulate = _accumulate;
fireChangeListener();
......@@ -1647,7 +1647,7 @@ sal_Bool SAL_CALL AnimationNode::getDirection() throw (RuntimeException, std::ex
void SAL_CALL AnimationNode::setDirection( sal_Bool _direction ) throw (RuntimeException, std::exception)
{
Guard< Mutex > aGuard( maMutex );
if( _direction != (mbDirection ? 1 : 0) )
if( bool(_direction) != mbDirection )
{
mbDirection = _direction;
fireChangeListener();
......@@ -1773,7 +1773,7 @@ sal_Bool SAL_CALL AnimationNode::getMode() throw (RuntimeException, std::excepti
void SAL_CALL AnimationNode::setMode( sal_Bool _mode ) throw (RuntimeException, std::exception)
{
Guard< Mutex > aGuard( maMutex );
if( _mode != (mbMode ? 1 : 0) )
if( bool(_mode) != mbMode )
{
mbMode = _mode;
fireChangeListener();
......
......@@ -541,7 +541,7 @@ void SAL_CALL Player::setMute( sal_Bool bSet )
DBG( "set mute: %d muted: %d unmuted volume: %lf", bSet, mbMuted, mnUnmutedVolume );
// change the volume to 0 or the unmuted volume
if( mpPlaybin && (mbMuted ? 1 : 0) != bSet )
if( mpPlaybin && mbMuted != bool(bSet) )
{
double nVolume = mnUnmutedVolume;
if( bSet )
......
......@@ -4124,7 +4124,7 @@ void SAL_CALL OStorage::setModified( sal_Bool bModified )
if ( m_pData->m_bReadOnlyWrap )
throw beans::PropertyVetoException( THROW_WHERE ); // TODO: access denied
if ( (m_pImpl->m_bIsModified ? 1 : 0) != bModified )
if ( m_pImpl->m_bIsModified != bool(bModified) )
m_pImpl->m_bIsModified = bModified;
aGuard.clear();
......
......@@ -68,7 +68,7 @@ namespace svx
FeatureStateEvent aUnoState;
getUnoState( aUnoState );
if ( ( m_aLastKnownState == aUnoState.State ) && ( (m_bLastKnownEnabled ? 1 : 0) == aUnoState.IsEnabled ) )
if ( ( m_aLastKnownState == aUnoState.State ) && ( m_bLastKnownEnabled == bool(aUnoState.IsEnabled) ) )
return;
m_aLastKnownState = aUnoState.State;
......
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