Use reference passing for EpdRenderer

This commit is contained in:
Dave Allie
2025-12-06 12:56:39 +11:00
parent 6414f85257
commit 9a33030623
23 changed files with 109 additions and 114 deletions

View File

@@ -7,7 +7,7 @@ class EpdRenderer;
class Section {
Epub* epub;
const int spineIndex;
EpdRenderer* renderer;
EpdRenderer& renderer;
std::string cachePath;
void onPageComplete(const Page* page);
@@ -16,7 +16,7 @@ class Section {
int pageCount = 0;
int currentPage = 0;
explicit Section(Epub* epub, const int spineIndex, EpdRenderer* renderer)
explicit Section(Epub* epub, const int spineIndex, EpdRenderer& renderer)
: epub(epub), spineIndex(spineIndex), renderer(renderer) {
cachePath = epub->getCachePath() + "/" + std::to_string(spineIndex);
}