mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 02:15:41 +02:00
Use the string pool when decoding
This commit is contained in:
@@ -127,6 +127,7 @@ bool mvt_tile::decode(const std::string &message, bool &was_compressed) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protozero::pbf_reader reader(src);
|
protozero::pbf_reader reader(src);
|
||||||
|
std::shared_ptr<std::string> string_pool = std::make_shared<std::string>();
|
||||||
|
|
||||||
while (reader.next()) {
|
while (reader.next()) {
|
||||||
switch (reader.tag()) {
|
switch (reader.tag()) {
|
||||||
@@ -157,6 +158,7 @@ bool mvt_tile::decode(const std::string &message, bool &was_compressed) {
|
|||||||
switch (value_reader.tag()) {
|
switch (value_reader.tag()) {
|
||||||
case 1: /* string */
|
case 1: /* string */
|
||||||
value.type = mvt_string;
|
value.type = mvt_string;
|
||||||
|
value.s = string_pool;
|
||||||
value.set_string_value(value_reader.get_string());
|
value.set_string_value(value_reader.get_string());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user