summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-21 05:29:30 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-21 05:31:37 (GMT)
commit65c4af4a2a456767df247574b4803095c558a0bf (patch)
tree9665dce8c7e4b907ed2a2ef33b5cd3af4a8eb0f8
parente22fc53e26db49788dde4f74ced3ffd851a6080a (diff)
Keep niceIntervals as static list instead of creating it every time
-rw-r--r--src/plugins/render/elevationprofilefloatitem/ElevationProfilePlotAxis.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/render/elevationprofilefloatitem/ElevationProfilePlotAxis.cpp b/src/plugins/render/elevationprofilefloatitem/ElevationProfilePlotAxis.cpp
index 874598f..6e066e4 100644
--- a/src/plugins/render/elevationprofilefloatitem/ElevationProfilePlotAxis.cpp
+++ b/src/plugins/render/elevationprofilefloatitem/ElevationProfilePlotAxis.cpp
@@ -92,8 +92,7 @@ void ElevationProfilePlotAxis::updateTicks()
return;
}
- QList<int> niceIntervals;
- niceIntervals << 10 << 20 << 25 << 30 << 50;
+ static QVector<int> niceIntervals = QVector<int>() << 10 << 20 << 25 << 30 << 50;
const int exponent = qRound( log10( range() ) );
const qreal factor = qPow( 10, 2 - exponent );