summaryrefslogtreecommitdiffstats
path: root/src/ByteBuffer.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-05-02 09:50:36 +0200
committerGitHub <noreply@github.com>2018-05-02 09:50:36 +0200
commita4dbb5c58270959884c17d720185da06464fa256 (patch)
tree2b4e81410e90e059f51726e6c9a01c03fcbfb98d /src/ByteBuffer.cpp
parenttolua++ bindings use nullptr. (#4219) (diff)
downloadcuberite-a4dbb5c58270959884c17d720185da06464fa256.tar
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.gz
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.bz2
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.lz
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.xz
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.zst
cuberite-a4dbb5c58270959884c17d720185da06464fa256.zip
Diffstat (limited to 'src/ByteBuffer.cpp')
-rw-r--r--src/ByteBuffer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp
index 5b4cdb745..2fecc7817 100644
--- a/src/ByteBuffer.cpp
+++ b/src/ByteBuffer.cpp
@@ -126,7 +126,7 @@ bool cByteBuffer::Write(const void * a_Bytes, size_t a_Count)
}
ASSERT(m_BufferSize >= m_WritePos);
size_t TillEnd = m_BufferSize - m_WritePos;
- const char * Bytes = reinterpret_cast<const char *>(a_Bytes);
+ const char * Bytes = static_cast<const char *>(a_Bytes);
if (TillEnd <= a_Count)
{
// Need to wrap around the ringbuffer end
@@ -739,7 +739,7 @@ bool cByteBuffer::ReadBuf(void * a_Buffer, size_t a_Count)
CHECK_THREAD
CheckValid();
NEEDBYTES(a_Count);
- char * Dst = reinterpret_cast<char *>(a_Buffer); // So that we can do byte math
+ char * Dst = static_cast<char *>(a_Buffer); // So that we can do byte math
ASSERT(m_BufferSize >= m_ReadPos);
size_t BytesToEndOfBuffer = m_BufferSize - m_ReadPos;
if (BytesToEndOfBuffer <= a_Count)
@@ -772,7 +772,7 @@ bool cByteBuffer::WriteBuf(const void * a_Buffer, size_t a_Count)
CHECK_THREAD
CheckValid();
PUTBYTES(a_Count);
- char * Src = reinterpret_cast<char *>(const_cast<void*>(a_Buffer)); // So that we can do byte math
+ const char * Src = static_cast<const char *>(a_Buffer); // So that we can do byte math
ASSERT(m_BufferSize >= m_ReadPos);
size_t BytesToEndOfBuffer = m_BufferSize - m_WritePos;
if (BytesToEndOfBuffer <= a_Count)