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

Unified Diff: webrtc/base/proxyserver.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/proxy_unittest.cc ('k') | webrtc/base/scoped_autorelease_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/proxyserver.cc
diff --git a/webrtc/base/proxyserver.cc b/webrtc/base/proxyserver.cc
index 66cf695755e415613d65452d0166dc842582427c..713a98679a0cc3a0e36c46807c7408e3f5cb47b3 100644
--- a/webrtc/base/proxyserver.cc
+++ b/webrtc/base/proxyserver.cc
@@ -24,7 +24,7 @@ ProxyServer::ProxyServer(
: ext_factory_(ext_factory), ext_ip_(ext_ip.ipaddr(), 0), // strip off port
server_socket_(int_factory->CreateAsyncSocket(int_addr.family(),
SOCK_STREAM)) {
- RTC_DCHECK(server_socket_.get() != NULL);
+ RTC_DCHECK(server_socket_.get() != nullptr);
RTC_DCHECK(int_addr.family() == AF_INET || int_addr.family() == AF_INET6);
server_socket_->Bind(int_addr);
server_socket_->Listen(5);
@@ -43,8 +43,8 @@ SocketAddress ProxyServer::GetServerAddress() {
}
void ProxyServer::OnAcceptEvent(AsyncSocket* socket) {
- RTC_DCHECK(socket != NULL && socket == server_socket_.get());
- AsyncSocket* int_socket = socket->Accept(NULL);
+ RTC_DCHECK(socket != nullptr && socket == server_socket_.get());
+ AsyncSocket* int_socket = socket->Accept(nullptr);
AsyncProxyServerSocket* wrapped_socket = WrapSocket(int_socket);
AsyncSocket* ext_socket = ext_factory_->CreateAsyncSocket(ext_ip_.family(),
SOCK_STREAM);
@@ -84,7 +84,7 @@ ProxyBinding::~ProxyBinding() = default;
void ProxyBinding::OnConnectRequest(AsyncProxyServerSocket* socket,
const SocketAddress& addr) {
- RTC_DCHECK(!connected_ && ext_socket_.get() != NULL);
+ RTC_DCHECK(!connected_ && ext_socket_.get() != nullptr);
ext_socket_->Connect(addr);
// TODO: handle errors here
}
@@ -103,7 +103,7 @@ void ProxyBinding::OnInternalClose(AsyncSocket* socket, int err) {
}
void ProxyBinding::OnExternalConnect(AsyncSocket* socket) {
- RTC_DCHECK(socket != NULL);
+ RTC_DCHECK(socket != nullptr);
connected_ = true;
int_socket_->SendConnectResult(0, socket->GetRemoteAddress());
}
@@ -126,7 +126,7 @@ void ProxyBinding::OnExternalClose(AsyncSocket* socket, int err) {
void ProxyBinding::Read(AsyncSocket* socket, FifoBuffer* buffer) {
// Only read if the buffer is empty.
- RTC_DCHECK(socket != NULL);
+ RTC_DCHECK(socket != nullptr);
size_t size;
int read;
if (buffer->GetBuffered(&size) && size == 0) {
@@ -137,7 +137,7 @@ void ProxyBinding::Read(AsyncSocket* socket, FifoBuffer* buffer) {
}
void ProxyBinding::Write(AsyncSocket* socket, FifoBuffer* buffer) {
- RTC_DCHECK(socket != NULL);
+ RTC_DCHECK(socket != nullptr);
size_t size;
int written;
const void* p = buffer->GetReadData(&size);
« no previous file with comments | « webrtc/base/proxy_unittest.cc ('k') | webrtc/base/scoped_autorelease_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698