* #28351: historyitem: use range-based for loops

This commit is contained in:
Tristan Matthews
2013-08-13 16:43:03 -04:00
parent 855ff0a7d7
commit 61e6269bbc

View File

@ -103,13 +103,12 @@ bool HistoryItem::hasPeerNumber() const
void HistoryItem::print(std::ostream &o) const
{
// every entry starts with "[" + random integer = "]"
for (map<string, string>::const_iterator iter = entryMap_.begin();
iter != entryMap_.end(); ++iter) {
for (const auto &iter : entryMap_) {
// if the file does not exist anymore, we do not save it
if (iter->first == RECORDING_PATH_KEY and not file_exists(iter->second))
o << iter->first << "=" << "" << std::endl;
if (iter.first == RECORDING_PATH_KEY and not file_exists(iter.second))
o << iter.first << "=" << "" << std::endl;
else
o << iter->first << "=" << iter->second << std::endl;
o << iter.first << "=" << iter.second << std::endl;
}
}