diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/default/include/mbgl/storage/offline_database.hpp | 2 | ||||
-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 | ||||
-rw-r--r-- | platform/glfw/glfw_view.cpp | 2 | ||||
-rw-r--r-- | platform/glfw/glfw_view.hpp | 4 | ||||
-rw-r--r-- | platform/glfw/main.cpp | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/platform/default/include/mbgl/storage/offline_database.hpp b/platform/default/include/mbgl/storage/offline_database.hpp index 4e9ffcf028..f9c03dc35d 100644 --- a/platform/default/include/mbgl/storage/offline_database.hpp +++ b/platform/default/include/mbgl/storage/offline_database.hpp @@ -44,7 +44,7 @@ public: ~OfflineDatabase(); void changePath(const std::string&); - std::exception_ptr resetCache(); + std::exception_ptr resetDatabase(); optional<Response> get(const Resource&); 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; diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index cba3419672..41c3e93b35 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -222,7 +222,7 @@ void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action, view->clearAnnotations(); break; case GLFW_KEY_I: - view->resetCacheCallback(); + view->resetDatabaseCallback(); break; case GLFW_KEY_K: view->addRandomCustomPointAnnotations(1); diff --git a/platform/glfw/glfw_view.hpp b/platform/glfw/glfw_view.hpp index 3322932dde..9c9661546c 100644 --- a/platform/glfw/glfw_view.hpp +++ b/platform/glfw/glfw_view.hpp @@ -41,7 +41,7 @@ public: } void setResetCacheCallback(std::function<void()> callback) { - resetCacheCallback = callback; + resetDatabaseCallback = callback; }; void setShouldClose(); @@ -125,7 +125,7 @@ private: std::function<void()> changeStyleCallback; std::function<void()> pauseResumeCallback; std::function<void()> onlineStatusCallback; - std::function<void()> resetCacheCallback; + std::function<void()> resetDatabaseCallback; std::function<void(mbgl::Map*)> animateRouteCallback; mbgl::util::RunLoop runLoop; diff --git a/platform/glfw/main.cpp b/platform/glfw/main.cpp index a5001d1204..3c1e50e196 100644 --- a/platform/glfw/main.cpp +++ b/platform/glfw/main.cpp @@ -161,7 +161,7 @@ int main(int argc, char *argv[]) { }); view->setResetCacheCallback([fileSource] () { - fileSource->resetCache([](std::exception_ptr ex) { + fileSource->resetDatabase([](std::exception_ptr ex) { if (ex) { mbgl::Log::Error(mbgl::Event::Database, "Failed to reset cache:: %s", mbgl::util::toString(ex).c_str()); } |