summaryrefslogtreecommitdiff
path: root/include/mbgl/style/sources/custom_geometry_source.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/sources/custom_geometry_source.hpp')
-rw-r--r--include/mbgl/style/sources/custom_geometry_source.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/mbgl/style/sources/custom_geometry_source.hpp b/include/mbgl/style/sources/custom_geometry_source.hpp
index 3f29d0c0fb..a5e545f445 100644
--- a/include/mbgl/style/sources/custom_geometry_source.hpp
+++ b/include/mbgl/style/sources/custom_geometry_source.hpp
@@ -20,7 +20,7 @@ using TileFunction = std::function<void(const CanonicalTileID&)>;
class CustomTileLoader;
-class CustomGeometrySource : public Source {
+class CustomGeometrySource final : public Source {
public:
struct TileOptions {
double tolerance = 0.375;
@@ -46,9 +46,13 @@ public:
// Private implementation
class Impl;
const Impl& impl() const;
+ mapbox::base::WeakPtr<Source> makeWeakPtr() override {
+ return weakFactory.makeWeakPtr();
+ }
private:
std::shared_ptr<ThreadPool> threadPool;
std::unique_ptr<Actor<CustomTileLoader>> loader;
+ mapbox::base::WeakPtrFactory<Source> weakFactory {this};
};
template <>