From 05e3905742ba8c3afd32f4574d4a3c4040dfe839 Mon Sep 17 00:00:00 2001 From: xyz1001 Date: Fri, 8 Sep 2023 19:55:55 +0800 Subject: [PATCH] format the code --- public/common/TracySystem.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/public/common/TracySystem.cpp b/public/common/TracySystem.cpp index 0d79ad30..15e25adb 100644 --- a/public/common/TracySystem.cpp +++ b/public/common/TracySystem.cpp @@ -213,24 +213,24 @@ TRACY_API const char* GetThreadName( uint32_t id ) # else static auto _GetThreadDescription = (t_GetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetThreadDescription" ); # endif - if( _GetThreadDescription ) - { - auto hnd = OpenThread( THREAD_QUERY_LIMITED_INFORMATION, FALSE, (DWORD)id ); - if( hnd != 0 ) - { - PWSTR tmp; - if ( SUCCEEDED( _GetThreadDescription( hnd, &tmp ) ) ) - { - auto ret = wcstombs( buf, tmp, 256 ); - CloseHandle( hnd ); - LocalFree( tmp ); - if( ret != static_cast(-1) ) + if( _GetThreadDescription ) + { + auto hnd = OpenThread( THREAD_QUERY_LIMITED_INFORMATION, FALSE, (DWORD)id ); + if( hnd != 0 ) + { + PWSTR tmp; + if ( SUCCEEDED( _GetThreadDescription( hnd, &tmp ) ) ) { - return buf; + auto ret = wcstombs( buf, tmp, 256 ); + CloseHandle( hnd ); + LocalFree( tmp ); + if( ret != static_cast( -1 ) ) + { + return buf; + } } - } - } - } + } + } #elif defined __linux__ int cs, fd; char path[32];