const const const

small speedup by declaring some functions "const"
This commit is contained in:
Frank
2024-11-24 17:45:25 +01:00
parent 61c2ba98b7
commit ce8fc8930e
4 changed files with 8 additions and 8 deletions

View File

@@ -4763,7 +4763,7 @@ class AuroraWave {
alive = true;
}
CRGB getColorForLED(int ledIndex) {
CRGB getColorForLED(int ledIndex) const {
if(ledIndex < center - width || ledIndex > center + width) return 0; //Position out of range of this wave
CRGB rgb;
@@ -4818,7 +4818,7 @@ class AuroraWave {
}
};
bool stillAlive() {
bool stillAlive() const {
return alive;
};
};