wolfpld / tracy

Frame profiler
https://tracy.nereid.pl/
Other
8.64k stars 595 forks source link

Fix warning: Cast thread id to uint32_t #727

Closed idbrii closed 4 months ago

idbrii commented 4 months ago

Fix MSVC Warning C4244: 'argument': conversion from 'uint64_t' to 'uint32_t', possible loss of data

Since public\client\TracyProfiler.cpp is included in client code, it'd be nice to clean up this warning. It's the only warning I saw compiling v0.10 with VS2022.

We only store 32 bit thread ids in ThreadNameData. Looks like Windows threadids (DWORD) and Linux process ids (pid_t) are 32 bits so it seems fine.

Trying to follow existing style instead of static_cast.