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

Unified Diff: webrtc/base/socketstream.cc

Issue 2718663005: Replace NULL with nullptr or null in webrtc/base/. (Closed)
Patch Set: Fixing Windows and formatting issues. 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
« no previous file with comments | « webrtc/base/socketaddress_unittest.cc ('k') | webrtc/base/ssladapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/socketstream.cc
diff --git a/webrtc/base/socketstream.cc b/webrtc/base/socketstream.cc
index 9407c96795f805194531c52278892a2f850757c7..a218dd803aeddf906844b47497ca33acc78661af 100644
--- a/webrtc/base/socketstream.cc
+++ b/webrtc/base/socketstream.cc
@@ -14,7 +14,7 @@
namespace rtc {
-SocketStream::SocketStream(AsyncSocket* socket) : socket_(NULL) {
+SocketStream::SocketStream(AsyncSocket* socket) : socket_(nullptr) {
Attach(socket);
}
@@ -41,13 +41,13 @@ AsyncSocket* SocketStream::Detach() {
socket_->SignalReadEvent.disconnect(this);
socket_->SignalWriteEvent.disconnect(this);
socket_->SignalCloseEvent.disconnect(this);
- socket_ = NULL;
+ socket_ = nullptr;
}
return socket;
}
StreamState SocketStream::GetState() const {
- RTC_DCHECK(socket_ != NULL);
+ RTC_DCHECK(socket_ != nullptr);
switch (socket_->GetState()) {
case Socket::CS_CONNECTED:
return SS_OPEN;
@@ -61,7 +61,7 @@ StreamState SocketStream::GetState() const {
StreamResult SocketStream::Read(void* buffer, size_t buffer_len,
size_t* read, int* error) {
- RTC_DCHECK(socket_ != NULL);
+ RTC_DCHECK(socket_ != nullptr);
int result = socket_->Recv(buffer, buffer_len, nullptr);
if (result < 0) {
if (socket_->IsBlocking())
@@ -80,7 +80,7 @@ StreamResult SocketStream::Read(void* buffer, size_t buffer_len,
StreamResult SocketStream::Write(const void* data, size_t data_len,
size_t* written, int* error) {
- RTC_DCHECK(socket_ != NULL);
+ RTC_DCHECK(socket_ != nullptr);
int result = socket_->Send(data, data_len);
if (result < 0) {
if (socket_->IsBlocking())
@@ -95,7 +95,7 @@ StreamResult SocketStream::Write(const void* data, size_t data_len,
}
void SocketStream::Close() {
- RTC_DCHECK(socket_ != NULL);
+ RTC_DCHECK(socket_ != nullptr);
socket_->Close();
}
« no previous file with comments | « webrtc/base/socketaddress_unittest.cc ('k') | webrtc/base/ssladapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698