diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-04 19:26:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-04 19:26:46 +0000 |
commit | fba57c10d9f9552c9c31c20283147348789ef650 (patch) | |
tree | 165c4c7ed8fad3c092bf455abf99af4a7a058383 /plugins/FloatingContacts/src | |
parent | 73504917190e8d183212ec62ad1668d3e72901a7 (diff) |
some code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7499 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FloatingContacts/src')
-rw-r--r-- | plugins/FloatingContacts/src/bitmap_funcs.cpp | 7 | ||||
-rw-r--r-- | plugins/FloatingContacts/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/FloatingContacts/src/thumbs.cpp | 18 |
3 files changed, 11 insertions, 16 deletions
diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp index 36fb31a185..b6dc796822 100644 --- a/plugins/FloatingContacts/src/bitmap_funcs.cpp +++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp @@ -65,8 +65,7 @@ MyBitmap::MyBitmap(const char *fn, const char *fnAlpha) MyBitmap::~MyBitmap()
{
- if (bitsSave)
- delete [] bitsSave;
+ delete [] bitsSave;
free();
}
@@ -125,8 +124,7 @@ void MyBitmap::makeOpaqueRect(int x1, int y1, int x2, int y2) void MyBitmap::saveAlpha(int x, int y, int w, int h)
{
- if (bitsSave)
- delete [] bitsSave;
+ delete [] bitsSave;
GdiFlush();
@@ -670,7 +668,6 @@ void MyBitmap::Blur(int w, int h) src = buf_src;
tmp = buf_tmp;
- dst = buf_dst;
float mul = 1.f/((w*2+1)*(h*2+1));
for (y = 0;y<height;y++)
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index ec0e266b33..9e2892a204 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -655,7 +655,7 @@ void RegHotkey(HANDLE hContact, HWND hwnd) strncpy(szBuf, dbv.pszVal, MAX_PATH - 1);
db_free( &dbv );
- if ( 0 != strlen( szBuf )) {
+ if (szBuf[0] != '\0') {
UINT nModifiers = 0;
char chKey = 0;
char szMod[2][20] = {0};
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index ae14979ff0..ecbe70c6bb 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -774,17 +774,15 @@ ThumbInfo *ThumbList::AddThumb(HWND hwnd, TCHAR *ptszName, HANDLE hContact) return NULL;
ThumbInfo *pThumb = new ThumbInfo;
- if (pThumb != NULL) {
- _tcsncpy( pThumb->ptszName, ptszName, USERNAME_LEN - 1);
- pThumb->hContact = hContact;
- pThumb->hwnd = hwnd;
-
- pThumb->dockOpt.hwndLeft = NULL;
- pThumb->dockOpt.hwndRight = NULL;
+ _tcsncpy( pThumb->ptszName, ptszName, USERNAME_LEN - 1);
+ pThumb->hContact = hContact;
+ pThumb->hwnd = hwnd;
- pThumb->fTipActive = FALSE;
- RegHotkey(hContact, hwnd);
- }
+ pThumb->dockOpt.hwndLeft = NULL;
+ pThumb->dockOpt.hwndRight = NULL;
+
+ pThumb->fTipActive = FALSE;
+ RegHotkey(hContact, hwnd);
insert(pThumb);
return pThumb;
|