MCPcopy Create free account
hub / github.com/AmelieHeinrich/Termina / if

Function if

Sources/ThirdParty/Jolt/Core/JobSystemThreadPool.cpp:273–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Calls

no outgoing calls

Tested by

no test coverage detected