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 13:36:50 +0300 |
commit | c21cf413b82f40a6e978120a49ce72e327b0e85e (patch) | |
tree | 8b5bd6e130c9e138e7fed5b8926fa34d7ec933d3 /include | |
parent | c4cb026fa4d30b7d81c4a23613dc5d772b1708d0 (diff) | |
download | qtlocation-mapboxgl-c21cf413b82f40a6e978120a49ce72e327b0e85e.tar.gz |
[core] Fix performance-inefficient-vector-operation errors in header files
As reported by clang-tidy-8.
Diffstat (limited to 'include')
-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); } |