Example Implementation does not include code for reversed output
solomonbstoner opened this issue · 4 comments
solomonbstoner commented
The example implemented printed when --verbose true
does not include the code for reversed output. The output reflection function had to be manually included.
// Function that reflects its argument
my_crc_basic::value_type my_crc_basic::reflect(value_type x ) const {
value_type reflection = 0;
value_type const one = 1;
for( std::size_t i = 0 ; i < width_ ; ++i, x >>= 1 ) {
if ( x & one ) {
reflection |= ( one << (width_ - 1u - i) );
}
}
return reflection;
}
nitram2342 commented
Thank you very much for your feedback. It's true, that part is missing and maybe other ways to use the CRC, too.
solomonbstoner commented
Hi Martin! Thanks for accepting my PR. Assign this issue to me. Ill work something out
nitram2342 commented
Thank you very much for your support and offer. I'll transfer the issue to you.
solomonbstoner commented
@nitram2342 could you review my PR, please?