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 /protocols/MRA | |
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 'protocols/MRA')
-rw-r--r-- | protocols/MRA/src/Mra_svcs.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 4b74f823a0..4b99db4956 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -196,9 +196,9 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) // ýòî íàø êîíòàêò, îí íå âðåìåííûé (åñòü â ñïèñêå íà ñåðâåðå) è åãî îáíîâëåíèå ðàçðåøåíî
if (IsContactMra(hContact) && !db_get_b(hContact, "CList", "NotOnList", 0) && getDword(hContact, "HooksLocked", FALSE) == FALSE) {
- if (!mir_strcmp(cws->szModule, "CList")) {
+ if (!strcmp(cws->szModule, "CList")) {
// MyHandle setting
- if (!mir_strcmp(cws->szSetting, "MyHandle")) {
+ if (!strcmp(cws->szSetting, "MyHandle")) {
// always store custom nick
CMStringW wszNick;
if (cws->value.type == DBVT_DELETED) {
@@ -222,7 +222,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Group setting
- else if (!mir_strcmp(cws->szSetting, "Group")) {
+ else if (!strcmp(cws->szSetting, "Group")) {
CMStringW wszGroup;
// manage group on server
switch (cws->value.type) {
@@ -243,7 +243,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// NotOnList setting. Has a temporary contact just been added permanently?
- else if (!mir_strcmp(cws->szSetting, "NotOnList")) {
+ else if (!strcmp(cws->szSetting, "NotOnList")) {
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) {
CMStringW wszAuthMessage;
if (!mraGetStringW(NULL, "AuthMessage", wszAuthMessage))
@@ -259,7 +259,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Hidden setting
- else if (!mir_strcmp(cws->szSetting, "Hidden")) {
+ else if (!strcmp(cws->szSetting, "Hidden")) {
DWORD dwContactFlag = GetContactFlags(hContact);
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
dwContactFlag &= ~CONTACT_FLAG_SHADOW;
@@ -270,8 +270,8 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Ignore section
- else if (!mir_strcmp(cws->szModule, "Ignore")) {
- if (!mir_strcmp(cws->szSetting, "Mask1")) {
+ else if (!strcmp(cws->szModule, "Ignore")) {
+ if (!strcmp(cws->szSetting, "Mask1")) {
DWORD dwContactFlag = GetContactFlags(hContact);
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_DWORD && cws->value.dVal&IGNOREEVENT_MESSAGE) == 0)
dwContactFlag &= ~CONTACT_FLAG_IGNORE;
@@ -282,8 +282,8 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// User info section
- else if (!mir_strcmp(cws->szModule, "UserInfo")) {
- if (!mir_strcmp(cws->szSetting, "MyPhone0") || !mir_strcmp(cws->szSetting, "MyPhone1") || !mir_strcmp(cws->szSetting, "MyPhone2"))
+ else if (!strcmp(cws->szModule, "UserInfo")) {
+ if (!strcmp(cws->szSetting, "MyPhone0") || !strcmp(cws->szSetting, "MyPhone1") || !strcmp(cws->szSetting, "MyPhone2"))
MraModifyContact(hContact);
}
}
|