diff --git a/src/athena/MemoryReader.cpp b/src/athena/MemoryReader.cpp index 9b60938..bdbd3df 100644 --- a/src/athena/MemoryReader.cpp +++ b/src/athena/MemoryReader.cpp @@ -21,7 +21,7 @@ MemoryReader::MemoryReader(const void* data, atUint64 length, bool takeOwnership MemoryReader::~MemoryReader() { if (m_owns) - delete[] reinterpret_cast(m_data); + delete[] static_cast(m_data); } MemoryCopyReader::MemoryCopyReader(const void* data, atUint64 length) : MemoryReader(data, length, false) { @@ -111,7 +111,7 @@ atUint64 MemoryReader::readUBytesToBuf(void* buf, atUint64 length) { } length = std::min(length, m_length - m_position); - memmove(buf, reinterpret_cast(m_data) + m_position, length); + memmove(buf, static_cast(m_data) + m_position, length); m_position += length; return length; } diff --git a/src/athena/MemoryWriter.cpp b/src/athena/MemoryWriter.cpp index a0be0e2..a825fd6 100644 --- a/src/athena/MemoryWriter.cpp +++ b/src/athena/MemoryWriter.cpp @@ -233,7 +233,7 @@ void MemoryWriter::writeUBytes(const atUint8* data, atUint64 length) { return; } - memmove(reinterpret_cast(m_data + m_position), data, length); + memmove(m_data + m_position, data, length); m_position += length; } @@ -248,7 +248,7 @@ void MemoryCopyWriter::writeUBytes(const atUint8* data, atUint64 length) { if (m_position + length > m_length) resize(m_position + length); - memmove(reinterpret_cast(m_data + m_position), data, length); + memmove(m_data + m_position, data, length); m_position += length; }