Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop working with removed provider #450

Merged
merged 1 commit into from
Jan 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/AmenitySymbolsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ namespace OsmAnd
class Amenity;

class AmenitySymbolsProvider_P;
class OSMAND_CORE_API AmenitySymbolsProvider : public IMapTiledSymbolsProvider
class OSMAND_CORE_API AmenitySymbolsProvider
: public std::enable_shared_from_this<AmenitySymbolsProvider>
, public IMapTiledSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(AmenitySymbolsProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/FavoriteLocationsPresenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ namespace OsmAnd
class IFavoriteLocationsCollection;

class FavoriteLocationsPresenter_P;
class OSMAND_CORE_API FavoriteLocationsPresenter : public IMapKeyedSymbolsProvider
class OSMAND_CORE_API FavoriteLocationsPresenter
: public std::enable_shared_from_this<FavoriteLocationsPresenter>
, public IMapKeyedSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(FavoriteLocationsPresenter);

Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/GeoTileObjectsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ namespace OsmAnd
class MapObject;

class GeoTileObjectsProvider_P;
class OSMAND_CORE_API GeoTileObjectsProvider Q_DECL_FINAL : public IMapObjectsProvider
class OSMAND_CORE_API GeoTileObjectsProvider Q_DECL_FINAL
: public std::enable_shared_from_this<GeoTileObjectsProvider>
, public IMapObjectsProvider
{
Q_DISABLE_COPY_AND_MOVE(GeoTileObjectsProvider);

Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/GpxAdditionalIconsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

namespace OsmAnd
{
class OSMAND_CORE_API GpxAdditionalIconsProvider : public IMapTiledSymbolsProvider
class OSMAND_CORE_API GpxAdditionalIconsProvider
: public std::enable_shared_from_this<GpxAdditionalIconsProvider>
, public IMapTiledSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(GpxAdditionalIconsProvider);
public:
Expand Down
2 changes: 1 addition & 1 deletion include/OsmAndCore/Map/MapDataProviderHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace OsmAnd
std::shared_ptr<Metric>* const pOutMetric = nullptr);

static void nonNaturalObtainDataAsync(
IMapDataProvider* const provider,
const std::shared_ptr<IMapDataProvider>& provider,
const IMapDataProvider::Request& request,
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric = false);
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/MapMarkersCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ namespace OsmAnd
class MapMarkerBuilder_P;

class MapMarkersCollection_P;
class OSMAND_CORE_API MapMarkersCollection : public IMapKeyedSymbolsProvider
class OSMAND_CORE_API MapMarkersCollection
: public std::enable_shared_from_this<MapMarkersCollection>
, public IMapKeyedSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(MapMarkersCollection);

Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/MapObjectsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ namespace OsmAnd
class MapObject;

class MapObjectsProvider_P;
class OSMAND_CORE_API MapObjectsProvider Q_DECL_FINAL : public IMapObjectsProvider
class OSMAND_CORE_API MapObjectsProvider Q_DECL_FINAL
: public std::enable_shared_from_this<MapObjectsProvider>
, public IMapObjectsProvider
{
Q_DISABLE_COPY_AND_MOVE(MapObjectsProvider);

Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/MapObjectsSymbolsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ namespace OsmAnd
class MapObject;

class MapObjectsSymbolsProvider_P;
class OSMAND_CORE_API MapObjectsSymbolsProvider : public IMapTiledSymbolsProvider
class OSMAND_CORE_API MapObjectsSymbolsProvider
: public std::enable_shared_from_this<MapObjectsSymbolsProvider>
, public IMapTiledSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(MapObjectsSymbolsProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/MapPrimitivesMetricsLayerProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
namespace OsmAnd
{
class MapPrimitivesMetricsLayerProvider_P;
class OSMAND_CORE_API MapPrimitivesMetricsLayerProvider Q_DECL_FINAL : public IRasterMapLayerProvider
class OSMAND_CORE_API MapPrimitivesMetricsLayerProvider Q_DECL_FINAL
: public std::enable_shared_from_this<MapPrimitivesMetricsLayerProvider>
, public IRasterMapLayerProvider
{
Q_DISABLE_COPY_AND_MOVE(MapPrimitivesMetricsLayerProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/MapPrimitivesProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
namespace OsmAnd
{
class MapPrimitivesProvider_P;
class OSMAND_CORE_API MapPrimitivesProvider : public IMapTiledDataProvider
class OSMAND_CORE_API MapPrimitivesProvider
: public std::enable_shared_from_this<MapPrimitivesProvider>
, public IMapTiledDataProvider
{
Q_DISABLE_COPY_AND_MOVE(MapPrimitivesProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/MapRasterLayerProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
namespace OsmAnd
{
class MapRasterLayerProvider_P;
class OSMAND_CORE_API MapRasterLayerProvider : public IRasterMapLayerProvider
class OSMAND_CORE_API MapRasterLayerProvider
: public std::enable_shared_from_this<MapRasterLayerProvider>
, public IRasterMapLayerProvider
{
Q_DISABLE_COPY_AND_MOVE(MapRasterLayerProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/MapRasterMetricsLayerProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
namespace OsmAnd
{
class MapRasterMetricsLayerProvider_P;
class OSMAND_CORE_API MapRasterMetricsLayerProvider : public IRasterMapLayerProvider
class OSMAND_CORE_API MapRasterMetricsLayerProvider
: public std::enable_shared_from_this<MapRasterMetricsLayerProvider>
, public IRasterMapLayerProvider
{
Q_DISABLE_COPY_AND_MOVE(MapRasterMetricsLayerProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/MapTiledCollectionProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

namespace OsmAnd
{
class OSMAND_CORE_API MapTiledCollectionProvider : public IMapTiledSymbolsProvider
class OSMAND_CORE_API MapTiledCollectionProvider
: public std::enable_shared_from_this<MapTiledCollectionProvider>
, public IMapTiledSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(MapTiledCollectionProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/ObfMapObjectsMetricsLayerProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
namespace OsmAnd
{
class ObfMapObjectsMetricsLayerProvider_P;
class OSMAND_CORE_API ObfMapObjectsMetricsLayerProvider : public IRasterMapLayerProvider
class OSMAND_CORE_API ObfMapObjectsMetricsLayerProvider
: public std::enable_shared_from_this<ObfMapObjectsMetricsLayerProvider>
, public IRasterMapLayerProvider
{
Q_DISABLE_COPY_AND_MOVE(ObfMapObjectsMetricsLayerProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/ObfMapObjectsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ namespace OsmAnd
class IObfsCollection;

class ObfMapObjectsProvider_P;
class OSMAND_CORE_API ObfMapObjectsProvider Q_DECL_FINAL : public IMapObjectsProvider
class OSMAND_CORE_API ObfMapObjectsProvider Q_DECL_FINAL
: public std::enable_shared_from_this<ObfMapObjectsProvider>
, public IMapObjectsProvider
{
Q_DISABLE_COPY_AND_MOVE(ObfMapObjectsProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/PolygonsCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ namespace OsmAnd
class PolygonBuilder_P;

class PolygonsCollection_P;
class OSMAND_CORE_API PolygonsCollection : public IMapKeyedSymbolsProvider
class OSMAND_CORE_API PolygonsCollection
: public std::enable_shared_from_this<PolygonsCollection>
, public IMapKeyedSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(PolygonsCollection);

Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/SqliteHeightmapTileProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ namespace OsmAnd
class ITileSqliteDatabasesCollection;

class SqliteHeightmapTileProvider_P;
class OSMAND_CORE_API SqliteHeightmapTileProvider : public IMapElevationDataProvider
class OSMAND_CORE_API SqliteHeightmapTileProvider
: public std::enable_shared_from_this<SqliteHeightmapTileProvider>
, public IMapElevationDataProvider
{
Q_DISABLE_COPY_AND_MOVE(SqliteHeightmapTileProvider);

Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/TransportStopSymbolsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ namespace OsmAnd
class TransportRoute;

class TransportStopSymbolsProvider_P;
class OSMAND_CORE_API TransportStopSymbolsProvider : public IMapTiledSymbolsProvider
class OSMAND_CORE_API TransportStopSymbolsProvider
: public std::enable_shared_from_this<TransportStopSymbolsProvider>
, public IMapTiledSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(TransportStopSymbolsProvider);
public:
Expand Down
4 changes: 3 additions & 1 deletion include/OsmAndCore/Map/VectorLineArrowsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ namespace OsmAnd
{
class VectorLinesCollection;
class VectorLineArrowsProvider_P;
class OSMAND_CORE_API VectorLineArrowsProvider : public IMapKeyedSymbolsProvider
class OSMAND_CORE_API VectorLineArrowsProvider
: public std::enable_shared_from_this<VectorLineArrowsProvider>
, public IMapKeyedSymbolsProvider
{
Q_DISABLE_COPY_AND_MOVE(VectorLineArrowsProvider);

Expand Down
2 changes: 1 addition & 1 deletion src/Map/AmenitySymbolsProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void OsmAnd::AmenitySymbolsProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::AmenitySymbolsProvider::Data::Data(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/FavoriteLocationsPresenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void OsmAnd::FavoriteLocationsPresenter::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::ZoomLevel OsmAnd::FavoriteLocationsPresenter::getMinZoom() const
Expand Down
2 changes: 1 addition & 1 deletion src/Map/GeoTileObjectsProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ void OsmAnd::GeoTileObjectsProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}
2 changes: 1 addition & 1 deletion src/Map/GpxAdditionalIconsProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void OsmAnd::GpxAdditionalIconsProvider::obtainDataAsync(const IMapDataProvider:
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
OsmAnd::MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
OsmAnd::MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::GpxAdditionalIconsProvider::Data::Data(const OsmAnd::TileId tileId_,
Expand Down
19 changes: 12 additions & 7 deletions src/Map/MapDataProviderHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,28 @@ bool OsmAnd::MapDataProviderHelpers::nonNaturalObtainData(
}

void OsmAnd::MapDataProviderHelpers::nonNaturalObtainDataAsync(
IMapDataProvider* const provider,
const std::shared_ptr<IMapDataProvider>& provider,
const IMapDataProvider::Request& request,
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
assert(provider->supportsNaturalObtainData());

const auto weakProvider = std::weak_ptr<IMapDataProvider>(provider);
const auto requestClone = request.clone();
const QRunnableFunctor::Callback task =
[provider, requestClone, callback, collectMetric]
[weakProvider, requestClone, callback, collectMetric]
(const QRunnableFunctor* const runnable)
{
std::shared_ptr<IMapDataProvider::Data> data;
std::shared_ptr<Metric> metric;
const bool requestSucceeded = provider->obtainData(*requestClone, data, collectMetric ? &metric : nullptr);

callback(provider, requestSucceeded, data, metric);
const auto provider = weakProvider.lock();
if (provider)
{
std::shared_ptr<IMapDataProvider::Data> data;
std::shared_ptr<Metric> metric;
const bool requestSucceeded =
provider->obtainData(*requestClone, data, collectMetric ? &metric : nullptr);
callback(provider.get(), requestSucceeded, data, metric);
}
};

const auto taskRunnable = new QRunnableFunctor(task);
Expand Down
2 changes: 1 addition & 1 deletion src/Map/MapMarkersCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void OsmAnd::MapMarkersCollection::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::ZoomLevel OsmAnd::MapMarkersCollection::getMinZoom() const
Expand Down
2 changes: 1 addition & 1 deletion src/Map/MapObjectsProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ void OsmAnd::MapObjectsProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}
2 changes: 1 addition & 1 deletion src/Map/MapObjectsSymbolsProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void OsmAnd::MapObjectsSymbolsProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::MapObjectsSymbolsProvider::Data::Data(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/MapPrimitivesMetricsLayerProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void OsmAnd::MapPrimitivesMetricsLayerProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

bool OsmAnd::MapPrimitivesMetricsLayerProvider::obtainMetricsTile(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/MapPrimitivesProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void OsmAnd::MapPrimitivesProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::MapPrimitivesProvider::Data::Data(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/MapRasterLayerProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void OsmAnd::MapRasterLayerProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

bool OsmAnd::MapRasterLayerProvider::obtainRasterizedTile(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/MapRasterMetricsLayerProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void OsmAnd::MapRasterMetricsLayerProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

bool OsmAnd::MapRasterMetricsLayerProvider::obtainMetricsTile(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/MapTiledCollectionProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void OsmAnd::MapTiledCollectionProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::MapTiledCollectionProvider::Data::Data(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/ObfMapObjectsMetricsLayerProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void OsmAnd::ObfMapObjectsMetricsLayerProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

bool OsmAnd::ObfMapObjectsMetricsLayerProvider::obtainMetricsTile(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/ObfMapObjectsProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void OsmAnd::ObfMapObjectsProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

bool OsmAnd::ObfMapObjectsProvider::obtainTiledObfMapObjects(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/PolygonsCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void OsmAnd::PolygonsCollection::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::ZoomLevel OsmAnd::PolygonsCollection::getMinZoom() const
Expand Down
2 changes: 1 addition & 1 deletion src/Map/SqliteHeightmapTileProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ void OsmAnd::SqliteHeightmapTileProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}
2 changes: 1 addition & 1 deletion src/Map/TransportStopSymbolsProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void OsmAnd::TransportStopSymbolsProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::TransportStopSymbolsProvider::Data::Data(
Expand Down
2 changes: 1 addition & 1 deletion src/Map/VectorLineArrowsProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void OsmAnd::VectorLineArrowsProvider::obtainDataAsync(
const IMapDataProvider::ObtainDataAsyncCallback callback,
const bool collectMetric /*= false*/)
{
MapDataProviderHelpers::nonNaturalObtainDataAsync(this, request, callback, collectMetric);
MapDataProviderHelpers::nonNaturalObtainDataAsync(shared_from_this(), request, callback, collectMetric);
}

OsmAnd::ZoomLevel OsmAnd::VectorLineArrowsProvider::getMinZoom() const
Expand Down
Loading