diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-09-17 16:01:35 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-09-24 16:16:29 +0200 |
commit | 19129cbd023345569b24f1b9863e0ee32ae61182 (patch) | |
tree | 5ba50fe2bef783594ca1bff64c74137f575da623 /src/style | |
parent | 111fccb76c1f599470074a75ca77e9de016cca73 (diff) | |
download | qtlocation-mapboxgl-19129cbd023345569b24f1b9863e0ee32ae61182.tar.gz |
make SourceInfo object noncopyable and use a shared_pointer for it
Diffstat (limited to 'src/style')
-rw-r--r-- | src/style/style_parser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp index 3eed161510..c2247d51b2 100644 --- a/src/style/style_parser.cpp +++ b/src/style/style_parser.cpp @@ -176,12 +176,12 @@ void StyleParser::parseSources(JSVal value) { rapidjson::Value::ConstMemberIterator itr = value.MemberBegin(); for (; itr != value.MemberEnd(); ++itr) { std::string name { itr->name.GetString(), itr->name.GetStringLength() }; - SourceInfo info; + util::ptr<SourceInfo> info = std::make_shared<SourceInfo>(); - parseRenderProperty<SourceTypeClass>(itr->value, info.type, "type"); - parseRenderProperty(itr->value, info.url, "url"); - parseRenderProperty(itr->value, info.tile_size, "tileSize"); - info.parseTileJSONProperties(itr->value); + parseRenderProperty<SourceTypeClass>(itr->value, info->type, "type"); + parseRenderProperty(itr->value, info->url, "url"); + parseRenderProperty(itr->value, info->tile_size, "tileSize"); + info->parseTileJSONProperties(itr->value); sources.emplace(std::move(name), std::make_shared<StyleSource>(info)); } |