Skip to content

Commit 3d425fe

Browse files
authored
Merge pull request #4973 from nyalldawson/std_reverse
Use std::reverse instead of custom array reverse
2 parents a612a68 + 7f1fa54 commit 3d425fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/expression/qgsexpressionfunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3605,7 +3605,7 @@ static QVariant fcnArrayCat( const QVariantList &values, const QgsExpressionCont
36053605
static QVariant fcnArrayReverse( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent )
36063606
{
36073607
QVariantList list = QgsExpressionUtils::getListValue( values.at( 0 ), parent );
3608-
for ( int k = 0, s = list.size(), max = ( s / 2 ); k < max; k++ ) list.swap( k, s - ( 1 + k ) );
3608+
std::reverse( list.begin(), list.end() );
36093609
return list;
36103610
}
36113611

0 commit comments

Comments
 (0)