diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-18 08:27:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-18 09:46:28 +0200 |
commit | 5fb66ae5595b7435e8954df31473fad15a74b8c2 (patch) | |
tree | 3b3f0ce3eafa10557a7e78b10851c97ee16c7ebf /extensions | |
parent | 181a1b36ac728e3a43e054496ceb53fd3315abdb (diff) |
clang-tidy readability-simplify-boolean-expr
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64
Reviewed-on: https://gerrit.libreoffice.org/61902
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/dbpilots/gridwizard.cxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/propcontroller.cxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx | 5 | ||||
-rw-r--r-- | extensions/source/scanner/sane.cxx | 4 |
4 files changed, 4 insertions, 15 deletions
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 01d6912b5b29..617d2504f8d4 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -77,10 +77,7 @@ namespace dbp return false; Reference< XGridColumnFactory > xColumnFactory(getContext().xObjectModel, UNO_QUERY); - if (!xColumnFactory.is()) - return false; - - return true; + return xColumnFactory.is(); } diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 2ae98b20f8dd..b7e023b17311 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -401,10 +401,7 @@ namespace pcr m_bSuspendingPropertyHandlers = true; bool bHandlerVeto = !suspendPropertyHandlers_nothrow( true ); m_bSuspendingPropertyHandlers = false; - if ( bHandlerVeto ) - return false; - - return true; + return !bHandlerVeto; } diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index ae2b5a0f9c2d..fb99949ca40d 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -535,10 +535,7 @@ namespace pcr std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(nullptr, // TODO/eForms: proper parent VclMessageType::Question, VclButtonsType::YesNo, sConfirmation)); - if (xQueryBox->run() != RET_YES) - return false; - - return true; + return xQueryBox->run() == RET_YES; } bool XSDValidationPropertyHandler::implDoRemoveCurrentDataType() diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 0c6b50bec05c..167d6ba97b20 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -977,9 +977,7 @@ OUString Sane::GetOptionUnitName( int n ) bool Sane::ActivateButtonOption( int n ) { SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, nullptr ); - if( nStatus != SANE_STATUS_GOOD ) - return false; - return true; + return nStatus == SANE_STATUS_GOOD; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |