summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/mirandahistory.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-03 16:30:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-03 16:30:25 +0300
commit9613f96e6a6f96ad02a0fc926054132811ae2bb1 (patch)
treef8fe94a3efe7598a2af926f264d354f7a08fb943 /plugins/HistoryStats/src/mirandahistory.cpp
parent2f880bda3aa2d8817ce43481df9d99b12ed82a58 (diff)
Accounts() : iterator for accounts
Diffstat (limited to 'plugins/HistoryStats/src/mirandahistory.cpp')
-rw-r--r--plugins/HistoryStats/src/mirandahistory.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/HistoryStats/src/mirandahistory.cpp b/plugins/HistoryStats/src/mirandahistory.cpp
index 792b6fcf46..6caea4fb75 100644
--- a/plugins/HistoryStats/src/mirandahistory.cpp
+++ b/plugins/HistoryStats/src/mirandahistory.cpp
@@ -11,13 +11,9 @@ void MirandaHistory::populateProtocols()
{
m_Protocols.clear();
- PROTOACCOUNT **protoList;
- int protoCount;
- Proto_EnumAccounts(&protoCount, &protoList);
- upto_each_(i, protoCount)
- {
- ext::a::string protoName = protoList[i]->szModuleName;
- m_Protocols[protoName] = protoList[i]->tszAccountName;
+ for (auto &pa : Accounts()) {
+ ext::a::string protoName = pa->szModuleName;
+ m_Protocols[protoName] = pa->tszAccountName;
}
m_DefaultProtocol = TranslateT("(Unknown)");