summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_api.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-10 13:49:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-10 13:49:11 +0000
commit73efaa00c6044d77a6c098bec38057b231ef8243 (patch)
tree07237735ddf83c6cb011188b6c4b067bdcd6b5e3 /protocols/JabberG/src/jabber_api.cpp
parent183f4dfbadce9c687c66e5377274a464f6c9a72f (diff)
Jabber:
- these long static buffers replaced with CMString; - some crazy memory allocations in chats also replaced with CMString; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@7577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_api.cpp')
-rw-r--r--protocols/JabberG/src/jabber_api.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp
index 52cfc0f755..7cacaa4c21 100644
--- a/protocols/JabberG/src/jabber_api.cpp
+++ b/protocols/JabberG/src/jabber_api.cpp
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
INT_PTR __cdecl CJabberProto::JabberGetApi(WPARAM wParam, LPARAM lParam)
{
IJabberInterface **ji = (IJabberInterface**)lParam;
- if ( !ji)
+ if (!ji)
return -1;
*ji = this;
return 0;
@@ -52,7 +52,7 @@ DWORD CJabberProto::GetJabberVersion() const
int CJabberProto::CompareJIDs(LPCTSTR jid1, LPCTSTR jid2)
{
- if ( !jid1 || !jid2) return 0;
+ if (!jid1 || !jid2) return 0;
return JabberCompareJids(jid1, jid2);
}
@@ -206,7 +206,7 @@ int CJabberProto::RemoveHandler(HJHANDLER hHandler)
JabberFeatCapPairDynamic *CJabberProto::FindFeature(LPCTSTR szFeature)
{
for (int i=0; i < m_lstJabberFeatCapPairsDynamic.getCount(); i++)
- if ( !lstrcmp(m_lstJabberFeatCapPairsDynamic[i]->szFeature, szFeature))
+ if (!lstrcmp(m_lstJabberFeatCapPairsDynamic[i]->szFeature, szFeature))
return m_lstJabberFeatCapPairsDynamic[i];
return NULL;
@@ -214,18 +214,18 @@ JabberFeatCapPairDynamic *CJabberProto::FindFeature(LPCTSTR szFeature)
int CJabberProto::RegisterFeature(LPCTSTR szFeature, LPCTSTR szDescription)
{
- if ( !szFeature)
+ if (!szFeature)
return false;
// check for this feature in core features, and return false if it's present, to prevent re-registering a core feature
int i;
for (i=0; g_JabberFeatCapPairs[i].szFeature; i++)
- if ( !lstrcmp(g_JabberFeatCapPairs[i].szFeature, szFeature))
+ if (!lstrcmp(g_JabberFeatCapPairs[i].szFeature, szFeature))
return false;
mir_cslock lck(m_csLists);
JabberFeatCapPairDynamic *fcp = FindFeature(szFeature);
- if ( !fcp) { // if the feature is not registered yet, allocate new bit for it
+ if (!fcp) { // if the feature is not registered yet, allocate new bit for it
JabberCapsBits jcb = JABBER_CAPS_OTHER_SPECIAL; // set all bits not included in g_JabberFeatCapPairs
// set all bits occupied by g_JabberFeatCapPairs
@@ -240,7 +240,7 @@ int CJabberProto::RegisterFeature(LPCTSTR szFeature, LPCTSTR szDescription)
jcb = (~jcb) & (JabberCapsBits)(-(__int64)(~jcb));
// no more free bits
- if ( !jcb)
+ if (!jcb)
return false;
// remove unnecessary symbols from szFeature to make the string shorter, and use it as szExt
@@ -269,7 +269,7 @@ int CJabberProto::RegisterFeature(LPCTSTR szFeature, LPCTSTR szDescription)
int CJabberProto::AddFeatures(LPCTSTR szFeatures)
{
- if ( !szFeatures)
+ if (!szFeatures)
return false;
mir_cslockfull lck(m_csLists);
@@ -278,8 +278,8 @@ int CJabberProto::AddFeatures(LPCTSTR szFeatures)
while (szFeat[0]) {
JabberFeatCapPairDynamic *fcp = FindFeature(szFeat);
// if someone is trying to add one of core features, RegisterFeature() will return false, so we don't have to perform this check here
- if ( !fcp) { // if the feature is not registered yet
- if ( !RegisterFeature(szFeat, NULL))
+ if (!fcp) { // if the feature is not registered yet
+ if (!RegisterFeature(szFeat, NULL))
ret = false;
else
fcp = FindFeature(szFeat); // update fcp after RegisterFeature()
@@ -300,7 +300,7 @@ int CJabberProto::AddFeatures(LPCTSTR szFeatures)
int CJabberProto::RemoveFeatures(LPCTSTR szFeatures)
{
- if ( !szFeatures)
+ if (!szFeatures)
return false;
mir_cslockfull lck(m_csLists);