summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-05-10 19:17:34 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-05-12 18:07:36 +0300
commit6f993230f2a995b2c1718d577890da8cec1486bf (patch)
tree10e6b6311bf2a399f50a745388d1af936c0268b2
parentba3afd5ae00d9137bff11c13428be7f1a9afff3e (diff)
downloadqtlocation-mapboxgl-6f993230f2a995b2c1718d577890da8cec1486bf.tar.gz
[core] Make deleted members public
warning: deleted member function should be public [modernize-use-equals-delete]
-rw-r--r--include/mbgl/util/noncopyable.hpp6
-rw-r--r--src/mbgl/util/thread.hpp10
2 files changed, 9 insertions, 7 deletions
diff --git a/include/mbgl/util/noncopyable.hpp b/include/mbgl/util/noncopyable.hpp
index 105a76a9a0..5216b7b7e6 100644
--- a/include/mbgl/util/noncopyable.hpp
+++ b/include/mbgl/util/noncopyable.hpp
@@ -7,11 +7,13 @@ namespace non_copyable_
class noncopyable
{
+public:
+ noncopyable( noncopyable const& ) = delete;
+ noncopyable& operator=(noncopyable const& ) = delete;
+
protected:
constexpr noncopyable() = default;
~noncopyable() = default;
- noncopyable( noncopyable const& ) = delete;
- noncopyable& operator=(noncopyable const& ) = delete;
};
} // namespace non_copyable_
diff --git a/src/mbgl/util/thread.hpp b/src/mbgl/util/thread.hpp
index 184c6a8a12..4afaab6b7a 100644
--- a/src/mbgl/util/thread.hpp
+++ b/src/mbgl/util/thread.hpp
@@ -26,6 +26,11 @@ namespace util {
template <class Object>
class Thread {
public:
+ Thread(const Thread&) = delete;
+ Thread(Thread&&) = delete;
+ Thread& operator=(const Thread&) = delete;
+ Thread& operator=(Thread&&) = delete;
+
template <class... Args>
Thread(const ThreadContext&, Args&&... args);
~Thread();
@@ -91,11 +96,6 @@ public:
private:
MBGL_STORE_THREAD(tid);
- Thread(const Thread&) = delete;
- Thread(Thread&&) = delete;
- Thread& operator=(const Thread&) = delete;
- Thread& operator=(Thread&&) = delete;
-
template <typename Fn>
auto bind(Fn fn) {
return [fn, this] (auto &&... args) {