minor clarifications

This commit is contained in:
Frank
2026-04-07 17:55:11 +02:00
parent a718caf4f7
commit e4c8e349da
2 changed files with 7 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ Always reference these instructions first and fallback to search or bash command
| Command | Purpose | Typical Time | | Command | Purpose | Typical Time |
|---|---|---| |---|---|---|
| `npm run build` | Build web UI → generates `wled00/html_*.h` headers | ~3 s | | `npm run build` | Build web UI → generates `wled00/html_*.h` and `wled00/js_*.h` headers | ~3 s |
| `npm test` | Run test suite | ~40 s | | `npm test` | Run test suite | ~40 s |
| `npm run dev` | Watch mode — auto-rebuilds web UI on file changes | — | | `npm run dev` | Watch mode — auto-rebuilds web UI on file changes | — |
| `pio run -e <env>` | Build firmware for a hardware target | 1520 min | | `pio run -e <env>` | Build firmware for a hardware target | 1520 min |

View File

@@ -147,12 +147,13 @@ This pattern enables optimizations and makes intent clear to reviewers.
### `const` locals ### `const` locals
Adding `const` to a local variable that is only assigned once is not necessary — but it **is** required when the variable is passed to a function that takes a `const` parameter (pointer or reference). In hot-path code, `const` on cached locals helps the compiler keep values in registers: * Adding `const` to a local variable that is only assigned once is optional, but *not* strictly necessary.
* In hot-path code, `const` on cached locals may help the compiler keep values in registers:
```cpp
const uint_fast16_t cols = vWidth();
const uint_fast16_t rows = vHeight();
```
```cpp
const uint_fast16_t cols = virtualWidth();
const uint_fast16_t rows = virtualHeight();
```
<!-- HUMAN_ONLY_END --> <!-- HUMAN_ONLY_END -->
### `const` references to avoid copies ### `const` references to avoid copies