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:
@@ -199,7 +199,7 @@ bool RimUserDefinedCalculation::parseExpression()
|
||||
}
|
||||
|
||||
std::vector<QString> variableNames = ExpressionParser::detectReferencedVariables( m_expression );
|
||||
if ( variableNames.size() < 1 )
|
||||
if ( variableNames.empty() )
|
||||
{
|
||||
RiaLogging::errorInMessageBox( nullptr, "Expression Parser", "Failed to detect any variable names" );
|
||||
|
||||
@@ -256,7 +256,7 @@ QString RimUserDefinedCalculation::findLeftHandSide( const QString& expression )
|
||||
|
||||
QStringList words = s.split( " " );
|
||||
|
||||
if ( words.size() > 0 )
|
||||
if ( !words.empty() )
|
||||
{
|
||||
return words.back();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user