From e3841c911bb4e9d1c96456ed72f81b908628a2da Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 9 Aug 2017 15:18:54 +0100 Subject: [PATCH] don't use `reserve` as undelying data format doesn't allow for efficient `distance` implementation. --- plugins/input/geobuf/geobuf.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plugins/input/geobuf/geobuf.hpp b/plugins/input/geobuf/geobuf.hpp index 8a38ef587..55fa25532 100644 --- a/plugins/input/geobuf/geobuf.hpp +++ b/plugins/input/geobuf/geobuf.hpp @@ -372,10 +372,7 @@ private: { double x = 0.0; double y = 0.0; - auto size = std::distance(begin, end) / dim; - ring.reserve(close ? size + 1 : size); std::size_t count = 0; - for (auto it = begin; it != end; ++it) { std::int64_t delta= *it; @@ -402,8 +399,6 @@ private: double x = 0.0; double y = 0.0; auto pi = reader.get_packed_sint64(); - auto size = std::distance(pi.first, pi.second) / dim; - multi_point.reserve(size); std::size_t count = 0; for (auto it = pi.first; it != pi.second; ++it) {