From d4a55f88ae4ac6b663c6934d9a1e25abdf11bc85 Mon Sep 17 00:00:00 2001 From: xeonqq Date: Sun, 10 Sep 2023 22:02:50 +0200 Subject: [PATCH] Add braces for one-liner under for --- Sming/Libraries/MPU6050/MPU6050.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sming/Libraries/MPU6050/MPU6050.cpp b/Sming/Libraries/MPU6050/MPU6050.cpp index 4462e895c3..e4113b7c8b 100644 --- a/Sming/Libraries/MPU6050/MPU6050.cpp +++ b/Sming/Libraries/MPU6050/MPU6050.cpp @@ -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(data) + i; @@ -3336,8 +3337,9 @@ bool MPU6050::writeDMPConfigurationSet(const uint8_t* data, uint16_t dataSize, b if(useProgMem) { if(sizeof(progBuffer) < length) progBuffer = static_cast(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(data) + i; }