summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-06-17 19:06:45 +0200
committerMax Kellermann <max@duempel.org>2016-06-17 19:11:19 +0200
commitfea3f6cc72089ca5736e74450bb5ff51581ec146 (patch)
treeb1c0b3b66ba25733c28d5f97225078d5c653b9cd /src
parentaee5966e1c59d6793d6999ae9452c95cd0af60ee (diff)
thread/Thread: use C++11 initialisers
Diffstat (limited to 'src')
-rw-r--r--src/thread/Thread.hxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/thread/Thread.hxx b/src/thread/Thread.hxx
index 5d76ab9e2..a276b4f3c 100644
--- a/src/thread/Thread.hxx
+++ b/src/thread/Thread.hxx
@@ -35,11 +35,11 @@ class Error;
class Thread {
#ifdef WIN32
- HANDLE handle;
+ HANDLE handle = nullptr;
DWORD id;
#else
pthread_t handle;
- bool defined;
+ bool defined = false;
#ifndef NDEBUG
/**
@@ -47,7 +47,7 @@ class Thread {
* IsInside(), which may return false until pthread_create() has
* initialised the #handle.
*/
- bool creating;
+ bool creating = false;
#endif
#endif
@@ -55,15 +55,7 @@ class Thread {
void *ctx;
public:
-#ifdef WIN32
- Thread():handle(nullptr) {}
-#else
- Thread():defined(false) {
-#ifndef NDEBUG
- creating = false;
-#endif
- }
-#endif
+ Thread() = default;
Thread(const Thread &) = delete;