From 47f236d396ead60f96491515befa1b9e52f5aaa6 Mon Sep 17 00:00:00 2001 From: "dcheng@chromium.org" Date: Thu, 13 Jun 2013 13:42:30 +0000 Subject: Rewrite scoped_ptr(NULL) to use the default ctor in content/. This is the result of running the rewrite_scoped_ptr_ctor_null tool across all files built on Linux in the content/ directory. BUG=173286 Review URL: https://chromiumcodereview.appspot.com/16703020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206062 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/cc_messages.cc | 2 +- content/common/gpu/gpu_channel_manager.cc | 6 +++--- content/common/gpu/gpu_memory_manager_unittest.cc | 22 +++++++++------------- .../gpu/media/gpu_video_decode_accelerator.cc | 6 ++---- 4 files changed, 15 insertions(+), 21 deletions(-) (limited to 'content/common') diff --git a/content/common/cc_messages.cc b/content/common/cc_messages.cc index 43b6ce1..7983216 100644 --- a/content/common/cc_messages.cc +++ b/content/common/cc_messages.cc @@ -379,7 +379,7 @@ static scoped_ptr ReadDrawQuad(const Message* m, PickleIterator* iter) { scoped_ptr quad = QuadType::Create(); if (!ReadParam(m, iter, quad.get())) - return scoped_ptr(NULL).template PassAs(); + return scoped_ptr().template PassAs(); return quad.template PassAs(); } diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc index 8c040c2..6bda5b84 100644 --- a/content/common/gpu/gpu_channel_manager.cc +++ b/content/common/gpu/gpu_channel_manager.cc @@ -38,10 +38,10 @@ GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, shutdown_event_(shutdown_event), gpu_child_thread_(gpu_child_thread), gpu_memory_manager_( - this, GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit), + this, + GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit), watchdog_(watchdog), - sync_point_manager_(new SyncPointManager), - program_cache_(NULL) { + sync_point_manager_(new SyncPointManager) { DCHECK(gpu_child_thread); DCHECK(io_message_loop); DCHECK(shutdown_event); diff --git a/content/common/gpu/gpu_memory_manager_unittest.cc b/content/common/gpu/gpu_memory_manager_unittest.cc index 743ce21..2c601c9 100644 --- a/content/common/gpu/gpu_memory_manager_unittest.cc +++ b/content/common/gpu/gpu_memory_manager_unittest.cc @@ -80,11 +80,10 @@ class FakeClient : public GpuMemoryManagerClient { // This will create a client with no surface FakeClient(GpuMemoryManager* memmgr, GpuMemoryManagerClient* share_group) - : memmgr_(memmgr) - , total_gpu_memory_(0) - , share_group_(share_group) - , memory_tracker_(NULL) - , tracking_group_(NULL) { + : memmgr_(memmgr), + total_gpu_memory_(0), + share_group_(share_group), + memory_tracker_(NULL) { if (!share_group_) { memory_tracker_ = new FakeMemoryTracker(); tracking_group_.reset( @@ -94,14 +93,11 @@ class FakeClient : public GpuMemoryManagerClient { } // This will create a client with a surface - FakeClient(GpuMemoryManager* memmgr, - int32 surface_id, - bool visible) - : memmgr_(memmgr) - , total_gpu_memory_(0) - , share_group_(NULL) - , memory_tracker_(NULL) - , tracking_group_(NULL) { + FakeClient(GpuMemoryManager* memmgr, int32 surface_id, bool visible) + : memmgr_(memmgr), + total_gpu_memory_(0), + share_group_(NULL), + memory_tracker_(NULL) { memory_tracker_ = new FakeMemoryTracker(); tracking_group_.reset( memmgr_->CreateTrackingGroup(0, memory_tracker_.get())); diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc index 1d9afd4..f3bc4b8 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc @@ -55,13 +55,11 @@ static bool MakeDecoderContextCurrent( return true; } -GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator( - int32 host_route_id, - GpuCommandBufferStub* stub) +GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator(int32 host_route_id, + GpuCommandBufferStub* stub) : init_done_msg_(NULL), host_route_id_(host_route_id), stub_(stub), - video_decode_accelerator_(NULL), texture_target_(0) { DCHECK(stub_); stub_->AddDestructionObserver(this); -- cgit v1.1