diff options
| author | 2020-11-03 15:07:08 -0500 | |
|---|---|---|
| committer | 2020-11-03 15:07:13 -0500 | |
| commit | ee21b5378ba87dafc6e4d84a19a94b53e71aeee2 (patch) | |
| tree | 92fcd66f2ea754f40d7e5f1cc3238dc6470fe2fd /externals/microprofile/microprofile.h | |
| parent | Merge pull request #4873 from lioncash/common-error (diff) | |
| download | yuzu-ee21b5378ba87dafc6e4d84a19a94b53e71aeee2.tar.gz yuzu-ee21b5378ba87dafc6e4d84a19a94b53e71aeee2.tar.xz yuzu-ee21b5378ba87dafc6e4d84a19a94b53e71aeee2.zip | |
microprofile: Silence warning in headers
Silences a truncation warning by making the truncation explicit and
documenting the reason for it.
Diffstat (limited to 'externals/microprofile/microprofile.h')
| -rw-r--r-- | externals/microprofile/microprofile.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/externals/microprofile/microprofile.h b/externals/microprofile/microprofile.h index 5c381f002..a06f6457d 100644 --- a/externals/microprofile/microprofile.h +++ b/externals/microprofile/microprofile.h | |||
| @@ -948,7 +948,11 @@ typedef HANDLE MicroProfileThread; | |||
| 948 | DWORD _stdcall ThreadTrampoline(void* pFunc) | 948 | DWORD _stdcall ThreadTrampoline(void* pFunc) |
| 949 | { | 949 | { |
| 950 | MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc; | 950 | MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc; |
| 951 | return (DWORD)F(0); | 951 | |
| 952 | // The return value of F will always return a void*, however, this is for | ||
| 953 | // compatibility with pthreads. The underlying "address" of the pointer | ||
| 954 | // is always a 32-bit value, so this cast is safe to perform. | ||
| 955 | return static_cast<DWORD>(reinterpret_cast<uint64_t>(F(0))); | ||
| 952 | } | 956 | } |
| 953 | 957 | ||
| 954 | inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) | 958 | inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) |