Remove C++11 syntax introduced by commit 9be2abe.

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).
This commit is contained in:
Matthieu Gautier 2017-03-28 17:14:25 +02:00
parent 62d26c27ff
commit cecb65e314
1 changed files with 4 additions and 2 deletions

View File

@ -33,9 +33,11 @@ namespace kiwix {
std::map<std::string, int> read_valuesmap(const std::string &s) { std::map<std::string, int> read_valuesmap(const std::string &s) {
std::map<std::string, int> result; std::map<std::string, int> result;
std::vector<std::string> elems = split(s, ";"); std::vector<std::string> elems = split(s, ";");
for( auto elem: elems) for(std::vector<std::string>::iterator elem = elems.begin();
elem != elems.end();
elem++)
{ {
std::vector<std::string> tmp_elems = split(elem, ":"); std::vector<std::string> tmp_elems = split(*elem, ":");
result.insert( std::pair<std::string, int>(tmp_elems[0], atoi(tmp_elems[1].c_str())) ); result.insert( std::pair<std::string, int>(tmp_elems[0], atoi(tmp_elems[1].c_str())) );
} }
return result; return result;