From edd0b5c8c7626634524f0288947d4425002f0d16 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 1 May 2018 12:34:53 -0400 Subject: [PATCH] a32_interface/a64_interface: Change reinterpret_casts to static_casts in GetCurrentBlock thunks It's well-defined to static_cast a void* to its proper type. --- src/backend_x64/a32_interface.cpp | 4 ++-- src/backend_x64/a64_interface.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend_x64/a32_interface.cpp b/src/backend_x64/a32_interface.cpp index cb03f8c7..7cf2503e 100644 --- a/src/backend_x64/a32_interface.cpp +++ b/src/backend_x64/a32_interface.cpp @@ -107,8 +107,8 @@ struct Jit::Impl { private: Jit* jit_interface; - static CodePtr GetCurrentBlock(void *this_voidptr) { - Jit::Impl& this_ = *reinterpret_cast(this_voidptr); + static CodePtr GetCurrentBlock(void* this_voidptr) { + Jit::Impl& this_ = *static_cast(this_voidptr); A32JitState& jit_state = this_.jit_state; u32 pc = jit_state.Reg[15]; diff --git a/src/backend_x64/a64_interface.cpp b/src/backend_x64/a64_interface.cpp index 0a464cac..8e3f88c1 100644 --- a/src/backend_x64/a64_interface.cpp +++ b/src/backend_x64/a64_interface.cpp @@ -177,7 +177,7 @@ public: private: static CodePtr GetCurrentBlockThunk(void* thisptr) { - Jit::Impl* this_ = reinterpret_cast(thisptr); + Jit::Impl* this_ = static_cast(thisptr); return this_->GetCurrentBlock(); }