diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-19 22:04:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-19 22:04:33 +0000 |
commit | 25c307a140104c3b09fecbbf2f452368090a45d0 (patch) | |
tree | 99d8e24d70a0c70e37ee85339fcb348473d52bf3 /protocols/MSN/src/msn_srv.cpp | |
parent | 550c3e26b321ffb138d02f02c22e64f3e3044767 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@11025 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_srv.cpp')
-rw-r--r-- | protocols/MSN/src/msn_srv.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/protocols/MSN/src/msn_srv.cpp b/protocols/MSN/src/msn_srv.cpp index fab6bb59a2..940b8e2496 100644 --- a/protocols/MSN/src/msn_srv.cpp +++ b/protocols/MSN/src/msn_srv.cpp @@ -28,14 +28,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void CMsnProto::MSN_AddGroup(const char* grpName, const char *grpId, bool init)
{
- ServerGroupItem* p = grpList.find((ServerGroupItem*)&grpId);
+ ServerGroupItem* p = m_arGroups.find((ServerGroupItem*)&grpId);
if (p != NULL) return;
p = (ServerGroupItem*)mir_alloc(sizeof(ServerGroupItem));
p->id = mir_strdup(grpId);
p->name = mir_strdup(grpName);
- grpList.insert(p);
+ m_arGroups.insert(p);
if (init)
Clist_CreateGroup(0, ptrT(mir_utf8decodeT(grpName)));
@@ -46,13 +46,13 @@ void CMsnProto::MSN_AddGroup(const char* grpName, const char *grpId, bool init) void CMsnProto::MSN_DeleteGroup(const char* pId)
{
- int i = grpList.getIndex((ServerGroupItem*)&pId);
+ int i = m_arGroups.getIndex((ServerGroupItem*)&pId);
if (i > -1) {
- ServerGroupItem* p = grpList[i];
+ ServerGroupItem* p = m_arGroups[i];
mir_free(p->id);
mir_free(p->name);
mir_free(p);
- grpList.remove(i);
+ m_arGroups.remove(i);
}
}
@@ -84,13 +84,13 @@ void CMsnProto::MSN_DeleteServerGroup(LPCSTR szId) void CMsnProto::MSN_FreeGroups(void)
{
- for (int i = 0; i < grpList.getCount(); i++) {
- ServerGroupItem* p = grpList[i];
+ for (int i = 0; i < m_arGroups.getCount(); i++) {
+ ServerGroupItem* p = m_arGroups[i];
mir_free(p->id);
mir_free(p->name);
mir_free(p);
}
- grpList.destroy();
+ m_arGroups.destroy();
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -98,7 +98,7 @@ void CMsnProto::MSN_FreeGroups(void) LPCSTR CMsnProto::MSN_GetGroupById(const char* pId)
{
- ServerGroupItem* p = grpList.find((ServerGroupItem*)&pId);
+ ServerGroupItem* p = m_arGroups.find((ServerGroupItem*)&pId);
return p ? p->name : NULL;
}
@@ -107,8 +107,8 @@ LPCSTR CMsnProto::MSN_GetGroupById(const char* pId) LPCSTR CMsnProto::MSN_GetGroupByName(const char* pName)
{
- for (int i = 0; i < grpList.getCount(); i++) {
- const ServerGroupItem* p = grpList[i];
+ for (int i = 0; i < m_arGroups.getCount(); i++) {
+ const ServerGroupItem* p = m_arGroups[i];
if (strcmp(p->name, pName) == 0)
return p->id;
}
@@ -121,7 +121,7 @@ LPCSTR CMsnProto::MSN_GetGroupByName(const char* pName) void CMsnProto::MSN_SetGroupName(const char* pId, const char* pNewName)
{
- ServerGroupItem* p = grpList.find((ServerGroupItem*)&pId);
+ ServerGroupItem* p = m_arGroups.find((ServerGroupItem*)&pId);
if (p != NULL)
replaceStr(p->name, pNewName);
}
@@ -175,7 +175,7 @@ void CMsnProto::MSN_RemoveEmptyGroups(void) {
if (!MyOptions.ManageServer) return;
- unsigned *cCount = (unsigned*)mir_calloc(grpList.getCount() * sizeof(unsigned));
+ unsigned *cCount = (unsigned*)mir_calloc(m_arGroups.getCount() * sizeof(unsigned));
int count = -1;
for (;;) {
@@ -185,13 +185,13 @@ void CMsnProto::MSN_RemoveEmptyGroups(void) char szGroupID[100];
if (!db_get_static(msc->hContact, m_szModuleName, "GroupID", szGroupID, sizeof(szGroupID))) {
const char *pId = szGroupID;
- int i = grpList.getIndex((ServerGroupItem*)&pId);
+ int i = m_arGroups.getIndex((ServerGroupItem*)&pId);
if (i > -1) ++cCount[i];
}
}
- for (int i = grpList.getCount(); i--;) {
- if (cCount[i] == 0) MSN_DeleteServerGroup(grpList[i]->id);
+ for (int i = m_arGroups.getCount(); i--;) {
+ if (cCount[i] == 0) MSN_DeleteServerGroup(m_arGroups[i]->id);
}
mir_free(cCount);
}
|