More loplugin:simplifybool

Change-Id: I8996d0afb3669046040a4dfebc9c2c6c07fc7644
This commit is contained in:
Stephan Bergmann
2015-04-27 15:27:33 +02:00
parent e8d9bf5078
commit 5db2f661ce
2 changed files with 3 additions and 4 deletions

View File

@@ -816,9 +816,8 @@ Binding::XDataType_t Binding::getDataType()
bool Binding::isValid_DataType()
{
Reference<XDataType> xDataType = getDataType();
return xDataType.is()
? xDataType->validate( maBindingExpression.getString() )
: true;
return !xDataType.is()
|| xDataType->validate( maBindingExpression.getString() );
}
OUString Binding::explainInvalid_DataType()

View File

@@ -75,7 +75,7 @@ void PropertySetBase::registerProperty( const Property& rProperty,
OSL_ENSURE( rAccessor.get(), "PropertySetBase::registerProperty: invalid property accessor, this will crash!" );
m_aAccessors.insert( PropertyAccessors::value_type( rProperty.Handle, rAccessor ) );
OSL_ENSURE( ( rAccessor->isWriteable() == true )
OSL_ENSURE( rAccessor->isWriteable()
== ( ( rProperty.Attributes & com::sun::star::beans::PropertyAttribute::READONLY ) == 0 ),
"PropertySetBase::registerProperty: inconsistence!" );