Fix arithmetic performed on void *

Removed unnecessary cast
This commit is contained in:
SlavicPotato 2020-09-05 15:58:16 +02:00
parent cd4bc7573f
commit 17f14f518e

View File

@ -364,8 +364,8 @@ class Array {
// Move the elements to fill in the empty slot // Move the elements to fill in the empty slot
void* dest = reinterpret_cast<void*>(mBuffer + index); void* dest = reinterpret_cast<void*>(mBuffer + index);
void* src = dest + sizeof(T); std::uintptr_t src = reinterpret_cast<std::uintptr_t>(dest) + sizeof(T);
std::memmove(static_cast<void*>(dest), static_cast<void*>(src), (mSize - index) * sizeof(T)); std::memmove(dest, reinterpret_cast<const void*>(src), (mSize - index) * sizeof(T));
} }
// Return an iterator pointing to the element after the removed one // Return an iterator pointing to the element after the removed one