From 032c8fba3c8e3c122dd399b5c9341d92ad9d286f Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 2 Feb 2016 20:20:47 -0800 Subject: [core] Remove unused --- src/mbgl/annotation/annotation_manager.cpp | 14 -------------- src/mbgl/annotation/annotation_manager.hpp | 1 - src/mbgl/annotation/point_annotation_impl.cpp | 4 ---- src/mbgl/annotation/point_annotation_impl.hpp | 1 - src/mbgl/annotation/shape_annotation_impl.cpp | 12 ------------ src/mbgl/annotation/shape_annotation_impl.hpp | 1 - src/mbgl/map/map.cpp | 4 ---- 7 files changed, 37 deletions(-) (limited to 'src') diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index 1d9c021fa6..52f8b08ad3 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -71,20 +71,6 @@ AnnotationIDs AnnotationManager::getPointAnnotationsInBounds(const LatLngBounds& return result; } -LatLngBounds AnnotationManager::getBoundsForAnnotations(const AnnotationIDs& ids) const { - LatLngBounds result = LatLngBounds::getExtendable(); - - for (const auto& id : ids) { - if (pointAnnotations.find(id) != pointAnnotations.end()) { - result.extend(pointAnnotations.at(id)->bounds()); - } else if (shapeAnnotations.find(id) != shapeAnnotations.end()) { - result.extend(shapeAnnotations.at(id)->bounds()); - } - } - - return result; -} - std::unique_ptr AnnotationManager::getTile(const TileID& tileID) { if (pointAnnotations.empty() && shapeAnnotations.empty()) return nullptr; diff --git a/src/mbgl/annotation/annotation_manager.hpp b/src/mbgl/annotation/annotation_manager.hpp index bc3f73e2ca..163c7129c7 100644 --- a/src/mbgl/annotation/annotation_manager.hpp +++ b/src/mbgl/annotation/annotation_manager.hpp @@ -31,7 +31,6 @@ public: void removeAnnotations(const AnnotationIDs&); AnnotationIDs getPointAnnotationsInBounds(const LatLngBounds&) const; - LatLngBounds getBoundsForAnnotations(const AnnotationIDs&) const; void addIcon(const std::string& name, std::shared_ptr); void removeIcon(const std::string& name); diff --git a/src/mbgl/annotation/point_annotation_impl.cpp b/src/mbgl/annotation/point_annotation_impl.cpp index c84912750f..8e1aab2edf 100644 --- a/src/mbgl/annotation/point_annotation_impl.cpp +++ b/src/mbgl/annotation/point_annotation_impl.cpp @@ -25,8 +25,4 @@ void PointAnnotationImpl::updateLayer(const TileID& tileID, AnnotationTileLayer& featureProperties)); } -LatLngBounds PointAnnotationImpl::bounds() const { - return LatLngBounds(point.position, point.position); -} - } // namespace mbgl diff --git a/src/mbgl/annotation/point_annotation_impl.hpp b/src/mbgl/annotation/point_annotation_impl.hpp index 47c3bffea2..8e99856eb7 100644 --- a/src/mbgl/annotation/point_annotation_impl.hpp +++ b/src/mbgl/annotation/point_annotation_impl.hpp @@ -43,7 +43,6 @@ public: PointAnnotationImpl(const AnnotationID, const PointAnnotation&); - LatLngBounds bounds() const; void updateLayer(const TileID&, AnnotationTileLayer&) const; const AnnotationID id; diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index 40f5d1997c..418d3adaed 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -147,16 +147,4 @@ void ShapeAnnotationImpl::updateTile(const TileID& tileID, AnnotationTile& tile) } } -LatLngBounds ShapeAnnotationImpl::bounds() const { - LatLngBounds result; - - for (const auto& segment : shape.segments) { - for (const auto& point : segment) { - result.extend(point); - } - } - - return result; -} - } // namespace mbgl diff --git a/src/mbgl/annotation/shape_annotation_impl.hpp b/src/mbgl/annotation/shape_annotation_impl.hpp index 5095d4310f..41069dbfd2 100644 --- a/src/mbgl/annotation/shape_annotation_impl.hpp +++ b/src/mbgl/annotation/shape_annotation_impl.hpp @@ -22,7 +22,6 @@ public: ShapeAnnotationImpl(const AnnotationID, const ShapeAnnotation&, const uint8_t maxZoom); - LatLngBounds bounds() const; void updateStyle(Style&); void updateTile(const TileID&, AnnotationTile&); diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index e435ec32bf..cab1d42b38 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -465,10 +465,6 @@ AnnotationIDs Map::getPointAnnotationsInBounds(const LatLngBounds& bounds) { return data->getAnnotationManager()->getPointAnnotationsInBounds(bounds); } -LatLngBounds Map::getBoundsForAnnotations(const AnnotationIDs& annotations) { - return data->getAnnotationManager()->getBoundsForAnnotations(annotations); -} - #pragma mark - Style API void Map::addCustomLayer(const std::string& id, -- cgit v1.2.1