From 17f14f518e9d0b80d6734c9f1b4ee18558b6b6ce Mon Sep 17 00:00:00 2001 From: SlavicPotato Date: Sat, 5 Sep 2020 15:58:16 +0200 Subject: [PATCH] Fix arithmetic performed on void * Removed unnecessary cast --- include/reactphysics3d/containers/Array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/reactphysics3d/containers/Array.h b/include/reactphysics3d/containers/Array.h index b48c8717..6b450256 100755 --- a/include/reactphysics3d/containers/Array.h +++ b/include/reactphysics3d/containers/Array.h @@ -364,8 +364,8 @@ class Array { // Move the elements to fill in the empty slot void* dest = reinterpret_cast(mBuffer + index); - void* src = dest + sizeof(T); - std::memmove(static_cast(dest), static_cast(src), (mSize - index) * sizeof(T)); + std::uintptr_t src = reinterpret_cast(dest) + sizeof(T); + std::memmove(dest, reinterpret_cast(src), (mSize - index) * sizeof(T)); } // Return an iterator pointing to the element after the removed one