mirror of https://github.com/kiwix/libkiwix.git
Merge pull request #342 from kiwix/fix_iterator
Adapt to new libzim api.
This commit is contained in:
commit
d9d2a702ef
|
@ -714,7 +714,6 @@ bool Reader::searchSuggestions(const string& prefix,
|
||||||
const bool reset)
|
const bool reset)
|
||||||
{
|
{
|
||||||
bool retVal = false;
|
bool retVal = false;
|
||||||
zim::File::const_iterator articleItr;
|
|
||||||
|
|
||||||
/* Reset the suggestions otherwise check if the suggestions number is less
|
/* Reset the suggestions otherwise check if the suggestions number is less
|
||||||
* than the suggestionsCount */
|
* than the suggestionsCount */
|
||||||
|
@ -732,7 +731,7 @@ bool Reader::searchSuggestions(const string& prefix,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (articleItr = zimFileHandler->findByTitle('A', prefix);
|
for (auto articleItr = zimFileHandler->findByTitle('A', prefix);
|
||||||
articleItr != zimFileHandler->end()
|
articleItr != zimFileHandler->end()
|
||||||
&& articleItr->getTitle().compare(0, prefix.size(), prefix) == 0
|
&& articleItr->getTitle().compare(0, prefix.size(), prefix) == 0
|
||||||
&& this->suggestions.size() < suggestionsCount;
|
&& this->suggestions.size() < suggestionsCount;
|
||||||
|
|
Loading…
Reference in New Issue