| 271 | static SetThreadDescriptionFunc SetThreadDescription = reinterpret_cast<SetThreadDescriptionFunc>(GetProcAddress(GetModuleHandleW(L"Kernel32.dll"), "SetThreadDescription")); |
| 272 | |
| 273 | JPH_SUPPRESS_WARNING_POP |
| 274 | |
| 275 | if (SetThreadDescription) |
| 276 | { |
| 277 | wchar_t name_buffer[64] = { 0 }; |
| 278 | if (MultiByteToWideChar(CP_UTF8, 0, inName, -1, name_buffer, sizeof(name_buffer) / sizeof(wchar_t) - 1) == 0) |
| 279 | return; |
| 280 | |
| 281 | SetThreadDescription(GetCurrentThread(), name_buffer); |
| 282 | } |
| 283 | #if !defined(JPH_COMPILER_MINGW) |
| 284 | else if (IsDebuggerPresent()) |
| 285 | RaiseThreadNameException(inName); |
no outgoing calls
no test coverage detected