mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Optimize the always-true filter case
This commit is contained in:
@@ -667,6 +667,10 @@ json_object *parse_filter(const char *s) {
|
|||||||
|
|
||||||
bool evaluate(mvt_feature const &feat, mvt_layer const &layer, json_object *filter, std::set<std::string> &exclude_attributes, int z) {
|
bool evaluate(mvt_feature const &feat, mvt_layer const &layer, json_object *filter, std::set<std::string> &exclude_attributes, int z) {
|
||||||
if (filter != NULL) {
|
if (filter != NULL) {
|
||||||
|
if (filter->type == JSON_TRUE) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
std::map<std::string, mvt_value> attributes;
|
std::map<std::string, mvt_value> attributes;
|
||||||
|
|
||||||
for (size_t t = 0; t + 1 < feat.tags.size(); t += 2) {
|
for (size_t t = 0; t + 1 < feat.tags.size(); t += 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user