0
0
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:
Victor Zarubkin 2016-09-06 23:16:15 +03:00
parent 3699a07e41
commit 449610028a

View File

@ -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.