Merge pull request #36 from kiwix/no_cpp11

Remove C++11 syntax introduced by commit 9be2abe.
This commit is contained in:
Kelson 2017-03-28 19:48:30 +02:00 committed by GitHub
commit c06a041100
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> 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;