From 11bc36ebb5045e29ebd24874cb52d34a5513c206 Mon Sep 17 00:00:00 2001 From: Zach Nelson Date: Thu, 7 May 2026 01:03:51 -0500 Subject: [PATCH] refactor: Use fixed-size integers for BookMetadataCache data (#1844) --- lib/Epub/Epub/BookMetadataCache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Epub/Epub/BookMetadataCache.h b/lib/Epub/Epub/BookMetadataCache.h index 7f45090a..2ff123d2 100644 --- a/lib/Epub/Epub/BookMetadataCache.h +++ b/lib/Epub/Epub/BookMetadataCache.h @@ -18,11 +18,11 @@ class BookMetadataCache { struct SpineEntry { std::string href; - size_t cumulativeSize; + uint32_t cumulativeSize; int16_t tocIndex; SpineEntry() : cumulativeSize(0), tocIndex(-1) {} - SpineEntry(std::string href, const size_t cumulativeSize, const int16_t tocIndex) + SpineEntry(std::string href, const uint32_t cumulativeSize, const int16_t tocIndex) : href(std::move(href)), cumulativeSize(cumulativeSize), tocIndex(tocIndex) {} }; @@ -44,7 +44,7 @@ class BookMetadataCache { private: std::string cachePath; - size_t lutOffset; + uint32_t lutOffset; uint16_t spineCount; uint16_t tocCount; bool loaded;