Review implied changes

This commit is contained in:
jpirnay
2026-04-01 11:14:53 +02:00
parent 9cdc1b8784
commit e1fd631ced
4 changed files with 13 additions and 4 deletions
@@ -99,6 +99,13 @@ std::string makeSpineCacheKey(const std::shared_ptr<Epub>& epub, const int spine
size_t getTotalTextBytesCached(const std::shared_ptr<Epub>& epub, const int spineIndex, const std::string& tmpPath) {
static std::unordered_map<std::string, size_t> sTotalBytesBySpine;
static std::string sCachedBookPath;
const std::string currentBookPath = epub ? epub->getCachePath() : std::string();
if (currentBookPath != sCachedBookPath) {
sTotalBytesBySpine.clear();
sCachedBookPath = currentBookPath;
}
const std::string key = makeSpineCacheKey(epub, spineIndex);
if (!key.empty()) {