diff options
author | Brad Leege <bleege@gmail.com> | 2016-06-09 14:00:49 -0500 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2016-06-09 14:00:49 -0500 |
commit | d67b88dba94a5e50eabaa8c133bb66fc3da8ee6f (patch) | |
tree | 29a5bef10a72aff72efdf7d92b0ab30fdf94684e /include/mbgl | |
parent | c3cbe67c018a2431140babf2b8ba4c403e5e429f (diff) | |
parent | c9d78f3f62fe02314bcc2d2a9dcef8d323b6e161 (diff) | |
download | qtlocation-mapboxgl-d67b88dba94a5e50eabaa8c133bb66fc3da8ee6f.tar.gz |
Merge branch 'release-android-v4.1.0'
# Conflicts:
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerViewManager.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
# platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java
# platform/android/src/jni.cpp
# src/mbgl/geometry/buffer.hpp
# src/mbgl/geometry/glyph_atlas.cpp
# src/mbgl/geometry/glyph_atlas.hpp
# src/mbgl/geometry/line_atlas.cpp
# src/mbgl/geometry/vao.cpp
# src/mbgl/gl/gl_object_store.cpp
# src/mbgl/gl/gl_object_store.hpp
# src/mbgl/renderer/frame_history.cpp
# src/mbgl/shader/shader.cpp
# src/mbgl/sprite/sprite_atlas.cpp
# src/mbgl/sprite/sprite_atlas.hpp
# src/mbgl/text/glyph_pbf.hpp
Diffstat (limited to 'include/mbgl')
-rw-r--r-- | include/mbgl/storage/network_status.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/util/run_loop.hpp | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/include/mbgl/storage/network_status.hpp b/include/mbgl/storage/network_status.hpp index d7f502a3b2..1b5471a44e 100644 --- a/include/mbgl/storage/network_status.hpp +++ b/include/mbgl/storage/network_status.hpp @@ -1,6 +1,7 @@ #pragma once -#include <atomic> +#include <mbgl/util/atomic.hpp> + #include <mutex> #include <set> @@ -26,7 +27,7 @@ public: static void Unsubscribe(util::AsyncTask* async); private: - static std::atomic<bool> online; + static util::Atomic<bool> online; static std::mutex mtx; static std::set<util::AsyncTask*> observers; }; diff --git a/include/mbgl/util/run_loop.hpp b/include/mbgl/util/run_loop.hpp index 9703fe7bcb..56965c97e6 100644 --- a/include/mbgl/util/run_loop.hpp +++ b/include/mbgl/util/run_loop.hpp @@ -1,5 +1,6 @@ #pragma once +#include <mbgl/util/atomic.hpp> #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/util.hpp> #include <mbgl/util/work_task.hpp> @@ -9,7 +10,6 @@ #include <utility> #include <queue> #include <mutex> -#include <atomic> namespace mbgl { namespace util { @@ -59,7 +59,7 @@ public: template <class Fn, class... Args> std::unique_ptr<AsyncRequest> invokeCancellable(Fn&& fn, Args&&... args) { - auto flag = std::make_shared<std::atomic<bool>>(); + auto flag = std::make_shared<util::Atomic<bool>>(); *flag = false; auto tuple = std::make_tuple(std::move(args)...); @@ -77,7 +77,7 @@ public: template <class Fn, class Cb, class... Args> std::unique_ptr<AsyncRequest> invokeWithCallback(Fn&& fn, Cb&& callback, Args&&... args) { - auto flag = std::make_shared<std::atomic<bool>>(); + auto flag = std::make_shared<util::Atomic<bool>>(); *flag = false; // Create a lambda L1 that invokes another lambda L2 on the current RunLoop R, that calls @@ -114,7 +114,7 @@ private: template <class F, class P> class Invoker : public WorkTask { public: - Invoker(F&& f, P&& p, std::shared_ptr<std::atomic<bool>> canceled_ = nullptr) + Invoker(F&& f, P&& p, std::shared_ptr<util::Atomic<bool>> canceled_ = nullptr) : canceled(std::move(canceled_)), func(std::move(f)), params(std::move(p)) { @@ -148,7 +148,7 @@ private: } std::recursive_mutex mutex; - std::shared_ptr<std::atomic<bool>> canceled; + std::shared_ptr<util::Atomic<bool>> canceled; F func; P params; |