Skip to content

Commit 159096d

Browse files
committed
Use c++ style casts
1 parent 632088f commit 159096d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/hx/thread/ThreadImpl.win32.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ String hx::thread::ThreadImpl_obj::getName()
1111
hx::EnterGCFreeZone();
1212

1313
auto buffer = PWSTR{ nullptr };
14-
auto result = GetThreadDescription((void*)native->handle, &buffer);
14+
auto result = GetThreadDescription(reinterpret_cast<void*>(native->handle), &buffer);
1515
if (FAILED(result))
1616
{
1717
_com_error error(result);
@@ -36,7 +36,7 @@ void hx::thread::ThreadImpl_obj::setName(const String& name)
3636
hx::strbuf buffer;
3737
hx::EnterGCFreeZone();
3838

39-
auto result = SetThreadDescription((void*)native->handle, name.wchar_str(&buffer));
39+
auto result = SetThreadDescription(reinterpret_cast<void*>(native->handle), name.wchar_str(&buffer));
4040
if (FAILED(result))
4141
{
4242
_com_error error(result);
@@ -52,4 +52,4 @@ void hx::thread::ThreadImpl_obj::setName(const String& name)
5252
}
5353
}
5454

55-
hx::thread::ThreadImpl_obj::Native::Native() : thread(), handle((std::thread::native_handle_type)GetCurrentThread()) {}
55+
hx::thread::ThreadImpl_obj::Native::Native() : thread(), handle(reinterpret_cast<std::thread::native_handle_type>(GetCurrentThread())) {}

0 commit comments

Comments
 (0)