Skip to content

Commit fba4c4b

Browse files
committed
minor fixes
1 parent 0433605 commit fba4c4b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/cpp.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ This pattern enables optimizations and makes intent clear to reviewers.
171171

172172
### `const` references to avoid copies
173173
- Pass objects by `const &` (or `&`) instead of copying them implicitly.
174-
- Use `const &` (or `&`) inside loops - This avoids constructing temporary objects on every access.
174+
- Use `const &` (or `&`) inside loops - This avoids constructing temporary objects on every access.
175175

176176
<!-- HUMAN_ONLY_START -->
177177
```cpp
@@ -454,7 +454,7 @@ uint32_t wg = (((c1 >> 8) & TWO_CHANNEL_MASK) * amount) & ~TWO_CHANNEL_MASK;
454454
return rb | wg;
455455
```
456456

457-
### Bit Shifts Over Division (mainly for RISC-V boards)
457+
### Bit Shifts Over Division (mainly for RISC-V and ESP8266 boards)
458458

459459
ESP32 and ESP32-S3 (Xtensa core) have a fast "integer divide" instruction, so manual shifts rarely help.
460460
On RISC-V targets (ESP32-C3/C6/P4) and ESP8266, prefer explicit bit-shifts for power-of-two arithmetic — the compiler does **not** always convert divisions to shifts.

0 commit comments

Comments
 (0)