Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #4973 from nyalldawson/std_reverse
Browse files Browse the repository at this point in the history
Use std::reverse instead of custom array reverse
  • Loading branch information
nyalldawson committed Aug 6, 2017
2 parents a612a68 + 7f1fa54 commit 3d425fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -3605,7 +3605,7 @@ static QVariant fcnArrayCat( const QVariantList &values, const QgsExpressionCont
static QVariant fcnArrayReverse( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent )
{
QVariantList list = QgsExpressionUtils::getListValue( values.at( 0 ), parent );
for ( int k = 0, s = list.size(), max = ( s / 2 ); k < max; k++ ) list.swap( k, s - ( 1 + k ) );
std::reverse( list.begin(), list.end() );
return list;
}

Expand Down

0 comments on commit 3d425fe

Please sign in to comment.