summaryrefslogtreecommitdiff
path: root/Plugins/extraicons/usedIcons.cpp
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-04-17 01:59:38 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-04-17 01:59:38 +0000
commitd27127d44576580e3a0000590b6179f06cc67b8e (patch)
treef5643bfb5d73ec3e4089c9cc6dcf44e5740e8ac9 /Plugins/extraicons/usedIcons.cpp
parentfc229f1f9ff3600a9708da57f5629e14673011b7 (diff)
extraicons: new options dialog
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@167 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/extraicons/usedIcons.cpp')
-rw-r--r--Plugins/extraicons/usedIcons.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/Plugins/extraicons/usedIcons.cpp b/Plugins/extraicons/usedIcons.cpp
index 0be3995..010f0d8 100644
--- a/Plugins/extraicons/usedIcons.cpp
+++ b/Plugins/extraicons/usedIcons.cpp
@@ -93,17 +93,21 @@ void RemoveIcon(const char *icolibName)
icon->refCount--;
- if (icon->refCount <= 0)
- usedIcons.erase(it);
-
break;
}
}
void ResetIcons()
{
- for (unsigned int i = 0; i < usedIcons.size(); ++i)
- usedIcons[i].hImage = NULL;
+ for (vector<Icon>::iterator it = usedIcons.begin(); it != usedIcons.end(); it++)
+ {
+ Icon *icon = &*it;
+
+ if (icon->refCount <= 0)
+ usedIcons.erase(it);
+ else
+ icon->hImage = NULL;
+ }
}