Removed to restrictive checks

This commit is contained in:
Martin Tůma 2018-10-31 17:51:33 +01:00
parent 80bf56bda8
commit 447aa9bb22

View File

@ -59,14 +59,10 @@ Style::Layer::Filter::Filter(const QJsonArray &json)
_kv = QPair<QString, QVariant>(json.at(1).toString(), _kv = QPair<QString, QVariant>(json.at(1).toString(),
json.at(2).toVariant()); json.at(2).toVariant());
} else if (type == "all") { } else if (type == "all") {
if (json.size() < 2)
INVALID_FILTER(json);
_type = All; _type = All;
for (int i = 1; i < json.size(); i++) for (int i = 1; i < json.size(); i++)
_filters.append(Filter(json.at(i).toArray())); _filters.append(Filter(json.at(i).toArray()));
} else if (type == "any") { } else if (type == "any") {
if (json.size() < 2)
INVALID_FILTER(json);
_type = Any; _type = Any;
for (int i = 1; i < json.size(); i++) for (int i = 1; i < json.size(); i++)
_filters.append(Filter(json.at(i).toArray())); _filters.append(Filter(json.at(i).toArray()));