1
0
Fork 0

removed unneccisary cast

This commit is contained in:
Tycho Bickerstaff 2013-12-22 17:02:36 +00:00 committed by madmaxoft
parent 1957f982bc
commit c3e34ee81a
1 changed files with 2 additions and 1 deletions

View File

@ -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));