diff options
author | Leith Bade <leith@mapbox.com> | 2015-02-03 13:54:12 +1100 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2015-02-04 09:39:25 +1100 |
commit | 89bbd29278b40e8de1e369ee54325d4d3098bf65 (patch) | |
tree | c8da5fc881c4ebff56766eb99db81c53e5563892 /platform | |
parent | 33b4922220d19a5049072b59cbad01358099b1cf (diff) | |
download | qtlocation-mapboxgl-89bbd29278b40e8de1e369ee54325d4d3098bf65.tar.gz |
Use std::chrono
Diffstat (limited to 'platform')
-rw-r--r-- | platform/default/glfw_view.cpp | 8 | ||||
-rw-r--r-- | platform/default/headless_view.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp index 748f27ed23..8306229d4a 100644 --- a/platform/default/glfw_view.cpp +++ b/platform/default/glfw_view.cpp @@ -174,7 +174,7 @@ void GLFWView::key(GLFWwindow *window, int key, int /*scancode*/, int action, in break; case GLFW_KEY_R: if (!mods) { - view->map->setDefaultTransitionDuration(300); + view->map->setDefaultTransitionDuration(std::chrono::milliseconds(300)); if (view->map->hasClass("night")) { view->map->removeClass("night"); } else { @@ -239,9 +239,9 @@ void GLFWView::mouseClick(GLFWwindow *window, int button, int action, int modifi double now = glfwGetTime(); if (now - view->lastClick < 0.4 /* ms */) { if (modifiers & GLFW_MOD_SHIFT) { - view->map->scaleBy(0.5, view->lastX, view->lastY, 0.5); + view->map->scaleBy(0.5, view->lastX, view->lastY, std::chrono::milliseconds(500)); } else { - view->map->scaleBy(2.0, view->lastX, view->lastY, 0.5); + view->map->scaleBy(2.0, view->lastX, view->lastY, std::chrono::milliseconds(500)); } } view->lastClick = now; @@ -301,7 +301,7 @@ void GLFWView::swap() { fps(); } -void GLFWView::notifyMapChange(mbgl::MapChange /*change*/, mbgl::timestamp /*delay*/) { +void GLFWView::notifyMapChange(mbgl::MapChange /*change*/, std::chrono::steady_clock::duration /*delay*/) { // no-op } diff --git a/platform/default/headless_view.cpp b/platform/default/headless_view.cpp index 148ff12a0c..9df58f8026 100644 --- a/platform/default/headless_view.cpp +++ b/platform/default/headless_view.cpp @@ -244,7 +244,7 @@ void HeadlessView::notify() { // no-op } -void HeadlessView::notifyMapChange(mbgl::MapChange /*change*/, mbgl::timestamp /*delay*/) { +void HeadlessView::notifyMapChange(mbgl::MapChange /*change*/, std::chrono::steady_clock::duration /*delay*/) { // no-op } |