make SourceInfo object noncopyable and use a shared_pointer for it
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user