[Tile-serving] [openstreetmap/osm2pgsql] Refactoring of WKB code (#1469)

Sarah Hoffmann notifications at github.com
Thu Apr 29 20:48:34 UTC 2021


@lonvia commented on this pull request.



> +
+private:
+    std::string m_data;
+    uint32_t m_srid;
+
+    std::size_t m_geometry_size_offset = 0;
+    std::size_t m_multigeometry_size_offset = 0;
+    std::size_t m_ring_size_offset = 0;
+
+    void set_size(std::size_t offset, std::size_t size)
+    {
+        assert(m_data.size() >= offset + sizeof(uint32_t));
+        auto const s = static_cast<uint32_t>(size);
+        std::memcpy(&m_data[offset], reinterpret_cast<char const *>(&s),
+                    sizeof(uint32_t));
+    }

Functions should come before members.

-- 
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/1469#pullrequestreview-648636748
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210429/0187c9f0/attachment.htm>


More information about the Tile-serving mailing list