Fixed warning in swapBytes, simple addded unsigned to the int loop count,

since sizeof() is always an unsigned int.
This commit is contained in:
Robert Osfield
2002-04-23 08:29:39 +00:00
parent ecd2c73c55
commit ac7af8eee5

View File

@@ -30,7 +30,7 @@ inline void swapBytes( T &s )
BytePtr sptr = (BytePtr)&s;
BytePtr dptr = &(((BytePtr)&d)[sizeof(T)-1]);
for( int i = 0; i < sizeof(T); i++ )
for( unsigned int i = 0; i < sizeof(T); i++ )
*(sptr++) = *(dptr--);
}