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:
@@ -39,7 +39,7 @@ void RicImportGeoMechCaseFeature::onActionTriggered( bool isChecked )
|
||||
"Import Geo-Mechanical Model",
|
||||
defaultDir,
|
||||
"Abaqus results (*.odb);;Abaqus input file (*.inp)" );
|
||||
if ( fileNames.size() ) defaultDir = QFileInfo( fileNames.last() ).absolutePath();
|
||||
if ( !fileNames.empty() ) defaultDir = QFileInfo( fileNames.last() ).absolutePath();
|
||||
app->setLastUsedDialogDirectory( "GEOMECH_MODEL", defaultDir );
|
||||
|
||||
for ( const auto& fileName : fileNames )
|
||||
|
||||
@@ -39,7 +39,7 @@ void RicImportGeoMechCaseTimeStepFilterFeature::onActionTriggered( bool isChecke
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "GEOMECH_MODEL" );
|
||||
QStringList fileNames =
|
||||
RiuFileDialogTools::getOpenFileNames( nullptr, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)" );
|
||||
if ( fileNames.size() ) defaultDir = QFileInfo( fileNames.last() ).absolutePath();
|
||||
if ( !fileNames.empty() ) defaultDir = QFileInfo( fileNames.last() ).absolutePath();
|
||||
for ( QString fileName : fileNames )
|
||||
{
|
||||
if ( !fileName.isEmpty() )
|
||||
|
||||
@@ -123,7 +123,7 @@ void RicRunFaultReactModelingFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
gCase->reloadDataAndUpdate();
|
||||
auto& views = gCase->geoMechViews();
|
||||
if ( views.size() > 0 )
|
||||
if ( !views.empty() )
|
||||
{
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( views[0] );
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void RicShowFaultReactModelFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
gCase->reloadDataAndUpdate();
|
||||
auto& views = gCase->geoMechViews();
|
||||
if ( views.size() > 0 )
|
||||
if ( !views.empty() )
|
||||
{
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( views[0] );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user