[Tile-serving] [openstreetmap/osm2pgsql] New ram middle (#1461)
Jochen Topf
notifications at github.com
Mon Apr 26 09:58:42 UTC 2021
@joto commented on this pull request.
> + };
+
+ struct range_entry
+ {
+ std::vector<second_level_index_entry> index;
+ osmid_t from;
+ osmid_t to = 0;
+ std::size_t offset_from;
+
+ range_entry(osmid_t id, std::size_t offset, std::size_t block_size)
+ : from(id), offset_from(offset)
+ {
+ index.reserve(block_size);
+ }
+
+ bool full() const noexcept { return index.size() == index.capacity(); }
https://en.cppreference.com/w/cpp/container/vector says iterators are only invalidated on, for example `push_back()` or `resize()` **if the vector changed capacity**. Documenting it this way makes only sense if we can know whether a vector changed capacity. So I think we are good here.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1461#discussion_r620148923
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210426/79cc9706/attachment.htm>
More information about the Tile-serving
mailing list