Skip to content

Commit 1eaed17

Browse files
committed
use nullptr, changes by clang-tidy
1 parent 7e10ce4 commit 1eaed17

190 files changed

Lines changed: 1936 additions & 1936 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ACE/ace/ACE.cpp

Lines changed: 61 additions & 61 deletions
Large diffs are not rendered by default.

ACE/ace/Acceptor.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ ACE_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::open
7373

7474
// Must supply a valid Reactor to Acceptor::open()...
7575

76-
if (reactor == 0)
76+
if (reactor == nullptr)
7777
{
7878
errno = EINVAL;
7979
return -1;
@@ -187,7 +187,7 @@ ACE_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::info (ACE_TCHAR **strp,
187187
addr_str,
188188
ACE_TEXT ("# acceptor factory\n"));
189189

190-
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
190+
if (*strp == nullptr && (*strp = ACE_OS::strdup (buf)) == nullptr)
191191
return -1;
192192
else
193193
ACE_OS::strsncpy (*strp, buf, length);
@@ -563,18 +563,18 @@ ACE_Strategy_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::open
563563
{
564564
ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::open");
565565

566-
if (this->service_name_ == 0 && service_name != 0)
566+
if (this->service_name_ == 0 && service_name != nullptr)
567567
ACE_ALLOCATOR_RETURN (this->service_name_,
568568
ACE_OS::strdup (service_name),
569569
-1);
570-
if (this->service_description_ == 0 && service_description != 0)
570+
if (this->service_description_ == 0 && service_description != nullptr)
571571
ACE_ALLOCATOR_RETURN (this->service_description_,
572572
ACE_OS::strdup (service_description),
573573
-1);
574574
this->reactor (reactor);
575575

576576
// Must supply a valid Reactor to Acceptor::open()...
577-
if (reactor == 0)
577+
if (reactor == nullptr)
578578
{
579579
errno = EINVAL;
580580
return -1;
@@ -659,15 +659,15 @@ ACE_Strategy_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::ACE_Strategy_Acceptor
659659
delete_concurrency_strategy_ (false),
660660
scheduling_strategy_ (0),
661661
delete_scheduling_strategy_ (false),
662-
service_name_ (0),
663-
service_description_ (0)
662+
service_name_ (nullptr),
663+
service_description_ (nullptr)
664664
{
665665
ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::ACE_Strategy_Acceptor");
666666

667-
if (service_name != 0)
667+
if (service_name != nullptr)
668668
ACE_ALLOCATOR (this->service_name_,
669669
ACE_OS::strdup (service_name));
670-
if (service_description != 0)
670+
if (service_description != nullptr)
671671
ACE_ALLOCATOR (this->service_description_,
672672
ACE_OS::strdup (service_description));
673673
this->use_select_ = use_select;
@@ -694,8 +694,8 @@ ACE_Strategy_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::ACE_Strategy_Acceptor
694694
delete_concurrency_strategy_ (false),
695695
scheduling_strategy_ (0),
696696
delete_scheduling_strategy_ (false),
697-
service_name_ (0),
698-
service_description_ (0)
697+
service_name_ (nullptr),
698+
service_description_ (nullptr)
699699
{
700700
ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::ACE_Strategy_Acceptor");
701701

@@ -859,7 +859,7 @@ ACE_Strategy_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::info (ACE_TCHAR **strp,
859859
? ACE_TEXT ("<unknown>")
860860
: this->service_description_);
861861

862-
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
862+
if (*strp == nullptr && (*strp = ACE_OS::strdup (buf)) == nullptr)
863863
return -1;
864864
else
865865
ACE_OS::strsncpy (*strp, buf, length);
@@ -1031,7 +1031,7 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::register_handler
10311031
this->restart_ = restart;
10321032
ACE_Time_Value *tv = (ACE_Time_Value *) synch_options.time_value ();
10331033

1034-
if (tv != 0
1034+
if (tv != nullptr
10351035
&& this->reactor ()->schedule_timer (this,
10361036
synch_options.arg (),
10371037
*tv) == -1)
@@ -1222,7 +1222,7 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, PEER_ACCEPTOR>::info (ACE_TCHAR **strp,
12221222
addr_str,
12231223
ACE_TEXT ("#oneshot acceptor factory\n"));
12241224

1225-
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
1225+
if (*strp == nullptr && (*strp = ACE_OS::strdup (buf)) == nullptr)
12261226
return -1;
12271227
else
12281228
ACE_OS::strsncpy (*strp, buf, length);

ACE/ace/Activation_Queue.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ACE_Activation_Queue::ACE_Activation_Queue (ACE_Message_Queue<ACE_SYNCH> *new_qu
3838
, allocator_(alloc)
3939
, data_block_allocator_(db_alloc)
4040
{
41-
if (this->allocator_ == 0)
41+
if (this->allocator_ == nullptr)
4242
this->allocator_ = ACE_Allocator::instance ();
4343

4444
if (new_queue)
@@ -81,7 +81,7 @@ ACE_Activation_Queue::~ACE_Activation_Queue ()
8181
ACE_Method_Request *
8282
ACE_Activation_Queue::dequeue (ACE_Time_Value *tv)
8383
{
84-
ACE_Message_Block *mb = 0;
84+
ACE_Message_Block *mb = nullptr;
8585

8686
// Dequeue the message.
8787
if (this->queue_->dequeue_head (mb, tv) != -1)
@@ -94,14 +94,14 @@ ACE_Activation_Queue::dequeue (ACE_Time_Value *tv)
9494
return mr;
9595
}
9696
else
97-
return 0;
97+
return nullptr;
9898
}
9999

100100
int
101101
ACE_Activation_Queue::enqueue (ACE_Method_Request *mr,
102102
ACE_Time_Value *tv)
103103
{
104-
ACE_Message_Block *mb = 0;
104+
ACE_Message_Block *mb = nullptr;
105105

106106
// We pass sizeof (*mr) here so that flow control will work
107107
// correctly. Since we also pass <mr> note that no unnecessary
@@ -110,10 +110,10 @@ ACE_Activation_Queue::enqueue (ACE_Method_Request *mr,
110110
static_cast<ACE_Message_Block *> (this->allocator_->malloc (sizeof (ACE_Message_Block))),
111111
ACE_Message_Block (sizeof (*mr), // size
112112
ACE_Message_Block::MB_DATA, // type
113-
0, // cont
113+
nullptr, // cont
114114
(char *) mr, // data
115-
0, // allocator
116-
0, // locking strategy
115+
nullptr, // allocator
116+
nullptr, // locking strategy
117117
mr->priority (), // priority
118118
ACE_Time_Value::zero, // execution time
119119
ACE_Time_Value::max_time, // absolute time of deadline

ACE/ace/Addr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ACE_Addr::ACE_Addr (int type, int size) :
3131
void *
3232
ACE_Addr::get_addr () const
3333
{
34-
return 0;
34+
return nullptr;
3535
}
3636

3737
void

ACE/ace/Asynch_Acceptor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ ACE_Asynch_Acceptor<HANDLER>::accept (size_t bytes_to_read, const void *act)
202202
{
203203
ACE_TRACE ("ACE_Asynch_Acceptor<>::accept");
204204

205-
ACE_Message_Block *message_block = 0;
205+
ACE_Message_Block *message_block = nullptr;
206206
// The space_needed calculation is drive by needs of Windows. POSIX doesn't
207207
// need to extra 16 bytes, but it doesn't hurt.
208208
size_t space_needed = sizeof (sockaddr_in) + 16;
@@ -307,7 +307,7 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
307307
local_address);
308308

309309
// Pass the ACT
310-
if (result.act () != 0)
310+
if (result.act () != nullptr)
311311
new_handler->act (result.act ());
312312

313313
// Set up the handler's new handle value

ACE/ace/Asynch_Connector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ACE_Asynch_Connector<HANDLER>::handle_connect (const ACE_Asynch_Connect::Result
138138
local_address);
139139

140140
// Pass the ACT
141-
if (result.act () != 0)
141+
if (result.act () != nullptr)
142142
new_handler->act (result.act ());
143143

144144
// Set up the handler's new handle value

0 commit comments

Comments
 (0)