mirror of https://github.com/kiwix/libkiwix.git
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:
parent
62d26c27ff
commit
cecb65e314
|
@ -33,9 +33,11 @@ namespace kiwix {
|
|||
std::map<std::string, int> read_valuesmap(const std::string &s) {
|
||||
std::map<std::string, int> result;
|
||||
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())) );
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue