From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-06-16 00:09:45
Daryle Walker wrote:
> In CVS, I added an example file to the CRC library. I changed the
> documentation to point to the example file.
I see this code in the example:
ifs.read( buffer, buffer_size );
len = ifs.gcount();
result.process_bytes( buffer, len );
} while ( ifs && (buffer_size == len) );
and I think that check for "buffer_size == len" is not needed. If 'read'
fails to read 'buffer_size' bytes, it must set both eofbit and failbit, so
"ifs" will evaluate to false. Is there any particular reason you have the
check here --- maybe some library is buggy?
Also, as long as the program accepts several files as arguments, it's
probably better to output CRC for each file, not for all of them.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk