summaryrefslogtreecommitdiff
path: root/src/mbgl/style/parser.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-08-26 13:46:54 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-09-15 14:05:23 +0200
commitd1d523686c01aacee1f1f9b6f6c7f22a6ff54d14 (patch)
tree45e6209ce30bf0e78d8b8690ead61e93befeb0a3 /src/mbgl/style/parser.cpp
parentd6c958ba5fab8318be09d0c60a2eccd9ccbd7186 (diff)
downloadqtlocation-mapboxgl-d1d523686c01aacee1f1f9b6f6c7f22a6ff54d14.tar.gz
[core] upgrade RapidJSON to 1.1.0
Diffstat (limited to 'src/mbgl/style/parser.cpp')
-rw-r--r--src/mbgl/style/parser.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mbgl/style/parser.cpp b/src/mbgl/style/parser.cpp
index e53fac2667..059082980d 100644
--- a/src/mbgl/style/parser.cpp
+++ b/src/mbgl/style/parser.cpp
@@ -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;