Fix to get new getSuggestions() working on Android

This commit is contained in:
Emmanuel Engelhart 2015-08-16 18:09:18 +02:00
parent e829d7428d
commit f3c4556431
3 changed files with 4 additions and 4 deletions

View File

@ -540,7 +540,7 @@ namespace kiwix {
article is already in the suggestions list (with an other article is already in the suggestions list (with an other
title) */ title) */
bool insert = true; bool insert = true;
std::vector<std::vector<std::string>>::iterator suggestionItr; std::vector< std::vector<std::string> >::iterator suggestionItr;
for (suggestionItr = this->suggestions.begin(); suggestionItr != this->suggestions.end(); suggestionItr++) { for (suggestionItr = this->suggestions.begin(); suggestionItr != this->suggestions.end(); suggestionItr++) {
int result = normalizedArticleTitle.compare((*suggestionItr)[2]); int result = normalizedArticleTitle.compare((*suggestionItr)[2]);
if (result == 0 && articleFinalUrl.compare((*suggestionItr)[1]) == 0) { if (result == 0 && articleFinalUrl.compare((*suggestionItr)[1]) == 0) {

View File

@ -86,8 +86,8 @@ namespace kiwix {
zim::size_type nsACount; zim::size_type nsACount;
zim::size_type nsICount; zim::size_type nsICount;
std::vector<std::vector<std::string>> suggestions; std::vector< std::vector<std::string> > suggestions;
std::vector<std::vector<std::string>>::iterator suggestionsOffset; std::vector< std::vector<std::string> >::iterator suggestionsOffset;
private: private:
std::map<std::string, unsigned int> parseCounterMetadata(); std::map<std::string, unsigned int> parseCounterMetadata();

View File

@ -268,5 +268,5 @@ std::string kiwix::toTitle (const std::string &word) {
} }
std::string kiwix::normalize (const std::string &word) { std::string kiwix::normalize (const std::string &word) {
return kiwix::removeAccents(kiwix::lcAll(word)); return kiwix::lcAll(word);
} }