mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#10649 ApplicationLibCode: Use collection.empty() instead of comparing with size
This commit is contained in:
@@ -45,7 +45,7 @@ bool RicDeleteScriptPathFeature::isCommandEnabled() const
|
||||
{
|
||||
if ( selection.front()->directory().isEmpty() ) return false;
|
||||
}
|
||||
return selection.size() > 0;
|
||||
return !selection.empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -54,7 +54,7 @@ bool RicDeleteScriptPathFeature::isCommandEnabled() const
|
||||
void RicDeleteScriptPathFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
std::vector<RimScriptCollection*> calcScriptCollections = RicScriptFeatureImpl::selectedScriptCollections();
|
||||
RimScriptCollection* scriptCollection = calcScriptCollections.size() > 0 ? calcScriptCollections[0] : nullptr;
|
||||
RimScriptCollection* scriptCollection = !calcScriptCollections.empty() ? calcScriptCollections[0] : nullptr;
|
||||
if ( scriptCollection )
|
||||
{
|
||||
QString toBeRemoved = scriptCollection->directory;
|
||||
|
||||
Reference in New Issue
Block a user