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

Unified Diff: webrtc/p2p/base/port.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/port.cc
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index 385022c11aa98fd7be768c672617c5a900d5b5de..7058255690f0530638b57382945d68f2f4c9e4d3 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -185,7 +185,7 @@ Port::Port(rtc::Thread* thread,
ice_role_(ICEROLE_UNKNOWN),
tiebreaker_(0),
shared_socket_(false) {
- RTC_DCHECK(factory_ != NULL);
+ RTC_DCHECK(factory_ != nullptr);
Construct();
}
@@ -240,7 +240,7 @@ Connection* Port::GetConnection(const rtc::SocketAddress& remote_addr) {
if (iter != connections_.end())
return iter->second;
else
- return NULL;
+ return nullptr;
}
void Port::AddAddress(const rtc::SocketAddress& address,
@@ -356,8 +356,8 @@ bool Port::GetStunMessage(const char* data,
// NOTE: This could clearly be optimized to avoid allocating any memory.
// However, at the data rates we'll be looking at on the client side,
// this probably isn't worth worrying about.
- RTC_DCHECK(out_msg != NULL);
- RTC_DCHECK(out_username != NULL);
+ RTC_DCHECK(out_msg != nullptr);
+ RTC_DCHECK(out_username != nullptr);
out_username->clear();
// Don't bother parsing the packet if we can tell it's not STUN.
@@ -469,7 +469,7 @@ bool Port::ParseStunUsername(const StunMessage* stun_msg,
remote_ufrag->clear();
const StunByteStringAttribute* username_attr =
stun_msg->GetByteString(STUN_ATTR_USERNAME);
- if (username_attr == NULL)
+ if (username_attr == nullptr)
return false;
// RFRAG:LFRAG
@@ -560,8 +560,8 @@ void Port::SendBindingResponse(StunMessage* request,
// Retrieve the username from the request.
const StunByteStringAttribute* username_attr =
request->GetByteString(STUN_ATTR_USERNAME);
- RTC_DCHECK(username_attr != NULL);
- if (username_attr == NULL) {
+ RTC_DCHECK(username_attr != nullptr);
+ if (username_attr == nullptr) {
// No valid username, skip the response.
return;
}

Powered by Google App Engine
This is Rietveld 408576698