mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix inefficient code
This commit is contained in:
parent
a43abeced4
commit
f3d53b8de9
@ -828,9 +828,9 @@ void QgsGraduatedSymbolRenderer::updateClasses( QgsVectorLayer* vlayer, Mode mod
|
||||
if ( !ok || values.isEmpty() )
|
||||
return;
|
||||
|
||||
std::sort( values.begin(), values.end() ); // vmora: is wondering if O( n log(n) ) is really necessary here, min and max are O( n )
|
||||
minimum = values.first();
|
||||
maximum = values.last();
|
||||
auto result = std::minmax_element( values.begin(), values.end() );
|
||||
minimum = *result.first;
|
||||
maximum = *result.second;
|
||||
valuesLoaded = true;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user