|
26 | 26 | *
|
27 | 27 | *=========================================================================*/
|
28 | 28 | #include "itkPlatformMultiThreader.h"
|
29 |
| -#include "itkBitCast.h" |
30 | 29 | #include "itkObjectFactory.h"
|
31 | 30 | #include "itksys/SystemTools.hxx"
|
32 | 31 | #include <cstdlib>
|
@@ -72,7 +71,7 @@ PlatformMultiThreader::MultipleMethodExecute()
|
72 | 71 | m_ThreadInfoArray[threadCount].UserData = m_MultipleData[threadCount];
|
73 | 72 | m_ThreadInfoArray[threadCount].NumberOfWorkUnits = m_NumberOfWorkUnits;
|
74 | 73 |
|
75 |
| - processId[threadCount] = bit_cast<HANDLE>(_beginthreadex( |
| 74 | + processId[threadCount] = reinterpret_cast<HANDLE>(_beginthreadex( |
76 | 75 | nullptr, 0, m_MultipleMethod[threadCount], &m_ThreadInfoArray[threadCount], 0, (unsigned int *)&threadId));
|
77 | 76 |
|
78 | 77 | if (processId[threadCount] == nullptr)
|
@@ -137,8 +136,8 @@ PlatformMultiThreader::SpawnThread(ThreadFunctionType f, void * UserData)
|
137 | 136 |
|
138 | 137 | // Using _beginthreadex on a PC
|
139 | 138 | //
|
140 |
| - m_SpawnedThreadProcessID[id] = |
141 |
| - bit_cast<HANDLE>(_beginthreadex(nullptr, 0, f, &m_SpawnedThreadInfoArray[id], 0, (unsigned int *)&threadId)); |
| 139 | + m_SpawnedThreadProcessID[id] = reinterpret_cast<HANDLE>( |
| 140 | + _beginthreadex(nullptr, 0, f, &m_SpawnedThreadInfoArray[id], 0, (unsigned int *)&threadId)); |
142 | 141 | if (m_SpawnedThreadProcessID[id] == nullptr)
|
143 | 142 | {
|
144 | 143 | itkExceptionMacro("Error in thread creation !!!");
|
@@ -177,8 +176,8 @@ PlatformMultiThreader::SpawnDispatchSingleMethodThread(PlatformMultiThreader::Wo
|
177 | 176 | {
|
178 | 177 | // Using _beginthreadex on a PC
|
179 | 178 | DWORD threadId;
|
180 |
| - auto threadHandle = |
181 |
| - bit_cast<HANDLE>(_beginthreadex(nullptr, 0, this->SingleMethodProxy, threadInfo, 0, (unsigned int *)&threadId)); |
| 179 | + auto threadHandle = reinterpret_cast<HANDLE>( |
| 180 | + _beginthreadex(nullptr, 0, this->SingleMethodProxy, threadInfo, 0, (unsigned int *)&threadId)); |
182 | 181 | if (threadHandle == nullptr)
|
183 | 182 | {
|
184 | 183 | itkExceptionMacro("Error in thread creation !!!");
|
|
0 commit comments