Bug 784739 - Switch from NULL to nullptr in gfx/ipc/; r=ehsan
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Sat, 20 Jul 2013 11:48:55 +0300
changeset 139453 e9b535ce91ae99b8331879886ca59015eda86c89
parent 139452 3638943416ab1e011e2dcace998a0bad86a01c07
child 139454 aa06df37ebbab611faf3c1296ac82e3ea9eaad92
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersehsan
bugs784739
milestone25.0a1
Bug 784739 - Switch from NULL to nullptr in gfx/ipc/; r=ehsan
gfx/ipc/SharedDIBSurface.cpp
gfx/ipc/SharedDIBWin.cpp
--- a/gfx/ipc/SharedDIBSurface.cpp
+++ b/gfx/ipc/SharedDIBSurface.cpp
@@ -45,17 +45,17 @@ SharedDIBSurface::InitSurface(uint32_t a
   long stride = long(aWidth * kBytesPerPixel);
   unsigned char* data = reinterpret_cast<unsigned char*>(mSharedDIB.GetBits());
 
   gfxImageFormat format = aTransparent ? ImageFormatARGB32 : ImageFormatRGB24;
 
   gfxImageSurface::InitWithData(data, gfxIntSize(aWidth, aHeight),
                                 stride, format);
 
-  cairo_surface_set_user_data(mSurface, &SHAREDDIB_KEY, this, NULL);
+  cairo_surface_set_user_data(mSurface, &SHAREDDIB_KEY, this, nullptr);
 }
 
 bool
 SharedDIBSurface::IsSharedDIBSurface(gfxASurface* aSurface)
 {
   return aSurface &&
     aSurface->GetType() == gfxASurface::SurfaceTypeImage &&
     aSurface->GetData(&SHAREDDIB_KEY);
--- a/gfx/ipc/SharedDIBWin.cpp
+++ b/gfx/ipc/SharedDIBWin.cpp
@@ -35,18 +35,18 @@ SharedDIBWin::Close()
     ::SelectObject(mSharedHdc, mOldObj);
 
   if (mSharedHdc)
     ::DeleteObject(mSharedHdc);
 
   if (mSharedBmp)
     ::DeleteObject(mSharedBmp);
 
-  mSharedHdc = NULL;
-  mOldObj = mSharedBmp = NULL;
+  mSharedHdc = nullptr;
+  mOldObj = mSharedBmp = nullptr;
 
   SharedDIB::Close();
 
   return NS_OK;
 }
 
 nsresult
 SharedDIBWin::Create(HDC aHdc, uint32_t aWidth, uint32_t aHeight,
@@ -78,17 +78,17 @@ SharedDIBWin::Attach(Handle aHandle, uin
 
   BITMAPV4HEADER bmih;
   SetupBitmapHeader(aWidth, aHeight, aTransparent, &bmih);
 
   nsresult rv = SharedDIB::Attach(aHandle, 0);
   if (NS_FAILED(rv))
     return rv;
 
-  if (NS_FAILED(SetupSurface(NULL, &bmih))) {
+  if (NS_FAILED(SetupSurface(nullptr, &bmih))) {
     Close();
     return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 uint32_t