From cbf5bd57a8f6f6d38b411a391dcb5fb580199d7a Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 13 Apr 2020 16:06:17 +0200 Subject: [PATCH] Adapt to new libzim api. It is not possible to create a iterator without argument anymore. --- src/reader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/reader.cpp b/src/reader.cpp index d6874724a..9cd187f9e 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -714,7 +714,6 @@ bool Reader::searchSuggestions(const string& prefix, const bool reset) { bool retVal = false; - zim::File::const_iterator articleItr; /* Reset the suggestions otherwise check if the suggestions number is less * than the suggestionsCount */ @@ -732,7 +731,7 @@ bool Reader::searchSuggestions(const string& prefix, return false; } - for (articleItr = zimFileHandler->findByTitle('A', prefix); + for (auto articleItr = zimFileHandler->findByTitle('A', prefix); articleItr != zimFileHandler->end() && articleItr->getTitle().compare(0, prefix.size(), prefix) == 0 && this->suggestions.size() < suggestionsCount;