reserve delta vector beforehand to avoid realocations.
This commit is contained in:
parent
800bb223b5
commit
e26ef17545
@ -81,6 +81,7 @@ PolylineCompressor::get_encoded_string(const std::vector<SegmentInformation> &po
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> delta_numbers;
|
std::vector<int> delta_numbers;
|
||||||
|
delta_numbers.reserve((polyline.size() - 1) * 2);
|
||||||
FixedPointCoordinate previous_coordinate = {0, 0};
|
FixedPointCoordinate previous_coordinate = {0, 0};
|
||||||
for (const auto &segment : polyline)
|
for (const auto &segment : polyline)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user