diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-27 18:30:35 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-04-17 03:17:22 +0300 |
commit | 9eb5456506d038d5b86cd7bc117eab0138d700d9 (patch) | |
tree | 8b5bd6e130c9e138e7fed5b8926fa34d7ec933d3 | |
parent | 0bfa98bbbb38ab2afe6586f17efdb496662a17dc (diff) | |
download | qtlocation-mapboxgl-9eb5456506d038d5b86cd7bc117eab0138d700d9.tar.gz |
[core] Fix performance-inefficient-vector-operation errors in header files
As reported by clang-tidy-8.
-rw-r--r-- | include/mbgl/style/expression/value.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mbgl/style/expression/value.hpp b/include/mbgl/style/expression/value.hpp index 80e6b65233..ad11d1ceb4 100644 --- a/include/mbgl/style/expression/value.hpp +++ b/include/mbgl/style/expression/value.hpp @@ -142,6 +142,7 @@ optional<T> fromExpressionValue(const Value& value) { template <typename T> std::vector<optional<T>> fromExpressionValues(const std::vector<optional<Value>>& values) { std::vector<optional<T>> result; + result.reserve(values.size()); for (const auto& value : values) { result.push_back(value ? fromExpressionValue<T>(*value) : nullopt); } |