Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.cc
diff --git a/webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.cc b/webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.cc
index 5dcbc52a9e9553d87a0cfc18a13b48e7418785fe..ca8bcaa6d8d0a17868415f5ab1d0ec619a679036 100644
--- a/webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.cc
+++ b/webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.cc
@@ -15,9 +15,7 @@
namespace webrtc {
ScopedPixelBufferObject::ScopedPixelBufferObject()
- : cgl_context_(NULL),
- pixel_buffer_object_(0) {
-}
+ : cgl_context_(nullptr), pixel_buffer_object_(0) {}
ScopedPixelBufferObject::~ScopedPixelBufferObject() {
Release();
@@ -30,14 +28,14 @@ bool ScopedPixelBufferObject::Init(CGLContextObj cgl_context,
glGenBuffersARB(1, &pixel_buffer_object_);
if (glGetError() == GL_NO_ERROR) {
glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, pixel_buffer_object_);
- glBufferDataARB(GL_PIXEL_PACK_BUFFER_ARB, size_in_bytes, NULL,
+ glBufferDataARB(GL_PIXEL_PACK_BUFFER_ARB, size_in_bytes, nullptr,
GL_STREAM_READ_ARB);
glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0);
if (glGetError() != GL_NO_ERROR) {
Release();
}
} else {
- cgl_context_ = NULL;
+ cgl_context_ = nullptr;
pixel_buffer_object_ = 0;
}
return pixel_buffer_object_ != 0;
@@ -47,7 +45,7 @@ void ScopedPixelBufferObject::Release() {
if (pixel_buffer_object_) {
CGLContextObj CGL_MACRO_CONTEXT = cgl_context_;
glDeleteBuffersARB(1, &pixel_buffer_object_);
- cgl_context_ = NULL;
+ cgl_context_ = nullptr;
pixel_buffer_object_ = 0;
}
}

Powered by Google App Engine
This is Rietveld 408576698