From 85d2a105b26232f9cff9a2733f0dabc8f7c4b7d1 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Tue, 19 May 2026 11:15:46 +0200 Subject: [PATCH] cppcheck --- src/activities/reader/EpubReaderActivity.cpp | 6 ++++-- src/activities/reader/EpubReaderActivity.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index c9c092c7..3e76a2c3 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -2136,7 +2136,8 @@ void EpubReaderActivity::renderContents(std::unique_ptr page, const int or } } -void EpubReaderActivity::renderPageContentOnly(Page& page, const int orientedMarginTop, const int orientedMarginRight, +void EpubReaderActivity::renderPageContentOnly(const Page& page, const int orientedMarginTop, + const int orientedMarginRight, const int orientedMarginBottom, const int orientedMarginLeft) { auto* fcm = renderer.getFontCacheManager(); fcm->resetStats(); @@ -2153,7 +2154,8 @@ void EpubReaderActivity::renderPageContentOnly(Page& page, const int orientedMar // Status bar intentionally omitted — superimposed at display time with live values. } -void EpubReaderActivity::displayPreRenderedPage(Page& page, const int orientedMarginTop, const int orientedMarginRight, +void EpubReaderActivity::displayPreRenderedPage(const Page& page, const int orientedMarginTop, + const int orientedMarginRight, const int orientedMarginBottom, const int orientedMarginLeft) { const int viewportHeight = std::max(0, renderer.getScreenHeight() - orientedMarginTop - orientedMarginBottom); const int contentTop = orientedMarginTop + getImageOnlyPageYOffset(page, viewportHeight); diff --git a/src/activities/reader/EpubReaderActivity.h b/src/activities/reader/EpubReaderActivity.h index e2f4273d..e788df88 100644 --- a/src/activities/reader/EpubReaderActivity.h +++ b/src/activities/reader/EpubReaderActivity.h @@ -249,12 +249,12 @@ class EpubReaderActivity final : public Activity { // Renders page content into the frame buffer (prewarm + BW pass) without drawing the status bar // or flushing to the display. Used by the pre-render pass so the status bar can be superimposed // at display time with live values (clock, battery). - void renderPageContentOnly(Page& page, int orientedMarginTop, int orientedMarginRight, int orientedMarginBottom, + void renderPageContentOnly(const Page& page, int orientedMarginTop, int orientedMarginRight, int orientedMarginBottom, int orientedMarginLeft); // Draws the status bar over the current frame buffer and flushes to the display. // Handles the refresh cycle and grayscale AA pass. page must be the same page // that was last rendered into the buffer (needed for image AA re-render). - void displayPreRenderedPage(Page& page, int orientedMarginTop, int orientedMarginRight, int orientedMarginBottom, + void displayPreRenderedPage(const Page& page, int orientedMarginTop, int orientedMarginRight, int orientedMarginBottom, int orientedMarginLeft); void renderStatusBar() const; void silentIndexNextChapterIfNeeded(uint16_t viewportWidth, uint16_t viewportHeight);