Merge "Fix google-explicit-constructor warnings in utils." am: 5b7e3b9a2a am: 4d031d6358
am: e1fff2572c
Change-Id: I5c75363a555fd31aa587ca7cb5905e928148a19f
This commit is contained in:
commit
d8ced2029b
8 changed files with 21 additions and 21 deletions
|
|
@ -54,7 +54,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
Condition();
|
Condition();
|
||||||
Condition(int type);
|
explicit Condition(int type);
|
||||||
~Condition();
|
~Condition();
|
||||||
// Wait on the condition variable. Lock the mutex before calling.
|
// Wait on the condition variable. Lock the mutex before calling.
|
||||||
status_t wait(Mutex& mutex);
|
status_t wait(Mutex& mutex);
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,8 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
Mutex();
|
Mutex();
|
||||||
Mutex(const char* name);
|
explicit Mutex(const char* name);
|
||||||
Mutex(int type, const char* name = NULL);
|
explicit Mutex(int type, const char* name = NULL);
|
||||||
~Mutex();
|
~Mutex();
|
||||||
|
|
||||||
// lock or unlock the mutex
|
// lock or unlock the mutex
|
||||||
|
|
@ -77,8 +77,8 @@ public:
|
||||||
// constructed and released when Autolock goes out of scope.
|
// constructed and released when Autolock goes out of scope.
|
||||||
class Autolock {
|
class Autolock {
|
||||||
public:
|
public:
|
||||||
inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); }
|
inline explicit Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); }
|
||||||
inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); }
|
inline explicit Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); }
|
||||||
inline ~Autolock() { mLock.unlock(); }
|
inline ~Autolock() { mLock.unlock(); }
|
||||||
private:
|
private:
|
||||||
Mutex& mLock;
|
Mutex& mLock;
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
RWLock();
|
RWLock();
|
||||||
RWLock(const char* name);
|
explicit RWLock(const char* name);
|
||||||
RWLock(int type, const char* name = NULL);
|
explicit RWLock(int type, const char* name = NULL);
|
||||||
~RWLock();
|
~RWLock();
|
||||||
|
|
||||||
status_t readLock();
|
status_t readLock();
|
||||||
|
|
@ -59,7 +59,7 @@ public:
|
||||||
|
|
||||||
class AutoRLock {
|
class AutoRLock {
|
||||||
public:
|
public:
|
||||||
inline AutoRLock(RWLock& rwlock) : mLock(rwlock) { mLock.readLock(); }
|
inline explicit AutoRLock(RWLock& rwlock) : mLock(rwlock) { mLock.readLock(); }
|
||||||
inline ~AutoRLock() { mLock.unlock(); }
|
inline ~AutoRLock() { mLock.unlock(); }
|
||||||
private:
|
private:
|
||||||
RWLock& mLock;
|
RWLock& mLock;
|
||||||
|
|
@ -67,7 +67,7 @@ public:
|
||||||
|
|
||||||
class AutoWLock {
|
class AutoWLock {
|
||||||
public:
|
public:
|
||||||
inline AutoWLock(RWLock& rwlock) : mLock(rwlock) { mLock.writeLock(); }
|
inline explicit AutoWLock(RWLock& rwlock) : mLock(rwlock) { mLock.writeLock(); }
|
||||||
inline ~AutoWLock() { mLock.unlock(); }
|
inline ~AutoWLock() { mLock.unlock(); }
|
||||||
private:
|
private:
|
||||||
RWLock& mLock;
|
RWLock& mLock;
|
||||||
|
|
|
||||||
|
|
@ -222,12 +222,12 @@ public:
|
||||||
|
|
||||||
inline wp() : m_ptr(0) { }
|
inline wp() : m_ptr(0) { }
|
||||||
|
|
||||||
wp(T* other);
|
wp(T* other); // NOLINT(implicit)
|
||||||
wp(const wp<T>& other);
|
wp(const wp<T>& other);
|
||||||
wp(const sp<T>& other);
|
explicit wp(const sp<T>& other);
|
||||||
template<typename U> wp(U* other);
|
template<typename U> wp(U* other); // NOLINT(implicit)
|
||||||
template<typename U> wp(const sp<U>& other);
|
template<typename U> wp(const sp<U>& other); // NOLINT(implicit)
|
||||||
template<typename U> wp(const wp<U>& other);
|
template<typename U> wp(const wp<U>& other); // NOLINT(implicit)
|
||||||
|
|
||||||
~wp();
|
~wp();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,12 @@ class sp {
|
||||||
public:
|
public:
|
||||||
inline sp() : m_ptr(0) { }
|
inline sp() : m_ptr(0) { }
|
||||||
|
|
||||||
sp(T* other);
|
sp(T* other); // NOLINT(implicit)
|
||||||
sp(const sp<T>& other);
|
sp(const sp<T>& other);
|
||||||
sp(sp<T>&& other);
|
sp(sp<T>&& other);
|
||||||
template<typename U> sp(U* other);
|
template<typename U> sp(U* other); // NOLINT(implicit)
|
||||||
template<typename U> sp(const sp<U>& other);
|
template<typename U> sp(const sp<U>& other); // NOLINT(implicit)
|
||||||
template<typename U> sp(sp<U>&& other);
|
template<typename U> sp(sp<U>&& other); // NOLINT(implicit)
|
||||||
|
|
||||||
~sp();
|
~sp();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class Thread : virtual public RefBase
|
||||||
public:
|
public:
|
||||||
// Create a Thread object, but doesn't create or start the associated
|
// Create a Thread object, but doesn't create or start the associated
|
||||||
// thread. See the run() method.
|
// thread. See the run() method.
|
||||||
Thread(bool canCallJava = true);
|
explicit Thread(bool canCallJava = true);
|
||||||
virtual ~Thread();
|
virtual ~Thread();
|
||||||
|
|
||||||
// Start the thread in threadLoop() which needs to be implemented.
|
// Start the thread in threadLoop() which needs to be implemented.
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ struct key_value_pair_t {
|
||||||
key_value_pair_t() { }
|
key_value_pair_t() { }
|
||||||
key_value_pair_t(const key_value_pair_t& o) : key(o.key), value(o.value) { }
|
key_value_pair_t(const key_value_pair_t& o) : key(o.key), value(o.value) { }
|
||||||
key_value_pair_t(const KEY& k, const VALUE& v) : key(k), value(v) { }
|
key_value_pair_t(const KEY& k, const VALUE& v) : key(k), value(v) { }
|
||||||
key_value_pair_t(const KEY& k) : key(k) { }
|
explicit key_value_pair_t(const KEY& k) : key(k) { }
|
||||||
inline bool operator < (const key_value_pair_t& o) const {
|
inline bool operator < (const key_value_pair_t& o) const {
|
||||||
return strictly_order_type(key, o.key);
|
return strictly_order_type(key, o.key);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ class SortedVectorImpl : public VectorImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SortedVectorImpl(size_t itemSize, uint32_t flags);
|
SortedVectorImpl(size_t itemSize, uint32_t flags);
|
||||||
SortedVectorImpl(const VectorImpl& rhs);
|
explicit SortedVectorImpl(const VectorImpl& rhs);
|
||||||
virtual ~SortedVectorImpl();
|
virtual ~SortedVectorImpl();
|
||||||
|
|
||||||
SortedVectorImpl& operator = (const SortedVectorImpl& rhs);
|
SortedVectorImpl& operator = (const SortedVectorImpl& rhs);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue