diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2012-08-29 23:19:09 -0700 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2012-08-29 23:48:58 -0700 |
commit | 38833205e4011a8a318b8dc6809621a89ad9f446 (patch) | |
tree | eb1c8c8a4b9b6a9718b87df5cf13832ba0fecf68 /includes/Threads.h | |
parent | 3f1b0920d697afff0f3e938cb7eca0aacfd75a91 (diff) |
Using true C++11 initializers in classes.
Diffstat (limited to 'includes/Threads.h')
-rw-r--r-- | includes/Threads.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/Threads.h b/includes/Threads.h index 46ea365..13527d5 100644 --- a/includes/Threads.h +++ b/includes/Threads.h @@ -98,7 +98,7 @@ class GlobalThread : public Thread, public AtStart, public AtExit { template<class T> class Queue { public: - Queue() : m_front(NULL), m_back(NULL) { pthread_cond_init(&m_cond, NULL); } + Queue() { pthread_cond_init(&m_cond, NULL); } ~Queue() { while (!isEmpty()) pop(); pthread_cond_destroy(&m_cond); } void push(T * t) { ScopeLock sl(m_lock); @@ -142,8 +142,8 @@ class Queue { Cell * m_next, * m_prev; T * m_elem; }; - Cell * volatile m_front; - Cell * volatile m_back; + Cell * volatile m_front = NULL; + Cell * volatile m_back = NULL; pthread_cond_t m_cond; }; |