Review changes

This commit is contained in:
jpirnay
2026-03-04 12:27:33 +01:00
parent 08cdd06c41
commit d0d4dc5c18
2 changed files with 17 additions and 6 deletions
+4 -1
View File
@@ -8,6 +8,8 @@
#include <I18n.h>
#include <Logging.h>
#include <memory>
#include "CrossPointSettings.h"
#include "CrossPointState.h"
#include "EpubReaderChapterSelectionActivity.h"
@@ -22,6 +24,7 @@
#include "fontIds.h"
#include "util/ScreenshotUtil.h"
namespace {
// pagesPerRefresh now comes from SETTINGS.getRefreshFrequency()
constexpr unsigned long skipChapterMs = 700;
@@ -870,7 +873,7 @@ bool EpubReaderActivity::drawCurrentPageToBuffer(const std::string& filePath, Gf
// Load or rebuild the section cache. Rebuilding is needed when the cache is missing or stale
// (e.g. after a firmware update). A no-op popup callback avoids any UI during sleep preparation.
auto section = std::unique_ptr<Section>(new Section(epub, spineIndex, renderer));
auto section = std::make_unique<Section>(epub, spineIndex, renderer);
if (!section->loadSectionFile(SETTINGS.getReaderFontId(), SETTINGS.getReaderLineCompression(),
SETTINGS.extraParagraphSpacing, SETTINGS.paragraphAlignment, viewportWidth,
viewportHeight, SETTINGS.hyphenationEnabled, SETTINGS.embeddedStyle)) {