Ticket #3030: my.patch
File my.patch, 1003 bytes (added by , 13 years ago) |
---|
-
crc.hpp
947 947 void const * bytes_end 948 948 ) 949 949 { 950 value_type r = rem_; 950 951 // Recompute the CRC for each byte passed 951 952 for ( unsigned char const * p 952 953 = static_cast<unsigned char const *>(bytes_begin) ; p < bytes_end ; ++p ) … … 955 956 // get the new bits, shift out the remainder's current higher 956 957 // bits, and update the remainder with the polynominal division 957 958 // of the new bits. 958 unsigned char const byte_index = helper_type::index( r em_, *p );959 r em_ = helper_type::shift( rem_);960 r em_^= crc_table_type::table_[ byte_index ];959 unsigned char const byte_index = helper_type::index( r, *p ); 960 r = helper_type::shift( r ); 961 r ^= crc_table_type::table_[ byte_index ]; 961 962 } 963 964 rem_ = r; 962 965 } 963 966 964 967 template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly,