src: Fix compile error with gcc-4.7
This commit is contained in:
parent
e01d213636
commit
cbad05e0de
|
@ -1244,8 +1244,13 @@ int read_mime_types(std::map<std::string, std::string> &res,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ext_end = std::find_if(ext_start, std::end(line), delim_pred);
|
ext_end = std::find_if(ext_start, std::end(line), delim_pred);
|
||||||
|
#ifdef HAVE_STD_MAP_EMPLACE
|
||||||
res.emplace(std::string(ext_start, ext_end),
|
res.emplace(std::string(ext_start, ext_end),
|
||||||
std::string(std::begin(line), type_end));
|
std::string(std::begin(line), type_end));
|
||||||
|
#else // !HAVE_STD_MAP_EMPLACE
|
||||||
|
res.insert(std::make_pair(std::string(ext_start, ext_end),
|
||||||
|
std::string(std::begin(line), type_end)));
|
||||||
|
#endif // !HAVE_STD_MAP_EMPLACE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue