diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 13:10:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 14:38:35 +0200 |
commit | 8fced917aa1af58216cbde56720f2f473eed86d9 (patch) | |
tree | 755d0dfba1fe4a5c34860d0d1ea4c6ce01525405 /comphelper | |
parent | f0110f798cee31ff87651dc2377eacef2ab8a8b7 (diff) |
clang-tidy readability-simplify-boolean-expr in accessibility..cui
Change-Id: Iae27da322c6ede592e6b268fb2210d3525ed22cc
Reviewed-on: https://gerrit.libreoffice.org/36677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/backupfilehelper.cxx | 21 | ||||
-rw-r--r-- | comphelper/source/misc/namedvaluecollection.cxx | 7 |
2 files changed, 5 insertions, 23 deletions
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 7e5c2dbc7ff9..da131acafdd4 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -137,12 +137,7 @@ namespace aArray[2] = sal_uInt8((nSource & 0x0000ff00) >> 8); aArray[3] = sal_uInt8(nSource & 0x000000ff); - if (osl_File_E_None == osl_writeFile(rHandle, static_cast<const void*>(aArray), 4, &nBaseWritten) && 4 == nBaseWritten) - { - return true; - } - - return false; + return osl_File_E_None == osl_writeFile(rHandle, static_cast<const void*>(aArray), 4, &nBaseWritten) && 4 == nBaseWritten; } bool read_OString(FileSharedPtr& rFile, OString& rTarget) @@ -178,12 +173,7 @@ namespace sal_uInt64 nBaseWritten(0); - if (osl_File_E_None == osl_writeFile(rHandle, static_cast<const void*>(rSource.getStr()), nLength, &nBaseWritten) && nLength == nBaseWritten) - { - return true; - } - - return false; + return osl_File_E_None == osl_writeFile(rHandle, static_cast<const void*>(rSource.getStr()), nLength, &nBaseWritten) && nLength == nBaseWritten; } OUString createFileURL(const OUString& rURL, const OUString& rName, const OUString& rExt) @@ -535,12 +525,7 @@ namespace // write mbEnabled nState = static_cast< sal_uInt32 >(mbEnabled); - if (!write_sal_uInt32(rHandle, nState)) - { - return false; - } - - return true; + return write_sal_uInt32(rHandle, nState); } const OString& getName() const diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 4e1471186d6e..84e705f8b287 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -118,13 +118,10 @@ namespace comphelper bool NamedValueCollection::canExtractFrom( css::uno::Any const & i_value ) { Type const & aValueType = i_value.getValueType(); - if ( aValueType.equals( ::cppu::UnoType< PropertyValue >::get() ) + return aValueType.equals( ::cppu::UnoType< PropertyValue >::get() ) || aValueType.equals( ::cppu::UnoType< NamedValue >::get() ) || aValueType.equals( ::cppu::UnoType< Sequence< PropertyValue > >::get() ) - || aValueType.equals( ::cppu::UnoType< Sequence< NamedValue > >::get() ) - ) - return true; - return false; + || aValueType.equals( ::cppu::UnoType< Sequence< NamedValue > >::get() ); } |