diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-10-28 08:32:01 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-10-28 08:32:01 +0000 |
commit | 2ec5040dda86f76532d48302fede21866916954a (patch) | |
tree | 698107b99b7778977da70d99f2b268a2c09de813 /plugins/Clist_modern/src/modern_clc.cpp | |
parent | 94fa24ec096e8e5f828e7028100ec542144443c7 (diff) |
Optimize ME_DB_CONTACT_SETTINGCHANGED functions to not use mir_strcmp() but just strcmp() (and similar methods)
It's not needed to user mir_* for checking null pointers when we're comparing const strings with DBCONTACTWRITESETTING values which should be always initialized correctly.
Somewhere also changed strcmpi to just strcmp, because these settings are case-sensitive anyway.
git-svn-id: http://svn.miranda-ng.org/main/trunk@15631 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clc.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 1f2aa2393c..260b131276 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -128,40 +128,40 @@ static int clcHookSettingChanged(WPARAM hContact, LPARAM lParam) DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; if (hContact == NULL) { - if (!mir_strcmp(cws->szModule, "CListGroups")) + if (!strcmp(cws->szModule, "CListGroups")) pcli->pfnClcBroadcast(INTM_GROUPSCHANGED, hContact, lParam); - else if (!mir_strcmp(cws->szSetting, "XStatusId") || !mir_strcmp(cws->szSetting, "XStatusName")) + else if (!strcmp(cws->szSetting, "XStatusId") || !strcmp(cws->szSetting, "XStatusName")) cliCluiProtocolStatusChanged(0, cws->szModule); - else if (!mir_strcmp(cws->szModule, "CList")) { - if (!mir_strcmp(cws->szSetting, "OnTop"))
+ else if (!strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szSetting, "OnTop"))
SetWindowPos(pcli->hwndContactList, cws->value.bVal ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
} else { - if (!mir_strcmp(cws->szSetting, "TickTS")) + if (!strcmp(cws->szSetting, "TickTS")) pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0); - else if (!mir_strcmp(cws->szModule, "UserInfo")) { - if (!mir_strcmp(cws->szSetting, "Timezone")) + else if (!strcmp(cws->szModule, "UserInfo")) { + if (!strcmp(cws->szSetting, "Timezone")) pcli->pfnClcBroadcast(INTM_TIMEZONECHANGED, hContact, 0); } - else if (!mir_strcmp(cws->szModule, "CList")) { - if (!mir_strcmp(cws->szSetting, "StatusMsg")) + else if (!strcmp(cws->szModule, "CList")) { + if (!strcmp(cws->szSetting, "StatusMsg")) pcli->pfnClcBroadcast(INTM_STATUSMSGCHANGED, hContact, 0); } - else if (!mir_strcmp(cws->szModule, "ContactPhoto")) { - if (!mir_strcmp(cws->szSetting, "File")) + else if (!strcmp(cws->szModule, "ContactPhoto")) { + if (!strcmp(cws->szSetting, "File")) pcli->pfnClcBroadcast(INTM_AVATARCHANGED, hContact, 0); } else { - if ((!mir_strcmp(cws->szSetting, "XStatusName") || !mir_strcmp(cws->szSetting, "XStatusMsg"))) + if ((!strcmp(cws->szSetting, "XStatusName") || !strcmp(cws->szSetting, "XStatusMsg"))) pcli->pfnClcBroadcast(INTM_STATUSMSGCHANGED, hContact, 0); - else if (!mir_strcmp(cws->szSetting, "XStatusId")) + else if (!strcmp(cws->szSetting, "XStatusId")) pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0); - else if (!mir_strcmp(cws->szSetting, "Timezone")) + else if (!strcmp(cws->szSetting, "Timezone")) pcli->pfnClcBroadcast(INTM_TIMEZONECHANGED, hContact, 0); - else if (!mir_strcmp(cws->szSetting, "ListeningTo")) + else if (!strcmp(cws->szSetting, "ListeningTo")) pcli->pfnClcBroadcast(INTM_STATUSMSGCHANGED, hContact, 0); - else if (!mir_strcmp(cws->szSetting, "Transport") || !mir_strcmp(cws->szSetting, "IsTransported")) { + else if (!strcmp(cws->szSetting, "Transport") || !strcmp(cws->szSetting, "IsTransported")) { pcli->pfnInvalidateDisplayNameCacheEntry(hContact); pcli->pfnClcBroadcast(CLM_AUTOREBUILD, hContact, 0); } |