Index: webrtc/pc/webrtcsdp.cc |
diff --git a/webrtc/pc/webrtcsdp.cc b/webrtc/pc/webrtcsdp.cc |
index ed49c344e81f962b42102a4f5cdeede47ef0197b..4522b1c427ba88453b436b09a6cc0aebfb70e175 100644 |
--- a/webrtc/pc/webrtcsdp.cc |
+++ b/webrtc/pc/webrtcsdp.cc |
@@ -577,7 +577,7 @@ void CreateTracksFromSsrcInfos(const SsrcInfoVec& ssrc_infos, |
const std::string& msid_stream_id, |
const std::string& msid_track_id, |
StreamParamsVec* tracks) { |
- RTC_DCHECK(tracks != NULL); |
+ RTC_DCHECK(tracks != nullptr); |
RTC_DCHECK(msid_stream_id.empty() == msid_track_id.empty()); |
for (SsrcInfoVec::const_iterator ssrc_info = ssrc_infos.begin(); |
ssrc_info != ssrc_infos.end(); ++ssrc_info) { |
@@ -831,7 +831,7 @@ std::string SdpSerialize(const JsepSessionDescription& jdesc, |
std::string group_line = kAttrGroup; |
const cricket::ContentGroup* group = |
desc->GetGroupByName(cricket::GROUP_TYPE_BUNDLE); |
- RTC_DCHECK(group != NULL); |
+ RTC_DCHECK(group != nullptr); |
const cricket::ContentNames& content_names = group->content_names(); |
for (cricket::ContentNames::const_iterator it = content_names.begin(); |
it != content_names.end(); ++it) { |
@@ -938,7 +938,7 @@ bool SdpDeserialize(const std::string& message, |
bool SdpDeserializeCandidate(const std::string& message, |
JsepIceCandidate* jcandidate, |
SdpParseError* error) { |
- RTC_DCHECK(jcandidate != NULL); |
+ RTC_DCHECK(jcandidate != nullptr); |
Candidate candidate; |
if (!ParseCandidate(message, &candidate, error, true)) { |
return false; |
@@ -961,7 +961,7 @@ bool SdpDeserializeCandidate(const std::string& transport_name, |
bool ParseCandidate(const std::string& message, Candidate* candidate, |
SdpParseError* error, bool is_raw) { |
- RTC_DCHECK(candidate != NULL); |
+ RTC_DCHECK(candidate != nullptr); |
// Get the first line from |message|. |
std::string first_line = message; |
@@ -1221,8 +1221,8 @@ void BuildMediaDescription(const ContentInfo* content_info, |
const std::vector<Candidate>& candidates, |
bool unified_plan_sdp, |
std::string* message) { |
- RTC_DCHECK(message != NULL); |
- if (content_info == NULL || message == NULL) { |
+ RTC_DCHECK(message != nullptr); |
+ if (content_info == nullptr || message == nullptr) { |
return; |
} |
// TODO: Rethink if we should use sprintfn instead of stringstream. |
@@ -1233,14 +1233,14 @@ void BuildMediaDescription(const ContentInfo* content_info, |
const MediaContentDescription* media_desc = |
static_cast<const MediaContentDescription*>( |
content_info->description); |
- RTC_DCHECK(media_desc != NULL); |
+ RTC_DCHECK(media_desc != nullptr); |
int sctp_port = cricket::kSctpDefaultPort; |
// RFC 4566 |
// m=<media> <port> <proto> <fmt> |
// fmt is a list of payload type numbers that MAY be used in the session. |
- const char* type = NULL; |
+ const char* type = nullptr; |
if (media_type == cricket::MEDIA_TYPE_AUDIO) |
type = kMediaTypeAudio; |
else if (media_type == cricket::MEDIA_TYPE_VIDEO) |
@@ -1314,8 +1314,9 @@ void BuildMediaDescription(const ContentInfo* content_info, |
(content_info->rejected || content_info->bundle_only) ? kMediaPortRejected |
: kDummyPort; |
- rtc::SSLFingerprint* fp = (transport_info) ? |
- transport_info->description.identity_fingerprint.get() : NULL; |
+ rtc::SSLFingerprint* fp = |
+ (transport_info) ? transport_info->description.identity_fingerprint.get() |
+ : nullptr; |
// Add the m and c lines. |
InitLine(kLineTypeMedia, type, &os); |
@@ -1664,9 +1665,8 @@ bool AddSctpDataCodec(DataContentDescription* media_desc, |
int sctp_port) { |
for (const auto& codec : media_desc->codecs()) { |
if (cricket::CodecNamesEq(codec.name, cricket::kGoogleSctpDataCodecName)) { |
- return ParseFailed("", |
- "Can't have multiple sctp port attributes.", |
- NULL); |
+ return ParseFailed("", "Can't have multiple sctp port attributes.", |
+ nullptr); |
} |
} |
// Add the SCTP Port number as a pseudo-codec "port" parameter |
@@ -1705,8 +1705,8 @@ bool GetParameter(const std::string& name, |
void BuildRtpMap(const MediaContentDescription* media_desc, |
const MediaType media_type, |
std::string* message) { |
- RTC_DCHECK(message != NULL); |
- RTC_DCHECK(media_desc != NULL); |
+ RTC_DCHECK(message != nullptr); |
+ RTC_DCHECK(media_desc != nullptr); |
std::ostringstream os; |
if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
const VideoContentDescription* video_desc = |
@@ -2012,7 +2012,7 @@ bool ParseSessionDescription(const std::string& message, size_t* pos, |
"Can't have multiple fingerprint attributes at the same level.", |
error); |
} |
- rtc::SSLFingerprint* fingerprint = NULL; |
+ rtc::SSLFingerprint* fingerprint = nullptr; |
if (!ParseFingerprintAttribute(line, &fingerprint, error)) { |
return false; |
} |
@@ -2043,7 +2043,7 @@ bool ParseSessionDescription(const std::string& message, size_t* pos, |
bool ParseGroupAttribute(const std::string& line, |
cricket::SessionDescription* desc, |
SdpParseError* error) { |
- RTC_DCHECK(desc != NULL); |
+ RTC_DCHECK(desc != nullptr); |
// RFC 5888 and draft-holmberg-mmusic-sdp-bundle-negotiation-00 |
// a=group:BUNDLE video voice |
@@ -2250,7 +2250,7 @@ static C* ParseContentDescription(const std::string& message, |
pos, content_name, bundle_only, media_desc, transport, |
candidates, error)) { |
delete media_desc; |
- return NULL; |
+ return nullptr; |
} |
// Sort the codecs according to the m-line fmt list. |
std::unordered_map<int, int> payload_type_preferences; |
@@ -2278,7 +2278,7 @@ bool ParseMediaDescription(const std::string& message, |
cricket::SessionDescription* desc, |
std::vector<JsepIceCandidate*>* candidates, |
SdpParseError* error) { |
- RTC_DCHECK(desc != NULL); |
+ RTC_DCHECK(desc != nullptr); |
std::string line; |
int mline_index = -1; |
@@ -2361,7 +2361,7 @@ bool ParseMediaDescription(const std::string& message, |
continue; |
} |
if (!content.get()) { |
- // ParseContentDescription returns NULL if failed. |
+ // ParseContentDescription returns null if failed. |
return false; |
} |
@@ -2582,9 +2582,9 @@ bool ParseContent(const std::string& message, |
TransportDescription* transport, |
std::vector<JsepIceCandidate*>* candidates, |
SdpParseError* error) { |
- RTC_DCHECK(media_desc != NULL); |
- RTC_DCHECK(content_name != NULL); |
- RTC_DCHECK(transport != NULL); |
+ RTC_DCHECK(media_desc != nullptr); |
+ RTC_DCHECK(content_name != nullptr); |
+ RTC_DCHECK(transport != nullptr); |
if (media_type == cricket::MEDIA_TYPE_AUDIO) { |
MaybeCreateStaticPayloadAudioCodecs( |
@@ -2693,7 +2693,7 @@ bool ParseContent(const std::string& message, |
return false; |
} |
} else if (HasAttribute(line, kAttributeFingerprint)) { |
- rtc::SSLFingerprint* fingerprint = NULL; |
+ rtc::SSLFingerprint* fingerprint = nullptr; |
if (!ParseFingerprintAttribute(line, &fingerprint, error)) { |
return false; |
@@ -2858,7 +2858,7 @@ bool ParseContent(const std::string& message, |
bool ParseSsrcAttribute(const std::string& line, SsrcInfoVec* ssrc_infos, |
SdpParseError* error) { |
- RTC_DCHECK(ssrc_infos != NULL); |
+ RTC_DCHECK(ssrc_infos != nullptr); |
// RFC 5576 |
// a=ssrc:<ssrc-id> <attribute> |
// a=ssrc:<ssrc-id> <attribute>:<value> |
@@ -2937,7 +2937,7 @@ bool ParseSsrcAttribute(const std::string& line, SsrcInfoVec* ssrc_infos, |
bool ParseSsrcGroupAttribute(const std::string& line, |
SsrcGroupVec* ssrc_groups, |
SdpParseError* error) { |
- RTC_DCHECK(ssrc_groups != NULL); |
+ RTC_DCHECK(ssrc_groups != nullptr); |
// RFC 5576 |
// a=ssrc-group:<semantics> <ssrc-id> ... |
std::vector<std::string> fields; |