summaryrefslogtreecommitdiffstats
path: root/src/ByteBuffer.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-22 18:02:36 +0100
committermadmaxoft <github@xoft.cz>2013-12-31 09:16:44 +0100
commitc3e34ee81af71c70514d53f4e54e3a6c2ac5a976 (patch)
treeca7ff853865078fc6a30b0c39a94ffa1c2848dc8 /src/ByteBuffer.cpp
parentfixed warnings in LineBlockTracer.cpp (diff)
downloadcuberite-c3e34ee81af71c70514d53f4e54e3a6c2ac5a976.tar
cuberite-c3e34ee81af71c70514d53f4e54e3a6c2ac5a976.tar.gz
cuberite-c3e34ee81af71c70514d53f4e54e3a6c2ac5a976.tar.bz2
cuberite-c3e34ee81af71c70514d53f4e54e3a6c2ac5a976.tar.lz
cuberite-c3e34ee81af71c70514d53f4e54e3a6c2ac5a976.tar.xz
cuberite-c3e34ee81af71c70514d53f4e54e3a6c2ac5a976.tar.zst
cuberite-c3e34ee81af71c70514d53f4e54e3a6c2ac5a976.zip
Diffstat (limited to 'src/ByteBuffer.cpp')
-rw-r--r--src/ByteBuffer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp
index 510018005..e06f63a0e 100644
--- a/src/ByteBuffer.cpp
+++ b/src/ByteBuffer.cpp
@@ -781,7 +781,8 @@ bool cByteBuffer::ReadToByteBuffer(cByteBuffer & a_Dst, size_t a_NumBytes)
return false;
}
char buf[1024];
- while (a_NumBytes > static_cast<size_t>(0))
+ // > 0 without generating warnings about unsigned comparisons where size_t is unsigned
+ while (a_NumBytes != 0)
{
size_t num = (a_NumBytes > sizeof(buf)) ? sizeof(buf) : a_NumBytes;
VERIFY(ReadBuf(buf, num));