diff options
Diffstat (limited to 'plugins/FloatingContacts/src/bitmap_funcs.cpp')
| -rw-r--r-- | plugins/FloatingContacts/src/bitmap_funcs.cpp | 46 | 
1 files changed, 23 insertions, 23 deletions
diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp index 577bd7ecc7..f49cc3d69c 100644 --- a/plugins/FloatingContacts/src/bitmap_funcs.cpp +++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp @@ -36,30 +36,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  MyBitmap::MyBitmap()
  {
 -	dcBmp = 0;
 -	hBmp = 0;
 -	bits = 0;
 +	dcBmp = nullptr;
 +	hBmp = nullptr;
 +	bits = nullptr;
  	width = height = 0;
 -	bitsSave = 0;
 +	bitsSave = nullptr;
  }
  MyBitmap::MyBitmap(int w, int h)
  {
 -	dcBmp = 0;
 -	hBmp = 0;
 -	bits = 0;
 +	dcBmp = nullptr;
 +	hBmp = nullptr;
 +	bits = nullptr;
  	width = height = 0;
 -	bitsSave = 0;
 +	bitsSave = nullptr;
  	allocate(w, h);
  }
  MyBitmap::MyBitmap(const char *fn, const char *fnAlpha)
  {
 -	dcBmp = 0;
 -	hBmp = 0;
 -	bits = 0;
 +	dcBmp = nullptr;
 +	hBmp = nullptr;
 +	bits = nullptr;
  	width = height = 0;
 -	bitsSave = 0;
 +	bitsSave = nullptr;
  	loadFromFile(fn, fnAlpha);
  }
 @@ -174,7 +174,7 @@ void MyBitmap::restoreAlpha(int x, int y, int w, int h)  	}
  	delete[] bitsSave;
 -	bitsSave = 0;
 +	bitsSave = nullptr;
  }
  void MyBitmap::DrawBits(COLOR32 *inbits, int inw, int inh, int x, int y, int w, int h)
 @@ -686,7 +686,7 @@ void MyBitmap::DrawIcon(HICON hic, int x, int y, int w, int h)  	}
  	else {
  		this->saveAlpha(x, y, w, h);
 -		DrawIconEx(this->getDC(), x, y, hic, w, h, 0, NULL, DI_NORMAL);
 +		DrawIconEx(this->getDC(), x, y, hic, w, h, 0, nullptr, DI_NORMAL);
  		this->restoreAlpha(x, y, w, h);
  	}
 @@ -726,7 +726,7 @@ void MyBitmap::DrawText(wchar_t *str, int x, int y, int blur, int strength)  	RECT rc; SetRect(&rc, 0, 0, sz.cx, sz.cy);
  	SetTextColor(tmp.getDC(), RGB(255, 255, 255));
  	SetBkColor(tmp.getDC(), RGB(0, 0, 0));
 -	ExtTextOutA(tmp.getDC(), 0, 0, ETO_OPAQUE, &rc, "", 0, NULL);
 +	ExtTextOutA(tmp.getDC(), 0, 0, ETO_OPAQUE, &rc, "", 0, nullptr);
  	::DrawText(tmp.getDC(), str, -1, &rc, DT_CENTER | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER);
  	SelectObject(tmp.getDC(), hfnTmp);
 @@ -872,7 +872,7 @@ HRGN MyBitmap::buildOpaqueRgn(int level, bool opaque)  	}
 -	HRGN hRgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount*sizeof(RECT), (LPRGNDATA)pRgnData);
 +	HRGN hRgn = ExtCreateRegion(nullptr, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount*sizeof(RECT), (LPRGNDATA)pRgnData);
  	delete[] pRgnData;
  	return hRgn;
  }
 @@ -940,9 +940,9 @@ bool MyBitmap::loadFromFile_default(const char *fn, const char *fnAlpha)  		return false;
  	BITMAP bm; GetObject(hBmpLoaded, sizeof(bm), &bm);
 -	SetBitmapDimensionEx(hBmpLoaded, bm.bmWidth, bm.bmHeight, NULL);
 +	SetBitmapDimensionEx(hBmpLoaded, bm.bmWidth, bm.bmHeight, nullptr);
 -	HDC dcTmp = CreateCompatibleDC(0);
 +	HDC dcTmp = CreateCompatibleDC(nullptr);
  	GetBitmapDimensionEx(hBmpLoaded, &sz);
  	HBITMAP hBmpDcSave = (HBITMAP)SelectObject(dcTmp, hBmpLoaded);
 @@ -997,8 +997,8 @@ void MyBitmap::allocate(int w, int h)  		DeleteDC(dcBmp);
  	}
 -	hBmp = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, (void **)&bits, 0, 0);
 -	dcBmp = CreateCompatibleDC(0);
 +	hBmp = (HBITMAP)CreateDIBSection(nullptr, &bi, DIB_RGB_COLORS, (void **)&bits, nullptr, 0);
 +	dcBmp = CreateCompatibleDC(nullptr);
  	hBmpSave = (HBITMAP)SelectObject(dcBmp, hBmp);
  	GdiFlush();
 @@ -1011,9 +1011,9 @@ void MyBitmap::free()  	DeleteObject(SelectObject(dcBmp, hBmpSave));
  	DeleteDC(dcBmp);
 -	dcBmp = 0;
 -	hBmp = 0;
 -	bits = 0;
 +	dcBmp = nullptr;
 +	hBmp = nullptr;
 +	bits = nullptr;
  	width = height = 0;
  }
  | 
