Skip to content

Commit

Permalink
Fixed linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonybaltovski committed Jan 25, 2017
1 parent c4c98bb commit ad3c644
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/um7/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ inline void memcpy_network(void* dest, void* src, size_t count)
#if __BYTE_ORDER == __LITTLE_ENDIAN
uint8_t* d = reinterpret_cast<uint8_t*>(dest);
uint8_t* s = reinterpret_cast<uint8_t*>(src);
for (uint8_t i = 0; i < count; i++) {
for (uint8_t i = 0; i < count; i++)
{
d[i] = s[count - (i+1)];
}
#else
Expand Down Expand Up @@ -198,7 +199,8 @@ class Registers

void write_raw(uint8_t register_index, std::string data)
{
if ((register_index - 1) + (data.length()/4 - 1) >= NUM_REGISTERS) {
if ((register_index - 1) + (data.length()/4 - 1) >= NUM_REGISTERS)
{
throw std::range_error("Index and length write beyond boundaries of register array.");
}
memcpy(&raw_[register_index], data.c_str(), data.length());
Expand Down

0 comments on commit ad3c644

Please sign in to comment.