瀏覽代碼

move to initializer list for runtimethreaddata

Derek Morris 7 年之前
父節點
當前提交
b46397cf6d
共有 1 個文件被更改,包括 9 次插入14 次删除
  1. 9 14
      bin/ch/RuntimeThreadData.cpp

+ 9 - 14
bin/ch/RuntimeThreadData.cpp

@@ -20,26 +20,21 @@ RuntimeThreadLocalData& GetRuntimeThreadLocalData()
     return threadLocalData;
 }
 
-RuntimeThreadData::RuntimeThreadData()
+RuntimeThreadData::RuntimeThreadData() :
+    hSemaphore(nullptr), 
+    hThread(nullptr),
+    sharedContent(nullptr),
+    receiveBroadcastCallbackFunc(nullptr),
+    runtime(nullptr),
+    context(nullptr),
+    parent(nullptr),
+    leaving(false)
 {
     this->hevntInitialScriptCompleted = CreateEvent(NULL, TRUE, FALSE, NULL);
     this->hevntReceivedBroadcast = CreateEvent(NULL, FALSE, FALSE, NULL);
     this->hevntShutdown = CreateEvent(NULL, TRUE, FALSE, NULL);
-    this->hSemaphore = nullptr;
-    this->hThread = nullptr;
-
-    this->sharedContent = nullptr;
-    this->receiveBroadcastCallbackFunc = nullptr;
-
-    this->runtime = nullptr;
-    this->context = nullptr;
-
-    this->parent = nullptr;
-
-    this->leaving = false;
 
     InitializeCriticalSection(&csReportQ);
-
 }
 
 RuntimeThreadData::~RuntimeThreadData()