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

Unified Diff: cc/test/test_web_graphics_context_3d.cc

Issue 634243003: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr [part-4] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formating fix. Created 6 years, 2 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: cc/test/test_web_graphics_context_3d.cc
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index ccca7db8c7617bd0c4b9663fa24418ca4e8235b8..f00869154cc0d70c758b40c2a11438eecd00d232 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -29,7 +29,7 @@ static base::LazyInstance<base::Lock>::Leaky
g_shared_namespace_lock = LAZY_INSTANCE_INITIALIZER;
TestWebGraphicsContext3D::Namespace*
- TestWebGraphicsContext3D::shared_namespace_ = NULL;
+ TestWebGraphicsContext3D::shared_namespace_ = nullptr;
TestWebGraphicsContext3D::Namespace::Namespace()
: next_buffer_id(1),
@@ -40,7 +40,7 @@ TestWebGraphicsContext3D::Namespace::Namespace()
TestWebGraphicsContext3D::Namespace::~Namespace() {
g_shared_namespace_lock.Get().AssertAcquired();
if (shared_namespace_ == this)
- shared_namespace_ = NULL;
+ shared_namespace_ = nullptr;
}
// static
@@ -64,7 +64,7 @@ TestWebGraphicsContext3D::TestWebGraphicsContext3D()
width_(0),
height_(0),
scale_factor_(-1.f),
- test_support_(NULL),
+ test_support_(nullptr),
last_update_type_(NoUpdate),
next_insert_sync_point_(1),
last_waited_sync_point_(0),
@@ -75,7 +75,7 @@ TestWebGraphicsContext3D::TestWebGraphicsContext3D()
TestWebGraphicsContext3D::~TestWebGraphicsContext3D() {
base::AutoLock lock(g_shared_namespace_lock.Get());
- namespace_ = NULL;
+ namespace_ = nullptr;
}
void TestWebGraphicsContext3D::CreateNamespace() {
@@ -510,7 +510,7 @@ void TestWebGraphicsContext3D::bufferData(GLenum target,
buffer->pixels.reset(new uint8[size]);
buffer->size = size;
- if (data != NULL)
+ if (data != nullptr)
memcpy(buffer->pixels.get(), data, size);
if (buffer->target == GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM)
current_used_transfer_buffer_usage_bytes_ += buffer->size - old_size;
@@ -527,7 +527,7 @@ void* TestWebGraphicsContext3D::mapBufferCHROMIUM(GLenum target,
DCHECK_EQ(target, buffers.get(bound_buffer_)->target);
if (times_map_buffer_chromium_succeeds_ >= 0) {
if (!times_map_buffer_chromium_succeeds_) {
- return NULL;
+ return nullptr;
}
--times_map_buffer_chromium_succeeds_;
}
@@ -579,7 +579,7 @@ void* TestWebGraphicsContext3D::mapImageCHROMIUM(GLuint image_id) {
DCHECK_GT(images.count(image_id), 0u);
if (times_map_image_chromium_succeeds_ >= 0) {
if (!times_map_image_chromium_succeeds_) {
- return NULL;
+ return nullptr;
}
--times_map_image_chromium_succeeds_;
}

Powered by Google App Engine
This is Rietveld 408576698