summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-25 20:57:48 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-25 22:09:07 +0200
commit0998ffbab8fee4a6e31a5293d239116dbe10449a (patch)
tree2c3058809a9bc53cf710d0afa727b285e3c96efe /include
parentd4db3b11267d9ac22fc53991a383f95f95e607ea (diff)
downloadqtlocation-mapboxgl-0998ffbab8fee4a6e31a5293d239116dbe10449a.tar.gz
[core] Use const& for the OfflineRegion object
It is used as const and also fixes a build issue on iOS: ``` Non-const lvalue reference to type ‘mbgl::OfflineRegion’ cannot bind to a temporary of type ‘typename remove_reference<OfflineRegion &>::type’ (aka ‘mbgl::OfflineRegion’) ```
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/storage/database_file_source.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/mbgl/storage/database_file_source.hpp b/include/mbgl/storage/database_file_source.hpp
index 31079fcc3d..1578ba8418 100644
--- a/include/mbgl/storage/database_file_source.hpp
+++ b/include/mbgl/storage/database_file_source.hpp
@@ -159,12 +159,12 @@ public:
/*
* Register an observer to be notified when the state of the region changes.
*/
- virtual void setOfflineRegionObserver(OfflineRegion&, std::unique_ptr<OfflineRegionObserver>);
+ virtual void setOfflineRegionObserver(const OfflineRegion&, std::unique_ptr<OfflineRegionObserver>);
/*
* Pause or resume downloading of regional resources.
*/
- virtual void setOfflineRegionDownloadState(OfflineRegion&, OfflineRegionDownloadState);
+ virtual void setOfflineRegionDownloadState(const OfflineRegion&, OfflineRegionDownloadState);
/*
* Retrieve the current status of the region. The query will be executed
@@ -172,7 +172,7 @@ public:
* executed on the database thread; it is the responsibility of the SDK bindings
* to re-execute a user-provided callback on the main thread.
*/
- virtual void getOfflineRegionStatus(OfflineRegion&,
+ virtual void getOfflineRegionStatus(const OfflineRegion&,
std::function<void(expected<OfflineRegionStatus, std::exception_ptr>)>) const;
/*
@@ -216,7 +216,7 @@ public:
* executed on the database thread; it is the responsibility of the SDK bindings
* to re-execute a user-provided callback on the main thread.
*/
- virtual void deleteOfflineRegion(OfflineRegion&, std::function<void(std::exception_ptr)>);
+ virtual void deleteOfflineRegion(const OfflineRegion&, std::function<void(std::exception_ptr)>);
/*
* Invalidate all the tiles from an offline region forcing Mapbox GL to revalidate
@@ -224,7 +224,7 @@ public:
* offline region and downloading it again because if the data on the cache matches
* the server, no new data gets transmitted.
*/
- virtual void invalidateOfflineRegion(OfflineRegion&, std::function<void(std::exception_ptr)>);
+ virtual void invalidateOfflineRegion(const OfflineRegion&, std::function<void(std::exception_ptr)>);
/*
* Changing or bypassing this limit without permission from Mapbox is prohibited