summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-10-28 08:32:01 +0000
committerRobert Pösel <robyer@seznam.cz>2015-10-28 08:32:01 +0000
commit2ec5040dda86f76532d48302fede21866916954a (patch)
tree698107b99b7778977da70d99f2b268a2c09de813 /protocols/Tlen/src
parent94fa24ec096e8e5f828e7028100ec542144443c7 (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/Tlen/src')
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 4e4f992347..5c8fa5d869 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -867,15 +867,15 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam)
if (hContact == NULL) return 0;
if (!isConnected) return 0;
- if (!mir_strcmp(cws->szModule, "CList")) {
+ if (!strcmp(cws->szModule, "CList")) {
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
char *nick, *jid, *group;
char *szProto = GetContactProto(hContact);
- if (szProto == NULL || mir_strcmp(szProto, m_szModuleName)) return 0;
+ if (szProto == NULL || strcmp(szProto, m_szModuleName)) return 0;
// A contact's group is changed
- if (!mir_strcmp(cws->szSetting, "Group")) {
+ if (!strcmp(cws->szSetting, "Group")) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
if ((item = TlenListGetItemPtr(this, LIST_ROSTER, dbv.pszVal)) != NULL) {
db_free(&dbv);
@@ -897,7 +897,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam)
}
else if (cws->value.pszVal != NULL) {
char *newGroup = settingToChar(cws);
- if (item->group == NULL || mir_strcmp(newGroup, item->group)) {
+ if (item->group == NULL || strcmp(newGroup, item->group)) {
debugLogA("Group set to %s", newGroup);
if ((group = TlenGroupEncode(newGroup)) != NULL) {
TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, item->jid, group);
@@ -915,12 +915,12 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam)
}
}
// A contact is renamed
- else if (!mir_strcmp(cws->szSetting, "MyHandle")) {
+ else if (!strcmp(cws->szSetting, "MyHandle")) {
char *newNick;
// hContact = (MCONTACT) wParam;
// szProto = GetContactProto(hContact);
- // if (szProto == NULL || mir_strcmp(szProto, proto->m_szModuleName)) return 0;
+ // if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
jid = dbv.pszVal;
@@ -935,7 +935,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam)
newNick = NULL;
}
// Note: we need to compare with item->nick to prevent infinite loop
- if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && mir_strcmp(item->nick, newNick)))) {
+ if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && strcmp(item->nick, newNick)))) {
if ((nick = TlenTextEncode(newNick)) != NULL) {
debugLogA("Nick set to %s", newNick);
if (item->group != NULL && (group = TlenGroupEncode(item->group)) != NULL) {
@@ -954,7 +954,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam)
}
}
// A temporary contact has 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)) {
ptrA szJid(db_get_sa(hContact, m_szModuleName, "jid"));
if (szJid != NULL) {