Skip to content

Commit

Permalink
Merge pull request #150 from tkalbitz/patch-1
Browse files Browse the repository at this point in the history
Fix warning: Use nullptr instead 0 as pointer value.
  • Loading branch information
yse authored Mar 4, 2019
2 parents bbebd4f + 017ef6a commit e68abb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions easy_profiler_core/include/easy/profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ will end previously opened EASY_BLOCK or EASY_FUNCTION.
\ingroup profiler
*/
# define EASY_THREAD(name)\
EASY_THREAD_LOCAL static const char* EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = 0;\
EASY_THREAD_LOCAL static const char* EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = nullptr;\
if (!EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__))\
EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = ::profiler::registerThread(name);

Expand All @@ -245,7 +245,7 @@ and creates "ThreadFinished" profiler event.
\ingroup profiler
*/
# define EASY_THREAD_SCOPE(name)\
static EASY_THREAD_LOCAL const char* EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = 0;\
static EASY_THREAD_LOCAL const char* EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = nullptr;\
::profiler::ThreadGuard EASY_TOKEN_CONCATENATE(unique_profiler_thread_guard, __LINE__);\
if (!EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__))\
EASY_TOKEN_CONCATENATE(unique_profiler_thread_name, __LINE__) = ::profiler::registerThreadScoped(name,\
Expand Down

0 comments on commit e68abb2

Please sign in to comment.