Skip to content

Commit 8a27e50

Browse files
committed
Reinterpret the thread pointer to a standard ptr integer type
Fixes an invalid conversion error on 32-bit platforms that don't support assigning pointers directly to integers.
1 parent 9016128 commit 8a27e50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

loguru.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ namespace loguru
11081108
long thread_id;
11091109
(void)thr_self(&thread_id);
11101110
#elif LOGURU_PTHREADS
1111-
uint64_t thread_id = pthread_self();
1111+
const auto thread_id = reinterpret_cast<uintptr_t>(pthread_self());
11121112
#else
11131113
// This ID does not correllate to anything we can get from the OS,
11141114
// so this is the worst way to get the ID.

0 commit comments

Comments
 (0)