[Tile-serving] [openstreetmap/osm2pgsql] New ram middle (#1461)
Sarah Hoffmann
notifications at github.com
Mon Apr 26 09:46:04 UTC 2021
@lonvia commented on this pull request.
Comments for first two commits. I'll do the rest later.
> @@ -43,6 +43,13 @@ struct database_options_t
std::string conninfo() const;
};
+struct output_requirements
+{
+ bool full_nodes = false;
+ bool full_ways = false;
+ bool full_relations = false;
Could you please add documentation here. The variable names are not self-explanatory.
> + };
+
+ 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(); }
Is this guaranteed to work, i.e. is vector allowed to pre-emptively enlarge its capacity before it is full?
--
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#pullrequestreview-644419212
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210426/48dd23d8/attachment.htm>
More information about the Tile-serving
mailing list