Skip to content

Commit

Permalink
Use std::reverse instead of custom array reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 6, 2017
1 parent 7f5b4db commit 7f1fa54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Original file line number Diff line number Diff line change
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 7f1fa54

Please sign in to comment.