Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning: Cast thread id to uint32_t #727

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

idbrii
Copy link
Contributor

@idbrii idbrii commented Feb 17, 2024

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.

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

We only store 32 bit thread ids in ThreadNameData.

Trying to follow existing style instead of static_cast.
@wolfpld wolfpld merged commit a2dd51a into wolfpld:master Feb 17, 2024
5 checks passed
@idbrii idbrii deleted the fix-warn-conversion branch February 20, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants