Merge pull request #782 from kiwix/windows_fix

This commit is contained in:
Matthieu Gautier 2022-06-09 16:21:00 +02:00 committed by GitHub
commit 69c5c88c30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ bool Library::addBook(const Book& book)
auto& newEntry = mp_impl->m_books[book.getId()]; auto& newEntry = mp_impl->m_books[book.getId()];
static_cast<Book&>(newEntry) = book; static_cast<Book&>(newEntry) = book;
newEntry.lastUpdatedRevision = mp_impl->m_revision; newEntry.lastUpdatedRevision = mp_impl->m_revision;
size_t new_cache_size = std::ceil(mp_impl->getBookCount(true, true)*0.1); size_t new_cache_size = static_cast<size_t>(std::ceil(mp_impl->getBookCount(true, true)*0.1));
if (getEnvVar<int>("KIWIX_ARCHIVE_CACHE_SIZE", -1) <= 0) { if (getEnvVar<int>("KIWIX_ARCHIVE_CACHE_SIZE", -1) <= 0) {
mp_impl->mp_archiveCache->setMaxSize(new_cache_size); mp_impl->mp_archiveCache->setMaxSize(new_cache_size);
} }