Skip to content

Commit b4d2245

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 8a0cc13 commit b4d2245

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
@@ -1109,7 +1109,7 @@ namespace loguru
11091109
long thread_id;
11101110
(void)thr_self(&thread_id);
11111111
#elif LOGURU_PTHREADS
1112-
uint64_t thread_id = pthread_self();
1112+
const auto thread_id = reinterpret_cast<uintptr_t>(pthread_self());
11131113
#else
11141114
// This ID does not correllate to anything we can get from the OS,
11151115
// so this is the worst way to get the ID.

0 commit comments

Comments
 (0)