add reserve

This commit is contained in:
Andrei Chulkov 2020-05-06 20:29:07 +03:00
parent 531a9981ab
commit a4acc49e6e
3 changed files with 3 additions and 2 deletions

2
contrib/base64 vendored

@ -1 +1 @@
Subproject commit 5257626d2be17a3eb23f79be17fe55ebba394ad2
Subproject commit 95ba56a9b041f9933f5cd2bbb2ee4e083468c20a

2
contrib/poco vendored

@ -1 +1 @@
Subproject commit 1f3e4638f250ad4d028a2499af20d4185463e07d
Subproject commit 860574c93980d887a89df141edd9ca2fb0024fa3

View File

@ -358,6 +358,7 @@ bool BucketsPolygonIndex::find(const Point & point, size_t & id) const
/** point is considired inside when ray down from point crosses odd number of edges */
std::vector<size_t> intersections;
intersections.reserve(10);
size_t pos = std::upper_bound(this->sorted_x.begin() + 1, this->sorted_x.end() - 1, x) - this->sorted_x.begin() - 1;