diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-24 15:40:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-24 15:40:33 +0000 |
commit | 46a3d5c05b077f7dc3034465b0b7e0a8ea6b5204 (patch) | |
tree | bc3e10982a336de09a92a0887e07b0420eab34ea /plugins/StatusPlugins/commonstatus.cpp | |
parent | 60066ee3ab1d80569d5c13fc9c14fe082aa28be4 (diff) |
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8259 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/commonstatus.cpp')
-rw-r--r-- | plugins/StatusPlugins/commonstatus.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp index fb78e81c39..7369c60148 100644 --- a/plugins/StatusPlugins/commonstatus.cpp +++ b/plugins/StatusPlugins/commonstatus.cpp @@ -288,7 +288,7 @@ INT_PTR SetStatusEx(WPARAM wParam, LPARAM lParam) // set the status
if (newstatus != oldstatus && !(b_Caps1 && b_Caps3 && ServiceExists(MS_NAS_SETSTATE))) {
log_debugA("CommonStatus sets status for %s to %d", szProto, newstatus);
- CallProtoService(szProto, PS_SETSTATUS, (WPARAM)newstatus, 0);
+ CallProtoService(szProto, PS_SETSTATUS, newstatus, 0);
}
}
@@ -298,13 +298,13 @@ INT_PTR SetStatusEx(WPARAM wParam, LPARAM lParam) return -1;
}
log_debugA("CommonStatus: setting global status %u", globStatus);
- CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)globStatus, 0);
+ CallService(MS_CLIST_SETSTATUSMODE, globStatus, 0);
}
return 0;
}
-static INT_PTR GetProtocolCountService(WPARAM wParam, LPARAM lParam)
+static INT_PTR GetProtocolCountService(WPARAM, LPARAM)
{
return GetProtoCount();
}
@@ -316,14 +316,12 @@ bool IsSuitableProto(PROTOACCOUNT *pa) int GetProtoCount()
{
- int pCount = 0;
-
- int count;
- PROTOACCOUNT **protos;
- ProtoEnumAccounts(&count, &protos);
+ int pCount = 0, count;
+ PROTOACCOUNT **accs;
+ ProtoEnumAccounts(&count, &accs);
for (int i = 0; i < count; i++)
- if (IsSuitableProto(protos[i]))
+ if (IsSuitableProto(accs[i]))
pCount++;
return pCount;
|