diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-06-14 15:03:13 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-06-18 16:26:51 +0300 |
commit | 59e7b9a8780e282cf90ede7ae8e3b1affe1e684e (patch) | |
tree | e5f7fd8a74f4a9495d872acdcdf4eb2b44f123f2 /platform/default/src/mbgl | |
parent | 9beb740fb747e721b6a678bbe63399c70e132881 (diff) | |
download | qtlocation-mapboxgl-59e7b9a8780e282cf90ede7ae8e3b1affe1e684e.tar.gz |
[core] Rename resetCache to resetDatabase
Avoid confusion about what is being reset. In this case, the whole
database and not only the ambient cache.
Diffstat (limited to 'platform/default/src/mbgl')
-rw-r--r-- | platform/default/src/mbgl/storage/default_file_source.cpp | 8 | ||||
-rw-r--r-- | platform/default/src/mbgl/storage/offline_database.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/platform/default/src/mbgl/storage/default_file_source.cpp b/platform/default/src/mbgl/storage/default_file_source.cpp index 92e86b25d0..0f786f3868 100644 --- a/platform/default/src/mbgl/storage/default_file_source.cpp +++ b/platform/default/src/mbgl/storage/default_file_source.cpp @@ -184,8 +184,8 @@ public: offlineDatabase->put(resource, response); } - void resetCache(std::function<void (std::exception_ptr)> callback) { - callback(offlineDatabase->resetCache()); + void resetDatabase(std::function<void (std::exception_ptr)> callback) { + callback(offlineDatabase->resetDatabase()); } void invalidateTileCache(std::function<void (std::exception_ptr)> callback) { @@ -339,8 +339,8 @@ void DefaultFileSource::put(const Resource& resource, const Response& response) impl->actor().invoke(&Impl::put, resource, response); } -void DefaultFileSource::resetCache(std::function<void (std::exception_ptr)> callback) { - impl->actor().invoke(&Impl::resetCache, callback); +void DefaultFileSource::resetDatabase(std::function<void (std::exception_ptr)> callback) { + impl->actor().invoke(&Impl::resetDatabase, std::move(callback)); } void DefaultFileSource::invalidateTileCache(std::function<void (std::exception_ptr)> callback) { diff --git a/platform/default/src/mbgl/storage/offline_database.cpp b/platform/default/src/mbgl/storage/offline_database.cpp index 8c16ebf078..ab04cde5ed 100644 --- a/platform/default/src/mbgl/storage/offline_database.cpp +++ b/platform/default/src/mbgl/storage/offline_database.cpp @@ -1195,7 +1195,7 @@ bool OfflineDatabase::exceedsOfflineMapboxTileCountLimit(const Resource& resourc && offlineMapboxTileCountLimitExceeded(); } -std::exception_ptr OfflineDatabase::resetCache() try { +std::exception_ptr OfflineDatabase::resetDatabase() try { removeExisting(); initialize(); return nullptr; |