From ff123f782060a4e955f5de9696cead92c32a8593 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 12 Apr 2020 13:28:09 -0400 Subject: [PATCH] General: Make use of static_cast within point generators The more restrictive static_cast is permissable when casting from void*. --- Runtime/Weapon/CGunWeapon.cpp | 2 +- Runtime/World/CMorphBall.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Weapon/CGunWeapon.cpp b/Runtime/Weapon/CGunWeapon.cpp index 1954fd08a..3baa52db1 100644 --- a/Runtime/Weapon/CGunWeapon.cpp +++ b/Runtime/Weapon/CGunWeapon.cpp @@ -256,7 +256,7 @@ void CGunWeapon::TouchHolo(const CStateManager& mgr) { } void CGunWeapon::PointGenerator(void* ctx, const std::vector>& vn) { - reinterpret_cast(ctx)->GeneratePoints(vn); + static_cast(ctx)->GeneratePoints(vn); } void CGunWeapon::Draw(bool drawSuitArm, const CStateManager& mgr, const zeus::CTransform& xf, const CModelFlags& flags, diff --git a/Runtime/World/CMorphBall.cpp b/Runtime/World/CMorphBall.cpp index cd04a5950..deca77d98 100644 --- a/Runtime/World/CMorphBall.cpp +++ b/Runtime/World/CMorphBall.cpp @@ -1539,7 +1539,7 @@ void CMorphBall::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) { } void CMorphBall::PointGenerator(void* ctx, const std::vector>& vn) { - reinterpret_cast(ctx)->GeneratePoints(vn); + static_cast(ctx)->GeneratePoints(vn); } void CMorphBall::Render(const CStateManager& mgr, const CActorLights* lights) const {