Commit 61e6269b authored by Tristan Matthews's avatar Tristan Matthews
Browse files

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

parent 855ff0a7
......@@ -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;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment