From cecb65e3141e7710ba7aa2e9411ee2cef240406b Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 28 Mar 2017 17:14:25 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20C++11=C2=A0syntax=20introduced=20by=20?= =?UTF-8?q?commit=209be2abe.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `for( auto elem: elems)` syntax is a C++11 syntax. We are not using C++11 (even if it would be good idea). This works on recent compiler (on Fedora 25) but fails on older one (on Travis). --- src/xapianSearcher.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xapianSearcher.cpp b/src/xapianSearcher.cpp index 4de9d4834..22fd06e17 100644 --- a/src/xapianSearcher.cpp +++ b/src/xapianSearcher.cpp @@ -33,9 +33,11 @@ namespace kiwix { std::map read_valuesmap(const std::string &s) { std::map result; std::vector elems = split(s, ";"); - for( auto elem: elems) + for(std::vector::iterator elem = elems.begin(); + elem != elems.end(); + elem++) { - std::vector tmp_elems = split(elem, ":"); + std::vector tmp_elems = split(*elem, ":"); result.insert( std::pair(tmp_elems[0], atoi(tmp_elems[1].c_str())) ); } return result;