diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-14 10:40:44 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-14 11:25:45 -0700 |
commit | f74c5d8abd8f2f4a3921786507d121ffac05e17a (patch) | |
tree | 8fed36e8fe84261c528d4c99a77afdba5b942256 /src/mbgl/annotation | |
parent | b222689de835a8b83c387aff5e5f500ce17768e5 (diff) | |
download | qtlocation-mapboxgl-f74c5d8abd8f2f4a3921786507d121ffac05e17a.tar.gz |
[core] Inline AnnotationSource constructor parameters
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r-- | src/mbgl/annotation/annotation_manager.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/annotation/annotation_source.cpp | 8 | ||||
-rw-r--r-- | src/mbgl/annotation/annotation_source.hpp | 5 |
3 files changed, 5 insertions, 10 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index 2ca32aaa36..b3edbf857d 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -107,7 +107,7 @@ std::unique_ptr<AnnotationTileData> AnnotationManager::getTileData(const Canonic 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<AnnotationSource>(SourceID, "", util::tileSize, std::make_unique<Tileset>()); + std::unique_ptr<Source> source = std::make_unique<AnnotationSource>(); source->enabled = true; style.addSource(std::move(source)); diff --git a/src/mbgl/annotation/annotation_source.cpp b/src/mbgl/annotation/annotation_source.cpp index 024bd4be98..1589370f09 100644 --- a/src/mbgl/annotation/annotation_source.cpp +++ b/src/mbgl/annotation/annotation_source.cpp @@ -1,12 +1,10 @@ #include <mbgl/annotation/annotation_source.hpp> +#include <mbgl/annotation/annotation_manager.hpp> namespace mbgl { -AnnotationSource::AnnotationSource(std::string id_, - std::string url_, - uint16_t tileSize_, - std::unique_ptr<Tileset>&& tileset_) - : Source(SourceType::Annotations, std::move(id_), std::move(url_), tileSize_, std::move(tileset_)) { +AnnotationSource::AnnotationSource() + : Source(SourceType::Annotations, AnnotationManager::SourceID, "", util::tileSize, std::make_unique<Tileset>()) { } } // namespace mbgl diff --git a/src/mbgl/annotation/annotation_source.hpp b/src/mbgl/annotation/annotation_source.hpp index 358e94688d..befff2de85 100644 --- a/src/mbgl/annotation/annotation_source.hpp +++ b/src/mbgl/annotation/annotation_source.hpp @@ -6,10 +6,7 @@ namespace mbgl { class AnnotationSource : public style::Source { public: - AnnotationSource(std::string id, - std::string url, - uint16_t tileSize, - std::unique_ptr<Tileset>&&); + AnnotationSource(); }; } // namespace mbgl |