diff options
Diffstat (limited to 'plugins/FloatingContacts')
-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;
|