Fix display method to use const qualifier for previousBuffer pointer (#10146)

Addresses cppcheck `src/graphics/EInkParallelDisplay.cpp:205: [low:style] Variable 'prev' can be declared as pointer to const [constVariablePointer]`
This commit is contained in:
Austin
2026-04-12 19:38:44 -05:00
committed by GitHub
co-authored by GitHub
parent 0f2d224e74
commit a1d6c6db62
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -202,7 +202,7 @@ void EInkParallelDisplay::display(void)
// Get pointers to internal buffers
uint8_t *cur = epaper->currentBuffer();
uint8_t *prev = epaper->previousBuffer(); // may be NULL on first init
const uint8_t *prev = epaper->previousBuffer(); // may be NULL on first init
// Track changed row range while converting
int newTop = h; // min changed row (initialized to out-of-range)
@@ -98,7 +98,7 @@ void setupNicheGraphics()
buttons->setTwoWayRockerPressHandlers(
[inkhud]() {
bool systemHandlingInput = false;
for (InkHUD::SystemApplet *sa : inkhud->systemApplets) {
for (const InkHUD::SystemApplet *sa : inkhud->systemApplets) {
if (sa->handleInput) {
systemHandlingInput = true;
break;
@@ -112,7 +112,7 @@ void setupNicheGraphics()
},
[inkhud]() {
bool systemHandlingInput = false;
for (InkHUD::SystemApplet *sa : inkhud->systemApplets) {
for (const InkHUD::SystemApplet *sa : inkhud->systemApplets) {
if (sa->handleInput) {
systemHandlingInput = true;
break;