From 4a5e8ad343079f6552fab639770e5771ed7c4e7a Mon Sep 17 00:00:00 2001 From: Vincent Glize Date: Mon, 19 Jun 2017 23:54:58 +0200 Subject: C++11 cleanup on constructors (#6000) * C++11 cleanup on constructors dir script --- src/threading/thread.cpp | 6 ++---- src/threading/thread.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/threading') diff --git a/src/threading/thread.cpp b/src/threading/thread.cpp index cc4d65656..8f54fb762 100644 --- a/src/threading/thread.cpp +++ b/src/threading/thread.cpp @@ -60,8 +60,6 @@ DEALINGS IN THE SOFTWARE. Thread::Thread(const std::string &name) : m_name(name), - m_retval(NULL), - m_joinable(false), m_request_stop(false), m_running(false) { @@ -130,7 +128,7 @@ bool Thread::wait() m_thread_obj->join(); delete m_thread_obj; - m_thread_obj = NULL; + m_thread_obj = nullptr; assert(m_running == false); m_joinable = false; @@ -162,7 +160,7 @@ bool Thread::kill() wait(); #endif - m_retval = NULL; + m_retval = nullptr; m_joinable = false; m_request_stop = false; diff --git a/src/threading/thread.h b/src/threading/thread.h index 284c8e46c..dab5d0ec7 100644 --- a/src/threading/thread.h +++ b/src/threading/thread.h @@ -145,8 +145,8 @@ private: static void threadProc(Thread *thr); - void *m_retval; - bool m_joinable; + void *m_retval = nullptr; + bool m_joinable = false; std::atomic m_request_stop; std::atomic m_running; std::mutex m_mutex; -- cgit v1.2.3