summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-01-21 16:05:56 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-01-22 12:03:14 +0100
commitd3967e7b05257ba46b560d12d25c947f52831539 (patch)
tree0a710e686c8489998d88ba5208e211996aaa2ce4
parent6b633d5ff3daf9cf1f89474fa7cc4808d57a1fbd (diff)
downloadqtlocation-mapboxgl-d3967e7b05257ba46b560d12d25c947f52831539.tar.gz
[core] don't copy stops by value when recalculating StyleParameters
-rw-r--r--src/mbgl/style/function.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/style/function.cpp b/src/mbgl/style/function.cpp
index 88fb1d6a9b..18e6c1a192 100644
--- a/src/mbgl/style/function.cpp
+++ b/src/mbgl/style/function.cpp
@@ -92,7 +92,7 @@ template class Function<TextTransformType>;
template class Function<RotationAlignmentType>;
template <typename T>
-size_t getBiggestStopLessThan(std::vector<std::pair<float, T>> stops, float z) {
+inline size_t getBiggestStopLessThan(const std::vector<std::pair<float, T>>& stops, float z) {
for (uint32_t i = 0; i < stops.size(); i++) {
if (stops[i].first > z) {
return i == 0 ? i : i - 1;