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

Unified Diff: webrtc/p2p/base/sessiondescription.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/p2p/base/sessiondescription.cc
diff --git a/webrtc/p2p/base/sessiondescription.cc b/webrtc/p2p/base/sessiondescription.cc
index 1e69c83e76243da6d0864025624435a2e12d2d01..cadc7aa79cb35019d1dc98c1975832a68c8ec2c4 100644
--- a/webrtc/p2p/base/sessiondescription.cc
+++ b/webrtc/p2p/base/sessiondescription.cc
@@ -20,7 +20,7 @@ ContentInfo* FindContentInfoByName(
return &(*content);
}
}
- return NULL;
+ return nullptr;
}
const ContentInfo* FindContentInfoByName(
@@ -31,7 +31,7 @@ const ContentInfo* FindContentInfoByName(
return &(*content);
}
}
- return NULL;
+ return nullptr;
}
const ContentInfo* FindContentInfoByType(
@@ -42,11 +42,11 @@ const ContentInfo* FindContentInfoByType(
return &(*content);
}
}
- return NULL;
+ return nullptr;
}
const std::string* ContentGroup::FirstContentName() const {
- return (!content_names_.empty()) ? &(*content_names_.begin()) : NULL;
+ return (!content_names_.empty()) ? &(*content_names_.begin()) : nullptr;
}
bool ContentGroup::HasContentName(const std::string& content_name) const {
@@ -93,8 +93,8 @@ ContentInfo* SessionDescription::GetContentByName(
const ContentDescription* SessionDescription::GetContentDescriptionByName(
const std::string& name) const {
const ContentInfo* cinfo = FindContentInfoByName(contents_, name);
- if (cinfo == NULL) {
- return NULL;
+ if (cinfo == nullptr) {
+ return nullptr;
}
return cinfo->description;
@@ -103,8 +103,8 @@ const ContentDescription* SessionDescription::GetContentDescriptionByName(
ContentDescription* SessionDescription::GetContentDescriptionByName(
const std::string& name) {
ContentInfo* cinfo = FindContentInfoByName(contents_, name);
- if (cinfo == NULL) {
- return NULL;
+ if (cinfo == nullptr) {
+ return nullptr;
}
return cinfo->description;
@@ -116,7 +116,7 @@ const ContentInfo* SessionDescription::FirstContentByType(
}
const ContentInfo* SessionDescription::FirstContent() const {
- return (contents_.empty()) ? NULL : &(*contents_.begin());
+ return (contents_.empty()) ? nullptr : &(*contents_.begin());
}
void SessionDescription::AddContent(const std::string& name,
@@ -155,7 +155,7 @@ bool SessionDescription::RemoveContentByName(const std::string& name) {
}
bool SessionDescription::AddTransportInfo(const TransportInfo& transport_info) {
- if (GetTransportInfoByName(transport_info.content_name) != NULL) {
+ if (GetTransportInfoByName(transport_info.content_name) != nullptr) {
return false;
}
transport_infos_.push_back(transport_info);
@@ -181,7 +181,7 @@ const TransportInfo* SessionDescription::GetTransportInfoByName(
return &(*iter);
}
}
- return NULL;
+ return nullptr;
}
TransportInfo* SessionDescription::GetTransportInfoByName(
@@ -192,7 +192,7 @@ TransportInfo* SessionDescription::GetTransportInfoByName(
return &(*iter);
}
}
- return NULL;
+ return nullptr;
}
void SessionDescription::RemoveGroupByName(const std::string& name) {
@@ -223,7 +223,7 @@ const ContentGroup* SessionDescription::GetGroupByName(
return &(*iter);
}
}
- return NULL;
+ return nullptr;
}
} // namespace cricket

Powered by Google App Engine
This is Rietveld 408576698