X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fserialize.h;h=bdcd830591d570dbde8aacb9d4ab8312b0cc406f;hb=05df71c9c292877e7469884227fd3ba84d02908b;hp=0e2fa9db36b5e8fd532994020763fa408d6fe586;hpb=36ae30fa7f51df0b666a92a1f4efa0a53370ae3a;p=novacoin.git diff --git a/src/serialize.h b/src/serialize.h index 0e2fa9d..bdcd830 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -56,9 +56,9 @@ enum SER_DISK = (1 << 1), SER_GETHASH = (1 << 2), - // modifiers - SER_SKIPSIG = (1 << 16), - SER_BLOCKHEADERONLY = (1 << 17) + // modifiers + SER_SKIPSIG = (1 << 16), + SER_BLOCKHEADERONLY = (1 << 17) }; @@ -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);