[core] upgrade RapidJSON to 1.1.0

This commit is contained in:
Konstantin Käfer
2016-08-26 13:46:54 +02:00
parent d6c958ba5f
commit d1d523686c
6 changed files with 21 additions and 20 deletions

View File

@@ -113,11 +113,11 @@ void Parser::parseSources(const JSValue& value) {
return;
}
for (auto it = value.MemberBegin(); it != value.MemberEnd(); ++it) {
std::string id = *conversion::toString(it->name);
for (const auto& property : value.GetObject()) {
std::string id = *conversion::toString(property.name);
conversion::Result<std::unique_ptr<Source>> source
= conversion::convert<std::unique_ptr<Source>>(it->value, id);
conversion::Result<std::unique_ptr<Source>> source =
conversion::convert<std::unique_ptr<Source>>(property.value, id);
if (!source) {
Log::Warning(Event::ParseStyle, source.error().message);
continue;
@@ -136,9 +136,7 @@ void Parser::parseLayers(const JSValue& value) {
return;
}
for (rapidjson::SizeType i = 0; i < value.Size(); ++i) {
const JSValue& layerValue = value[i];
for (auto& layerValue : value.GetArray()) {
if (!layerValue.IsObject()) {
Log::Warning(Event::ParseStyle, "layer must be an object");
continue;