From 5b457dfe683c17f0ba25f964570ceba40a5155b6 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Thu, 25 Jan 2024 14:21:59 -0800 Subject: [PATCH] Use the string pool when decoding --- mvt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mvt.cpp b/mvt.cpp index 145b35ec..43c29dad 100644 --- a/mvt.cpp +++ b/mvt.cpp @@ -127,6 +127,7 @@ bool mvt_tile::decode(const std::string &message, bool &was_compressed) { } protozero::pbf_reader reader(src); + std::shared_ptr string_pool = std::make_shared(); while (reader.next()) { switch (reader.tag()) { @@ -157,6 +158,7 @@ bool mvt_tile::decode(const std::string &message, bool &was_compressed) { switch (value_reader.tag()) { case 1: /* string */ value.type = mvt_string; + value.s = string_pool; value.set_string_value(value_reader.get_string()); break;