From 70382d15e2ac86100273da005e8795193f7da64b Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 9 Jun 2022 15:21:06 +0200 Subject: [PATCH] Windows compiler complains about the implicit cast from double to size_t. --- src/library.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library.cpp b/src/library.cpp index ad97a0c38..9c03afe2d 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -175,7 +175,7 @@ bool Library::addBook(const Book& book) auto& newEntry = mp_impl->m_books[book.getId()]; static_cast(newEntry) = book; 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(std::ceil(mp_impl->getBookCount(true, true)*0.1)); if (getEnvVar("KIWIX_ARCHIVE_CACHE_SIZE", -1) <= 0) { mp_impl->mp_archiveCache->setMaxSize(new_cache_size); }