This commit is contained in:
Pavel Kirienko 2014-02-23 20:10:09 +04:00
parent 0c7d51b9ec
commit da4c2b524b
2 changed files with 3 additions and 3 deletions

View File

@ -26,14 +26,14 @@ public:
: value_(0x0000)
{ }
Crc16(const uint8_t* bytes, int len)
Crc16(const uint8_t* bytes, unsigned int len)
: value_(0x0000)
{
add(bytes, len);
}
uint16_t add(uint8_t byte);
uint16_t add(const uint8_t* bytes, int len);
uint16_t add(const uint8_t* bytes, unsigned int len);
uint16_t get() const { return value_; }
};

View File

@ -51,7 +51,7 @@ uint16_t Crc16::add(uint8_t byte)
return value_;
}
uint16_t Crc16::add(const uint8_t* bytes, int len)
uint16_t Crc16::add(const uint8_t* bytes, unsigned int len)
{
assert(bytes);
while (len--)