From 4b37127414225ef6a85b910643d76e3dbb739e12 Mon Sep 17 00:00:00 2001 From: steweg Date: Sun, 9 Apr 2017 09:09:06 -0700 Subject: [PATCH] Fix compilation issues of std::unique_ptr This patch fixes compilation issues related to usage of std::unique_ptr and NULL instead of nullptr. This issue pops up once you would try to compile whole webrtc with using C++14 and gcc-4.9 BUG=webrtc:7461 Review-Url: https://codereview.webrtc.org/2806693004 Cr-Commit-Position: refs/heads/master@{#17600} --- AUTHORS | 1 + webrtc/p2p/base/transportdescription.h | 2 +- webrtc/pc/videocapturertracksource.cc | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 3ed6b6c1eb..32cff7bd7a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -46,6 +46,7 @@ Steve Reid Vladimir Beloborodov Vicken Simonian Victor Costan +Stefan Gula &yet LLC <*@andyet.com> Agora IO <*@agora.io> diff --git a/webrtc/p2p/base/transportdescription.h b/webrtc/p2p/base/transportdescription.h index e7f9263b3e..6f4e9a4bf1 100644 --- a/webrtc/p2p/base/transportdescription.h +++ b/webrtc/p2p/base/transportdescription.h @@ -147,7 +147,7 @@ struct TransportDescription { void AddOption(const std::string& option) { transport_options.push_back(option); } - bool secure() const { return identity_fingerprint != NULL; } + bool secure() const { return identity_fingerprint != nullptr; } IceParameters GetIceParameters() { return IceParameters(ice_ufrag, ice_pwd, HasOption(ICE_RENOMINATION_STR)); diff --git a/webrtc/pc/videocapturertracksource.cc b/webrtc/pc/videocapturertracksource.cc index 2c64b42a07..216362b188 100644 --- a/webrtc/pc/videocapturertracksource.cc +++ b/webrtc/pc/videocapturertracksource.cc @@ -262,7 +262,7 @@ rtc::scoped_refptr VideoCapturerTrackSource::Create( const webrtc::MediaConstraintsInterface* constraints, bool remote) { RTC_DCHECK(worker_thread != NULL); - RTC_DCHECK(capturer != NULL); + RTC_DCHECK(capturer != nullptr); rtc::scoped_refptr source( new rtc::RefCountedObject( worker_thread, std::move(capturer), remote)); @@ -275,7 +275,7 @@ rtc::scoped_refptr VideoCapturerTrackSource::Create( std::unique_ptr capturer, bool remote) { RTC_DCHECK(worker_thread != NULL); - RTC_DCHECK(capturer != NULL); + RTC_DCHECK(capturer != nullptr); rtc::scoped_refptr source( new rtc::RefCountedObject( worker_thread, std::move(capturer), remote));