minor code cleanup

* removed dead code
* prevent promotion to double
* made constants constexpr
* made some methods const
* fixed a few typo's
This commit is contained in:
Frank
2024-12-04 22:18:39 +01:00
parent 102d098e28
commit 972257a7ee
4 changed files with 46 additions and 76 deletions

View File

@@ -1399,17 +1399,6 @@ void Segment::refreshLightCapabilities() {
*/
void __attribute__((hot)) Segment::fill(uint32_t c) {
if (!isActive()) return; // not active
#if 0 && defined(WLED_ENABLE_HUB75MATRIX) && defined(WLEDMM_FASTPATH)
// DIRTY HACK - this ignores the first fill(black) in each frame, knowing that HUB75 has already blanked out the display.
if (_firstFill) {
_firstFill = false;
if (c == BLACK) {
if (ledsrgb && ledsrgbSize > 0) memset(ledsrgb, 0, ledsrgbSize);
return;
}
}
#endif
const uint_fast16_t cols = is2D() ? virtualWidth() : virtualLength(); // WLEDMM use fast int types
const uint_fast16_t rows = virtualHeight(); // will be 1 for 1D