git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@376
270642c3-0616-0410-b53a-bc976706d245
prefix_ boost::uint32_t senf::Parse_SNDUPacket::calcCrc()
const
{
- ule_crc32 result;
- senf::PacketData::iterator i (data().begin());
- senf::PacketData::iterator const i_end(boost::prior(data().end(),4));
- for (; i!=i_end; ++i)
- result.process_byte(*i);
- return result.checksum();
+ return std::for_each(
+ data().begin(),
+ boost::prior(data().end(), 4),
+ ule_crc32() ).checksum();
}
prefix_ void senf::SNDUPacketType::dump(packet p, std::ostream & os)