diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-07-13 17:55:21 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-07-13 17:56:51 +0300 |
commit | 389c7615eb70483b19f5917395f8cd505c08361b (patch) | |
tree | aac1cda5d551d440f9aa6435c59fc7aa51b2012b /include | |
parent | b9c273d19713f9712dc06c90364fc78224fac351 (diff) | |
download | qtlocation-mapboxgl-389c7615eb70483b19f5917395f8cd505c08361b.tar.gz |
[core] Revert workaround for std::atomic on ARMv5
Got fix on r12.
https://github.com/android-ndk/ndk/issues/31
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/storage/network_status.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/util/run_loop.hpp | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/include/mbgl/storage/network_status.hpp b/include/mbgl/storage/network_status.hpp index 1b5471a44e..d7f502a3b2 100644 --- a/include/mbgl/storage/network_status.hpp +++ b/include/mbgl/storage/network_status.hpp @@ -1,7 +1,6 @@ #pragma once -#include <mbgl/util/atomic.hpp> - +#include <atomic> #include <mutex> #include <set> @@ -27,7 +26,7 @@ public: static void Unsubscribe(util::AsyncTask* async); private: - static util::Atomic<bool> online; + static std::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 56965c97e6..25f07c0312 100644 --- a/include/mbgl/util/run_loop.hpp +++ b/include/mbgl/util/run_loop.hpp @@ -1,11 +1,11 @@ #pragma once -#include <mbgl/util/atomic.hpp> #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/util.hpp> #include <mbgl/util/work_task.hpp> #include <mbgl/util/work_request.hpp> +#include <atomic> #include <functional> #include <utility> #include <queue> @@ -59,7 +59,7 @@ public: template <class Fn, class... Args> std::unique_ptr<AsyncRequest> invokeCancellable(Fn&& fn, Args&&... args) { - auto flag = std::make_shared<util::Atomic<bool>>(); + auto flag = std::make_shared<std::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<util::Atomic<bool>>(); + auto flag = std::make_shared<std::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<util::Atomic<bool>> canceled_ = nullptr) + Invoker(F&& f, P&& p, std::shared_ptr<std::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<util::Atomic<bool>> canceled; + std::shared_ptr<std::atomic<bool>> canceled; F func; P params; |