From 48347825a9c5632a3b7e11171aa1b93f5ad99349 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 28 May 2019 15:08:16 +0200 Subject: [PATCH 1/2] suggestions method return a unique_ptr instead of a raw pointer. --- src/reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reader.cpp b/src/reader.cpp index 8390a2fe7..7422991f7 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -765,7 +765,7 @@ bool Reader::searchSuggestionsSmart(const string& prefix, this->suggestions.clear(); this->suggestionsOffset = this->suggestions.begin(); /* Try to search in the title using fulltext search database */ - const zim::Search* suggestionSearch + const auto suggestionSearch = this->getZimFileHandler()->suggestions(prefix, 0, suggestionsCount); if (suggestionSearch->get_matches_estimated()) { From 1f672056a968b347498c06ea32b0937ecc1b26e5 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 28 May 2019 15:12:53 +0200 Subject: [PATCH 2/2] [CI] Build on xenial. --- .travis.yml | 4 ++-- travis/install_deps.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf09f8c3d..fbe599848 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: cpp -dist: trusty -sudo: false +dist: xenial +sudo: true cache: ccache before_install: - PATH=$PATH:$HOME/bin diff --git a/travis/install_deps.sh b/travis/install_deps.sh index b3db45b87..1d0d49cc6 100755 --- a/travis/install_deps.sh +++ b/travis/install_deps.sh @@ -3,7 +3,6 @@ set -e REPO_NAME=${TRAVIS_REPO_SLUG#*/} -ARCHIVE_NAME=deps_${TRAVIS_OS_NAME}_${PLATFORM}_${REPO_NAME}.tar.xz # Ninja cd $HOME @@ -13,6 +12,7 @@ then wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip unzip ninja-mac.zip ninja + ARCHIVE_NAME=deps_osx_${PLATFORM}_${REPO_NAME}.tar.xz else wget https://bootstrap.pypa.io/get-pip.py python3.5 get-pip.py --user @@ -22,6 +22,7 @@ else wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip unzip ninja-linux.zip ninja + ARCHIVE_NAME=deps_linux_xenial_${PLATFORM}_${REPO_NAME}.tar.xz fi mkdir -p $HOME/bin @@ -31,3 +32,4 @@ cp ninja $HOME/bin cd ${HOME} wget http://tmp.kiwix.org/ci/${ARCHIVE_NAME} tar xf ${HOME}/${ARCHIVE_NAME} +sudo ln -s travis ../ci_builder