Skip to content

Commit

Permalink
Add braces for one-liner under for
Browse files Browse the repository at this point in the history
  • Loading branch information
xeonqq committed Nov 4, 2023
1 parent b427802 commit d4a55f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sming/Libraries/MPU6050/MPU6050.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3247,8 +3247,9 @@ bool MPU6050::writeMemoryBlock(const uint8_t* data, uint16_t dataSize, uint8_t b

if(useProgMem) {
// write the chunk of data as specified
for(j = 0; j < chunkSize; j++)
for(j = 0; j < chunkSize; j++) {
progBuffer[j] = pgm_read_byte(data + i + j);
}
} else {
// write the chunk of data as specified
progBuffer = const_cast<uint8_t*>(data) + i;
Expand Down Expand Up @@ -3336,8 +3337,9 @@ bool MPU6050::writeDMPConfigurationSet(const uint8_t* data, uint16_t dataSize, b
if(useProgMem) {
if(sizeof(progBuffer) < length)
progBuffer = static_cast<uint8_t*>(realloc(progBuffer, length));
for(j = 0; j < length; j++)
for(j = 0; j < length; j++) {
progBuffer[j] = pgm_read_byte(data + i + j);
}
} else {
progBuffer = const_cast<uint8_t*>(data) + i;
}
Expand Down

0 comments on commit d4a55f8

Please sign in to comment.