mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-04 09:25:41 +02:00
Replace duplicated code with template
This commit is contained in:
@@ -98,7 +98,11 @@ struct mvt_value {
|
||||
} numeric_value;
|
||||
|
||||
std::string get_string_value() const {
|
||||
return std::string(*s, numeric_value.string_value.off, numeric_value.string_value.len);
|
||||
if (type == mvt_string) {
|
||||
return std::string(*s, numeric_value.string_value.off, numeric_value.string_value.len);
|
||||
} else {
|
||||
return toString();
|
||||
}
|
||||
}
|
||||
|
||||
std::string_view get_string_view() const {
|
||||
|
||||
Reference in New Issue
Block a user