Skip to content

Commit e4c8e34

Browse files
committed
minor clarifications
1 parent a718caf commit e4c8e34

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Always reference these instructions first and fallback to search or bash command
3333

3434
| Command | Purpose | Typical Time |
3535
|---|---|---|
36-
| `npm run build` | Build web UI → generates `wled00/html_*.h` headers | ~3 s |
36+
| `npm run build` | Build web UI → generates `wled00/html_*.h` and `wled00/js_*.h` headers | ~3 s |
3737
| `npm test` | Run test suite | ~40 s |
3838
| `npm run dev` | Watch mode — auto-rebuilds web UI on file changes ||
3939
| `pio run -e <env>` | Build firmware for a hardware target | 15–20 min |

.github/cpp.instructions.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,13 @@ This pattern enables optimizations and makes intent clear to reviewers.
147147

148148
### `const` locals
149149

150-
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:
150+
* Adding `const` to a local variable that is only assigned once is optional, but *not* strictly necessary.
151+
* In hot-path code, `const` on cached locals may help the compiler keep values in registers:
152+
```cpp
153+
const uint_fast16_t cols = vWidth();
154+
const uint_fast16_t rows = vHeight();
155+
```
151156

152-
```cpp
153-
const uint_fast16_t cols = virtualWidth();
154-
const uint_fast16_t rows = virtualHeight();
155-
```
156157
<!-- HUMAN_ONLY_END -->
157158
### `const` references to avoid copies
158159

0 commit comments

Comments
 (0)