From 5128861136ede0f42c76fe2d9597dd59c12fa380 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 6 Sep 2018 18:24:44 +0200 Subject: [PATCH] Remove default value for book pointer of `readBookFromPath`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a nonsense to accept NULL pointer here. --- include/manager.h | 2 +- src/manager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/manager.h b/include/manager.h index 08e8cbcb1..99bfea975 100644 --- a/include/manager.h +++ b/include/manager.h @@ -203,7 +203,7 @@ class Manager protected: kiwix::Library* library; - bool readBookFromPath(const std::string& path, Book* book = NULL); + bool readBookFromPath(const std::string& path, Book* book); bool parseXmlDom(const pugi::xml_document& doc, const bool readOnly, const std::string& libraryPath); diff --git a/src/manager.cpp b/src/manager.cpp index f944f6893..8b646bf37 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -55,7 +55,7 @@ bool Manager::parseXmlDom(const pugi::xml_document& doc, || atoi(libraryVersion.c_str()) <= atoi(KIWIX_LIBRARY_VERSION)) { ok = false; if (!book.getPath().empty()) { - ok = this->readBookFromPath(book.getPath()); + ok = this->readBookFromPath(book.getPath(), &book); } }