Commit 855ff0a7 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #28351: historynamecache: use range-based for

parent a5f9f507
......@@ -39,10 +39,10 @@ HistoryNameCache::HistoryNameCache() : hNameCache_()
typedef vector<map<string, string> > HistoryList;
HistoryList history(Manager::instance().getHistory());
for (HistoryList::iterator i = history.begin(); i != history.end(); ++i) {
string name((*i)["display_name"]);
string account((*i)["accountid"]);
string number((*i)["peer_number"]);
for (auto &i : history) {
string name(i["display_name"]);
string account(i["accountid"]);
string number(i["peer_number"]);
if (hNameCache_[account][number].empty() and not name.empty() and not number.empty())
hNameCache_[account][number] = name;
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