diff options
author | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-22 15:19:29 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-12-31 09:16:41 +0100 |
commit | c83dfdb66e096f16805d0a842e0492645dc086c2 (patch) | |
tree | 25fd79bd1e5a767452a15847a225c2bc124a9e67 /src/ByteBuffer.cpp | |
parent | fixed ClientHandle warnings (diff) | |
download | cuberite-c83dfdb66e096f16805d0a842e0492645dc086c2.tar cuberite-c83dfdb66e096f16805d0a842e0492645dc086c2.tar.gz cuberite-c83dfdb66e096f16805d0a842e0492645dc086c2.tar.bz2 cuberite-c83dfdb66e096f16805d0a842e0492645dc086c2.tar.lz cuberite-c83dfdb66e096f16805d0a842e0492645dc086c2.tar.xz cuberite-c83dfdb66e096f16805d0a842e0492645dc086c2.tar.zst cuberite-c83dfdb66e096f16805d0a842e0492645dc086c2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ByteBuffer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp index 64c03d0d3..510018005 100644 --- a/src/ByteBuffer.cpp +++ b/src/ByteBuffer.cpp @@ -773,7 +773,7 @@ void cByteBuffer::ReadAll(AString & a_Data) -bool cByteBuffer::ReadToByteBuffer(cByteBuffer & a_Dst, int a_NumBytes) +bool cByteBuffer::ReadToByteBuffer(cByteBuffer & a_Dst, size_t a_NumBytes) { if (!a_Dst.CanWriteBytes(a_NumBytes) || !CanReadBytes(a_NumBytes)) { @@ -781,9 +781,9 @@ bool cByteBuffer::ReadToByteBuffer(cByteBuffer & a_Dst, int a_NumBytes) return false; } char buf[1024]; - while (a_NumBytes > 0) + while (a_NumBytes > static_cast<size_t>(0)) { - int num = (a_NumBytes > sizeof(buf)) ? sizeof(buf) : a_NumBytes; + size_t num = (a_NumBytes > sizeof(buf)) ? sizeof(buf) : a_NumBytes; VERIFY(ReadBuf(buf, num)); VERIFY(a_Dst.Write(buf, num)); a_NumBytes -= num; |