mirror of
https://github.com/yse/easy_profiler.git
synced 2025-01-14 00:27:55 +08:00
(profiler_core) Linux build: avoid gcc warning about unused variable
This commit is contained in:
parent
3699a07e41
commit
449610028a
@ -182,16 +182,10 @@ If this thread has been already named then nothing changes.
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
#ifdef EASY_THREAD_LOCAL_CPP11
|
||||
#define EASY_THREAD(name)\
|
||||
EASY_THREAD_LOCAL static const char* EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = \
|
||||
::profiler::setThreadName(name, __FILE__, __func__, __LINE__);
|
||||
#else
|
||||
#define EASY_THREAD(name)\
|
||||
EASY_THREAD_LOCAL static const char* EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = nullptr;\
|
||||
if (EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) == nullptr)\
|
||||
EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = ::profiler::setThreadName(name, __FILE__, __func__, __LINE__);
|
||||
#endif
|
||||
|
||||
/** Macro of naming main thread.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user