Merge branch 'master' into fuzz-pipe
Conflicts: bin/package.json src/style/style_parser.cpp test/fixtures/fixture_log.cpp test/test.gyp
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#include <llmr/style/style_parser.hpp>
|
||||
#include <llmr/style/style_layer_group.hpp>
|
||||
#include <llmr/util/constants.hpp>
|
||||
#include <llmr/util/std.hpp>
|
||||
#include <llmr/platform/log.hpp>
|
||||
#include <mbgl/style/style_parser.hpp>
|
||||
#include <mbgl/style/style_layer_group.hpp>
|
||||
#include <mbgl/util/constants.hpp>
|
||||
#include <mbgl/util/std.hpp>
|
||||
#include <mbgl/platform/log.hpp>
|
||||
#include <csscolorparser/csscolorparser.hpp>
|
||||
|
||||
namespace llmr {
|
||||
namespace mbgl {
|
||||
|
||||
using JSVal = const rapidjson::Value&;
|
||||
|
||||
@@ -792,7 +792,7 @@ FilterExpression StyleParser::parseFilter(JSVal value, FilterExpression::Operato
|
||||
} else if (filterValue.IsArray()) {
|
||||
comparison.add(FilterComparison::Operator::In, parseValues(filterValue));
|
||||
} else {
|
||||
comparison.add(FilterComparison::Operator::Equal, std::forward_list<Value>({ parseValue(filterValue) }));
|
||||
comparison.add(FilterComparison::Operator::Equal, std::vector<Value>({ parseValue(filterValue) }));
|
||||
}
|
||||
expression.add(comparison);
|
||||
}
|
||||
@@ -830,15 +830,14 @@ Value StyleParser::parseValue(JSVal value) {
|
||||
}
|
||||
}
|
||||
|
||||
std::forward_list<Value> StyleParser::parseValues(JSVal value) {
|
||||
std::forward_list<Value> values;
|
||||
std::vector<Value> StyleParser::parseValues(JSVal value) {
|
||||
std::vector<Value> values;
|
||||
if (value.IsArray()) {
|
||||
auto it = values.before_begin();
|
||||
for (rapidjson::SizeType i = 0; i < value.Size(); i++) {
|
||||
it = values.emplace_after(it, parseValue(replaceConstant(value[i])));
|
||||
values.emplace_back(parseValue(replaceConstant(value[i])));
|
||||
}
|
||||
} else {
|
||||
values.emplace_front(parseValue(value));
|
||||
values.emplace_back(parseValue(value));
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user