diff options
author | bunnei <bunneidev@gmail.com> | 2020-11-03 22:41:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 22:41:29 +0100 |
commit | 46fdc94586145cdfcf4814f637380c75cb275e31 (patch) | |
tree | 92fcd66f2ea754f40d7e5f1cc3238dc6470fe2fd | |
parent | Merge pull request #4873 from lioncash/common-error (diff) | |
parent | microprofile: Silence warning in headers (diff) | |
download | yuzu-46fdc94586145cdfcf4814f637380c75cb275e31.tar yuzu-46fdc94586145cdfcf4814f637380c75cb275e31.tar.gz yuzu-46fdc94586145cdfcf4814f637380c75cb275e31.tar.bz2 yuzu-46fdc94586145cdfcf4814f637380c75cb275e31.tar.lz yuzu-46fdc94586145cdfcf4814f637380c75cb275e31.tar.xz yuzu-46fdc94586145cdfcf4814f637380c75cb275e31.tar.zst yuzu-46fdc94586145cdfcf4814f637380c75cb275e31.zip |
-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; DWORD _stdcall ThreadTrampoline(void* pFunc) { MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc; - return (DWORD)F(0); + + // The return value of F will always return a void*, however, this is for + // compatibility with pthreads. The underlying "address" of the pointer + // is always a 32-bit value, so this cast is safe to perform. + return static_cast<DWORD>(reinterpret_cast<uint64_t>(F(0))); } inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) |