[core] move invariant SourceType from SourceInfo to Source

This commit is contained in:
Konstantin Käfer
2016-01-13 11:53:33 +01:00
committed by John Firebaugh
parent 62973f9e5a
commit f00a6a997b
5 changed files with 22 additions and 26 deletions

View File

@@ -112,8 +112,7 @@ std::unique_ptr<AnnotationTile> AnnotationManager::getTile(const TileID& tileID)
void AnnotationManager::updateStyle(Style& style) {
// Create annotation source, point layer, and point bucket
if (!style.getSource(SourceID)) {
std::unique_ptr<Source> source = std::make_unique<Source>();
source->info.type = SourceType::Annotations;
std::unique_ptr<Source> source = std::make_unique<Source>(SourceType::Annotations);
source->info.source_id = SourceID;
source->enabled = true;
style.addSource(std::move(source));