From c730f12da81f636ecf65aa656a46b9337daaa37a Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 14 Dec 2014 21:30:16 +0000 Subject: Clist_modern: changed warning lavel to w4 git-svn-id: http://svn.miranda-ng.org/main/trunk@11425 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_utils.cpp | 76 +++++++++++++++---------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'plugins/Clist_modern/src/modern_utils.cpp') diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp index f0f3f532a5..1dbd55bb5d 100644 --- a/plugins/Clist_modern/src/modern_utils.cpp +++ b/plugins/Clist_modern/src/modern_utils.cpp @@ -2,39 +2,39 @@ BYTE gl_TrimText = 1; -char * __cdecl strstri( char *a, const char *b) +char * __cdecl strstri(char *a, const char *b) { - char * x, *y; - if (!a || !b) return FALSE; - x = _strdup(a); - y = _strdup(b); - x = _strupr(x); - y = _strupr(y); - char * pos = strstr(x,y); - if ( pos ) - { - char * retval = a + ( pos - x ); - free(x); - free(y); - return retval; - } - free(x); - free(y); - return NULL; + char * x, *y; + if (!a || !b) return FALSE; + x = _strdup(a); + y = _strdup(b); + x = _strupr(x); + y = _strupr(y); + char * pos = strstr(x, y); + if (pos) + { + char * retval = a + (pos - x); + free(x); + free(y); + return retval; + } + free(x); + free(y); + return NULL; } BOOL __cdecl mir_bool_strcmpi(const char *a, const char *b) { if (a == NULL && b == NULL) return 1; - if (a == NULL || b == NULL) return _stricmp(a?a:"",b?b:"") == 0; - return _stricmp(a,b) == 0; + if (a == NULL || b == NULL) return _stricmp(a ? a : "", b ? b : "") == 0; + return _stricmp(a, b) == 0; } BOOL __cdecl mir_bool_tstrcmpi(const TCHAR *a, const TCHAR *b) { if (a == NULL && b == NULL) return 1; - if (a == NULL || b == NULL) return _tcsicmp(a?a:_T(""),b?b:_T("")) == 0; - return _tcsicmp(a,b) == 0; + if (a == NULL || b == NULL) return _tcsicmp(a ? a : _T(""), b ? b : _T("")) == 0; + return _tcsicmp(a, b) == 0; } #ifdef strlen @@ -45,13 +45,13 @@ BOOL __cdecl mir_bool_tstrcmpi(const TCHAR *a, const TCHAR *b) //copy len symbols from string - do not check is it null terminated or len is more then actual char * strdupn(const char * src, int len) { - char * p; - if (src == NULL) return NULL; - p = (char*)malloc(len+1); - if (!p) return 0; - memcpy(p,src,len); - p[len] = '\0'; - return p; + char * p; + if (src == NULL) return NULL; + p = (char*)malloc(len + 1); + if (!p) return 0; + memcpy(p, src, len); + p[len] = '\0'; + return p; } DWORD exceptFunction(LPEXCEPTION_POINTERS EP) @@ -63,7 +63,7 @@ DWORD exceptFunction(LPEXCEPTION_POINTERS EP) EP->ExceptionRecord->ExceptionAddress); TRACE(buf); - MessageBoxA(0, buf,"clist_mw Exception",0); + MessageBoxA(0, buf, "clist_mw Exception", 0); return EXCEPTION_EXECUTE_HANDLER; } @@ -82,18 +82,18 @@ void TRACE_ERROR() NULL, t, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) &lpMsgBuf, - 0, - NULL )) + (LPTSTR)&lpMsgBuf, + 0, + NULL)) { // Handle the error. - return ; + return; } #ifdef _DEBUG - MessageBox( NULL, (LPCTSTR)lpMsgBuf, _T("Error"), MB_OK | MB_ICONINFORMATION ); + MessageBox(NULL, (LPCTSTR)lpMsgBuf, _T("Error"), MB_OK | MB_ICONINFORMATION); DebugBreak(); #endif - LocalFree( lpMsgBuf ); + LocalFree(lpMsgBuf); } BOOL DebugDeleteObject(HGDIOBJ a) @@ -110,11 +110,11 @@ BOOL DebugDeleteObject(HGDIOBJ a) // load small icon (not shared) it IS NEED to be destroyed HICON LoadSmallIcon(HINSTANCE hInstance, int index) { - TCHAR filename[MAX_PATH] = {0}; + TCHAR filename[MAX_PATH] = { 0 }; GetModuleFileName(hInstance, filename, MAX_PATH); HICON hIcon = NULL; - ExtractIconEx(filename, index, NULL, &hIcon, 1); + ExtractIconEx(filename, index, NULL, &hIcon, 1); return hIcon; } -- cgit v1.2.3