diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2014-03-09 21:14:26 +0100 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2014-03-09 21:14:26 +0100 |
| commit | d802d392811be44d34ae9cd23f616db93e54c50f (patch) | |
| tree | f9aa8831a0731ea246bd921d979f4bffa7f07bd0 /Source/Core/InputCommon/UDPWiimote.cpp | |
| parent | f28116b7da6aac6069084596dc4dbf866bdebfd8 (diff) | |
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
Diffstat (limited to 'Source/Core/InputCommon/UDPWiimote.cpp')
| -rw-r--r-- | Source/Core/InputCommon/UDPWiimote.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/UDPWiimote.cpp b/Source/Core/InputCommon/UDPWiimote.cpp index a50dbc17ca..1dad7d52d2 100644 --- a/Source/Core/InputCommon/UDPWiimote.cpp +++ b/Source/Core/InputCommon/UDPWiimote.cpp @@ -72,7 +72,7 @@ UDPWiimote::UDPWiimote(const char *_port, const char * name, int _index) : static bool sranded=false; if (!sranded) { - srand((unsigned int)time(0)); + srand((unsigned int)time(nullptr)); sranded=true; } bcastMagic=rand() & 0xFFFF; @@ -107,7 +107,7 @@ UDPWiimote::UDPWiimote(const char *_port, const char * name, int _index) : return; } - if ((rv = getaddrinfo(NULL, _port, &hints, &servinfo)) != 0) + if ((rv = getaddrinfo(nullptr, _port, &hints, &servinfo)) != 0) { cleanup; err=-1; @@ -115,7 +115,7 @@ UDPWiimote::UDPWiimote(const char *_port, const char * name, int _index) : } // loop through all the results and bind to everything we can - for(p = servinfo; p != NULL; p = p->ai_next) + for(p = servinfo; p != nullptr; p = p->ai_next) { sock_t sock; if ((sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == BAD_SOCK) @@ -191,7 +191,7 @@ void UDPWiimote::mainThread() lk.unlock(); //VERY hacky. don't like it if (d->exit) return; - int rt=select(maxfd,&fds,NULL,NULL,&timeout); + int rt=select(maxfd,&fds,nullptr,nullptr,&timeout); if (d->exit) return; lk.lock(); if (d->exit) return; |
