Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use isEmpty() rather than size() to check for empty lists
  • Loading branch information
nyalldawson committed Oct 24, 2016
1 parent 4428908 commit 2fb8695
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/qgssqlcomposerdialog.cpp
Expand Up @@ -456,7 +456,7 @@ void QgsSQLComposerDialog::getFunctionList( const QList<Function>& list,
listApi << f.name;
QString entryText( f.name );
entryText += "(";
if ( f.argumentList.size() )
if ( !f.argumentList.isEmpty() )
{
for ( int i = 0;i < f.argumentList.size();i++ )
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wfs/qgswfsshareddata.cpp
Expand Up @@ -1162,7 +1162,7 @@ QgsGmlStreamingParser* QgsWFSSharedData::createParser()
axisOrientationLogic = QgsGmlStreamingParser::Ignore_EPSG;
}

if ( mLayerPropertiesList.size() )
if ( !mLayerPropertiesList.isEmpty() )
{
QList< QgsGmlStreamingParser::LayerProperties > layerPropertiesList;
Q_FOREACH ( QgsOgcUtils::LayerProperties layerProperties, mLayerPropertiesList )
Expand Down

0 comments on commit 2fb8695

Please sign in to comment.