diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2012-08-16 19:09:08 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2012-08-16 19:09:08 +0000 |
commit | f296a083590d5400503f1caaffdf4a26e5ffdafc (patch) | |
tree | 84d185ff6119cf4585145dd1f1ef4517ed9912e0 /Plugins/extraicons/ExtraIconGroup.cpp | |
parent | 446f5c32cc469350cf72db2f7f831522dd8a5301 (diff) |
Using INVALID_HANDLE_VALUE instead of -1 and fix for usedIcons (thanks ghazan)
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@257 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/extraicons/ExtraIconGroup.cpp')
-rw-r--r-- | Plugins/extraicons/ExtraIconGroup.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Plugins/extraicons/ExtraIconGroup.cpp b/Plugins/extraicons/ExtraIconGroup.cpp index 162086e..797ccbe 100644 --- a/Plugins/extraicons/ExtraIconGroup.cpp +++ b/Plugins/extraicons/ExtraIconGroup.cpp @@ -134,10 +134,9 @@ int ExtraIconGroup::setIcon(int id, HANDLE hContact, void *icon) }
if (storePos == items.size())
- {
return -1;
- }
- else if (storePos > currentPos)
+
+ if (storePos > currentPos)
{
items[storePos]->storeIcon(hContact, icon);
return 0;
@@ -205,7 +204,7 @@ int ExtraIconGroup::getType() const int ExtraIconGroup::ClistSetExtraIcon(HANDLE hContact, HANDLE hImage)
{
- if (hImage != (HANDLE) -1)
+ if (hImage != INVALID_HANDLE_VALUE)
setValidExtraIcon = true;
return Clist_SetExtraIcon(hContact, slot, hImage);
|