Skip to content

Commit b46397c

Browse files
move to initializer list for runtimethreaddata
1 parent 024bf5c commit b46397c

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

bin/ch/RuntimeThreadData.cpp

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,21 @@ RuntimeThreadLocalData& GetRuntimeThreadLocalData()
2020
return threadLocalData;
2121
}
2222

23-
RuntimeThreadData::RuntimeThreadData()
23+
RuntimeThreadData::RuntimeThreadData() :
24+
hSemaphore(nullptr),
25+
hThread(nullptr),
26+
sharedContent(nullptr),
27+
receiveBroadcastCallbackFunc(nullptr),
28+
runtime(nullptr),
29+
context(nullptr),
30+
parent(nullptr),
31+
leaving(false)
2432
{
2533
this->hevntInitialScriptCompleted = CreateEvent(NULL, TRUE, FALSE, NULL);
2634
this->hevntReceivedBroadcast = CreateEvent(NULL, FALSE, FALSE, NULL);
2735
this->hevntShutdown = CreateEvent(NULL, TRUE, FALSE, NULL);
28-
this->hSemaphore = nullptr;
29-
this->hThread = nullptr;
30-
31-
this->sharedContent = nullptr;
32-
this->receiveBroadcastCallbackFunc = nullptr;
33-
34-
this->runtime = nullptr;
35-
this->context = nullptr;
36-
37-
this->parent = nullptr;
38-
39-
this->leaving = false;
4036

4137
InitializeCriticalSection(&csReportQ);
42-
4338
}
4439

4540
RuntimeThreadData::~RuntimeThreadData()

0 commit comments

Comments
 (0)