Add readability-simplify-boolean-expr

* Add readability-simplify-boolean-expr
* Fixes based on review
This commit is contained in:
Magne Sjaastad
2023-06-26 13:12:41 +02:00
committed by GitHub
parent 34d83efaed
commit 59ca0b943c
116 changed files with 179 additions and 635 deletions

View File

@@ -89,11 +89,7 @@ bool RicToggleItemsFeatureImpl::isToggleCommandsForSubItems()
{
std::vector<caf::PdmUiItem*> selectedItems;
caf::SelectionManager::instance()->selectedItems( selectedItems );
if ( isToggleCommandsAvailable() && selectedItems.size() == 1 )
{
return true;
}
return false;
return isToggleCommandsAvailable() && selectedItems.size() == 1;
}
//--------------------------------------------------------------------------------------------------
@@ -110,7 +106,7 @@ void RicToggleItemsFeatureImpl::setObjectToggleStateForSelection( SelectionToggl
// contain a field with the target state value. When setting a value to a field with the same value, nothing happens and the UI will
// get an inconsistent state (some curves toggled off are still visible in a plot).
const bool targetState = ( state == TOGGLE_ON ) ? true : false;
const bool targetState = state == TOGGLE_ON;
for ( const auto& field : selectedFields )
{