summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/customsmiley.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:33:29 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commite4e088d37070bab69b1457621706d65472874243 (patch)
treeb031344561547208e567fa473e1640b302407a86 /plugins/SmileyAdd/src/customsmiley.cpp
parentba75602b16e4b9b484c2c05f70c117f612c81e1d (diff)
SmileyAdd: C++'11 iterators
Diffstat (limited to 'plugins/SmileyAdd/src/customsmiley.cpp')
-rw-r--r--plugins/SmileyAdd/src/customsmiley.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp
index 72690198d3..686560a9d0 100644
--- a/plugins/SmileyAdd/src/customsmiley.cpp
+++ b/plugins/SmileyAdd/src/customsmiley.cpp
@@ -51,9 +51,9 @@ bool SmileyPackCListType::AddSmiley(MCONTACT hContact, wchar_t *path)
SmileyPackCType* SmileyPackCListType::GetSmileyPack(MCONTACT id)
{
- for (int i = 0; i < m_SmileyPacks.getCount(); i++)
- if (m_SmileyPacks[i].GetId() == id)
- return &m_SmileyPacks[i];
+ for (auto &it : m_SmileyPacks)
+ if (it->GetId() == id)
+ return it;
return nullptr;
}
@@ -131,9 +131,9 @@ bool SmileyPackCType::LoadSmiley(wchar_t *path)
CMStringW name = dirs.Mid(slash + 1, dot - slash - 1);
- for (int i = 0; i < m_SmileyList.getCount(); i++)
- if (m_SmileyList[i].GetTriggerText() == name) {
- m_SmileyList[i].LoadFromResource(dirs, 0);
+ for (auto &it : m_SmileyList)
+ if (it->GetTriggerText() == name) {
+ it->LoadFromResource(dirs, 0);
return true;
}