We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I noticed that layer_map<CoordinateType> decode_tile(std::string const& buffer) at
layer_map<CoordinateType> decode_tile(std::string const& buffer)
vector-tile/include/mapbox/vector_tile.hpp
Lines 62 to 84 in 95c240b
diff --git a/include/mapbox/vector_tile.hpp b/include/mapbox/vector_tile.hpp index c61640b..0e8c672 100644 --- a/include/mapbox/vector_tile.hpp +++ b/include/mapbox/vector_tile.hpp @@ -66,12 +66,13 @@ layer_map<CoordinateType> decode_tile(std::string const& buffer) while (auto layer = tile.next_layer()) { mapbox::feature::feature_collection<CoordinateType> fc; + fc.reserve(layer.num_features()); while (auto feature = layer.next_feature()) { auto f = extract_feature<CoordinateType>(feature); if (!f.geometry.template is<mapbox::geometry::empty>()) { - fc.push_back(f); + fc.push_back(std::move(f)); } }
/cc @flippmoke to review and apply if this looks good.
The text was updated successfully, but these errors were encountered:
flippmoke
No branches or pull requests
I noticed that
layer_map<CoordinateType> decode_tile(std::string const& buffer)
atvector-tile/include/mapbox/vector_tile.hpp
Lines 62 to 84 in 95c240b
/cc @flippmoke to review and apply if this looks good.
The text was updated successfully, but these errors were encountered: