diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e25f740c..03596738 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -33,7 +33,7 @@ Always reference these instructions first and fallback to search or bash command | 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 run dev` | Watch mode — auto-rebuilds web UI on file changes | — | | `pio run -e ` | Build firmware for a hardware target | 15–20 min | diff --git a/.github/cpp.instructions.md b/.github/cpp.instructions.md index d5366c1f..b041642c 100644 --- a/.github/cpp.instructions.md +++ b/.github/cpp.instructions.md @@ -147,12 +147,13 @@ This pattern enables optimizations and makes intent clear to reviewers. ### `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(); -``` ### `const` references to avoid copies