diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-20 18:37:03 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-20 18:37:03 +0000 |
commit | 4ad5767f652e0ffd3ebf7df8d8f62a682277faa1 (patch) | |
tree | 009f4d4267d0d4e451b74140125b5816701860fb /protocols/JabberG/src/jabber_icolib.cpp | |
parent | 8761e793032de3e266a0cb9582327367c6172467 (diff) |
- numerous fixes for ineffective xmlGetText() calls;
- common picture type detection code extracted to the separate function;
- code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@5431 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_icolib.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_icolib.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index c30a57cfe4..43559692f2 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -41,7 +41,7 @@ HIMAGELIST hAdvancedStatusIcon = NULL; struct CTransportProtoTableItem
{
- TCHAR* mask;
+ TCHAR *mask;
char* proto;
};
@@ -234,7 +234,7 @@ static BOOL MatchMask(const TCHAR *name, const TCHAR *mask) if (*mask != '|')
return WildComparei(name, mask);
- TCHAR* temp = NEWTSTR_ALLOCA(mask);
+ TCHAR *temp = NEWTSTR_ALLOCA(mask);
for (int e=1; mask[e] != '\0'; e++) {
int s = e;
while (mask[e] != '\0' && mask[e] != '|')
@@ -259,13 +259,13 @@ static HICON ExtractIconFromPath(const char *path, BOOL * needFree) HICON hIcon;
lstrcpynA(file,path,sizeof(file));
comma=strrchr(file,',');
- if (comma==NULL) n=0;
+ if (comma == NULL) n=0;
else {n=atoi(comma+1); *comma=0;}
PathToAbsolute(file, fileFull);
hIcon=NULL;
ExtractIconExA(fileFull,n,NULL,&hIcon,1);
if (needFree)
- *needFree=(hIcon!=NULL);
+ *needFree=(hIcon != NULL);
return hIcon;
}
@@ -277,7 +277,7 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa if (needFree) *needFree=FALSE;
GetModuleFileNameA(NULL, szPath, MAX_PATH);
str=strrchr(szPath,'\\');
- if (str!=NULL) *str=0;
+ if (str != NULL) *str=0;
_snprintf(szMyPath, sizeof(szMyPath), "%s\\Icons\\%s", szPath, filename);
_snprintf(szFullPath, sizeof(szFullPath), "%s\\Icons\\%s,%d", szPath, filename, i);
BOOL nf;
@@ -427,15 +427,15 @@ BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR *jid, HANDLE hContact return FALSE;
// strip domain part from jid
- TCHAR* domain = _tcschr((TCHAR*)jid, '@');
+ TCHAR *domain = _tcschr((TCHAR*)jid, '@');
BOOL isAgent = (domain == NULL) ? TRUE : FALSE;
BOOL isTransported = FALSE;
- if (domain!=NULL)
+ if (domain != NULL)
domain = NEWTSTR_ALLOCA(domain+1);
else
domain = NEWTSTR_ALLOCA(jid);
- TCHAR* resourcepos = _tcschr(domain, '/');
+ TCHAR *resourcepos = _tcschr(domain, '/');
if (resourcepos != NULL)
*resourcepos = '\0';
|