refactor source information into SourceInfo object

This commit is contained in:
Konstantin Käfer
2014-07-17 15:37:18 -07:00
parent d3aeed6cf2
commit 3141b8b1f7
5 changed files with 38 additions and 44 deletions

View File

@@ -175,7 +175,7 @@ void StyleParser::parseSources(JSVal value) {
parseRenderProperty(itr->value, min_zoom, "minZoom");
parseRenderProperty(itr->value, max_zoom, "maxZoom");
sources.emplace(std::move(name), std::make_shared<StyleSource>(type, url, tile_size, min_zoom, max_zoom));
sources.emplace(std::move(name), std::make_shared<StyleSource>(SourceInfo { type, url, tile_size, min_zoom, max_zoom }));
}
} else {
throw Style::exception("sources must be an object");