X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fserialize.h;h=bdcd830591d570dbde8aacb9d4ab8312b0cc406f;hb=9e58e0a8ca28b15a4bfa677f5b23891972db40fd;hp=8305dd079eae3750a5432b365fde5555a2989631;hpb=15e9a03687e99d6b1a7a90e56e69a37faa6bb9b8;p=novacoin.git diff --git a/src/serialize.h b/src/serialize.h index 8305dd0..bdcd830 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -270,7 +270,7 @@ template inline unsigned int GetSizeOfVarInt(I n) { int nRet = 0; - while(true) { + for ( ; ; ) { nRet++; if (n <= 0x7F) break; @@ -284,7 +284,7 @@ void WriteVarInt(Stream& os, I n) { unsigned char tmp[(sizeof(n)*8+6)/7]; int len=0; - while(true) { + for ( ; ; ) { tmp[len] = (n & 0x7F) | (len ? 0x80 : 0x00); if (n <= 0x7F) break; @@ -300,7 +300,7 @@ template I ReadVarInt(Stream& is) { I n = 0; - while(true) { + for ( ; ; ) { unsigned char chData; READDATA(is, chData); n = (n << 7) | (chData & 0x7F);