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

Unified Diff: webrtc/base/testutils.h

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/testechoserver.h ('k') | webrtc/base/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/testutils.h
diff --git a/webrtc/base/testutils.h b/webrtc/base/testutils.h
index ac7fd93626caa75839439a5769a40818cef52530..305d3d0a6b7df6555f022cc5775541a128f3f937 100644
--- a/webrtc/base/testutils.h
+++ b/webrtc/base/testutils.h
@@ -276,14 +276,12 @@ private:
class SocketTestClient : public sigslot::has_slots<> {
public:
- SocketTestClient() {
- Init(NULL, AF_INET);
- }
- SocketTestClient(AsyncSocket* socket) {
- Init(socket, socket->GetLocalAddress().family());
+ SocketTestClient() { Init(nullptr, AF_INET); }
+ SocketTestClient(AsyncSocket* socket) {
+ Init(socket, socket->GetLocalAddress().family());
}
SocketTestClient(const SocketAddress& address) {
- Init(NULL, address.family());
+ Init(nullptr, address.family());
socket_->Connect(address);
}
@@ -408,8 +406,7 @@ class SocketTestServer : public sigslot::has_slots<> {
private:
void OnReadEvent(AsyncSocket* socket) {
- AsyncSocket* accepted =
- static_cast<AsyncSocket*>(socket_->Accept(NULL));
+ AsyncSocket* accepted = static_cast<AsyncSocket*>(socket_->Accept(nullptr));
if (!accepted)
return;
clients_.push_back(new SocketTestClient(accepted));
@@ -530,9 +527,9 @@ inline AssertionResult CmpHelperMemEq(const char* expected_expression,
#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
struct XDisplay {
- XDisplay() : display_(XOpenDisplay(NULL)) { }
+ XDisplay() : display_(XOpenDisplay(nullptr)) {}
~XDisplay() { if (display_) XCloseDisplay(display_); }
- bool IsValid() const { return display_ != NULL; }
+ bool IsValid() const { return display_ != nullptr; }
operator Display*() { return display_; }
private:
Display* display_;
« no previous file with comments | « webrtc/base/testechoserver.h ('k') | webrtc/base/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698