summaryrefslogtreecommitdiff
path: root/src/mbgl/style/rapidjson_conversion.hpp
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/rapidjson_conversion.hpp
parentd6c958ba5fab8318be09d0c60a2eccd9ccbd7186 (diff)
downloadqtlocation-mapboxgl-d1d523686c01aacee1f1f9b6f6c7f22a6ff54d14.tar.gz
[core] upgrade RapidJSON to 1.1.0
Diffstat (limited to 'src/mbgl/style/rapidjson_conversion.hpp')
-rw-r--r--src/mbgl/style/rapidjson_conversion.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mbgl/style/rapidjson_conversion.hpp b/src/mbgl/style/rapidjson_conversion.hpp
index ecf044fb64..101fe67ec0 100644
--- a/src/mbgl/style/rapidjson_conversion.hpp
+++ b/src/mbgl/style/rapidjson_conversion.hpp
@@ -37,8 +37,10 @@ inline const JSValue* objectMember(const JSValue& value, const char * name) {
template <class Fn>
optional<Error> eachMember(const JSValue& value, Fn&& fn) {
- for (auto it = value.MemberBegin(); it != value.MemberEnd(); ++it) {
- optional<Error> result = fn({it->name.GetString(), it->name.GetStringLength()}, it->value);
+ assert(value.IsObject());
+ for (const auto& property : value.GetObject()) {
+ optional<Error> result =
+ fn({ property.name.GetString(), property.name.GetStringLength() }, property.value);
if (result) {
return result;
}