summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog63
-rw-r--r--ace/Capabilities.cpp6
-rw-r--r--ace/Configuration.cpp12
-rw-r--r--ace/Connector.cpp4
-rw-r--r--ace/Containers_T.cpp4
-rw-r--r--ace/Dev_Poll_Reactor.cpp2
-rw-r--r--ace/Dynamic_Service.cpp2
-rw-r--r--ace/FILE.cpp2
-rw-r--r--ace/LSOCK_Acceptor.cpp2
-rw-r--r--ace/LSOCK_Stream.cpp2
-rw-r--r--ace/Log_Msg.cpp3
-rw-r--r--ace/Message_Queue.cpp4
-rw-r--r--ace/Message_Queue_T.cpp10
-rw-r--r--ace/Naming_Context.cpp4
-rw-r--r--ace/OS_NS_fcntl.cpp14
-rw-r--r--ace/OS_NS_netdb.cpp6
-rw-r--r--ace/OS_NS_stdio.cpp8
-rw-r--r--ace/OS_NS_stropts.cpp3
-rw-r--r--ace/OS_NS_sys_uio.cpp4
-rw-r--r--ace/OS_NS_sys_utsname.cpp2
-rw-r--r--ace/OS_NS_time.cpp37
-rw-r--r--ace/OS_NS_unistd.inl2
-rw-r--r--ace/OS_NS_wchar.cpp12
-rw-r--r--ace/OS_Thread_Adapter.cpp7
-rw-r--r--ace/Obstack_T.cpp12
-rw-r--r--ace/POSIX_Asynch_IO.cpp11
-rw-r--r--ace/POSIX_CB_Proactor.cpp2
-rw-r--r--ace/POSIX_Proactor.cpp16
-rw-r--r--ace/Parse_Node.cpp39
-rw-r--r--ace/Remote_Name_Space.cpp28
-rw-r--r--ace/SOCK_Acceptor.cpp18
-rw-r--r--ace/SOCK_Connector.cpp12
-rw-r--r--ace/SOCK_Dgram_Mcast.cpp7
-rw-r--r--ace/SOCK_SEQPACK_Acceptor.cpp44
-rw-r--r--ace/SOCK_SEQPACK_Association.cpp20
-rw-r--r--ace/SOCK_SEQPACK_Connector.cpp25
-rw-r--r--ace/Select_Reactor_Base.cpp2
-rw-r--r--ace/Service_Config.cpp2
-rw-r--r--ace/Service_Repository.cpp15
-rw-r--r--ace/Sock_Connect.cpp10
-rw-r--r--ace/Stream_Modules.cpp6
-rw-r--r--ace/Svc_Conf.y12
-rw-r--r--ace/Svc_Conf_y.cpp12
-rw-r--r--ace/TLI.cpp16
-rw-r--r--ace/TLI_Acceptor.cpp2
-rw-r--r--ace/TLI_Connector.cpp2
-rw-r--r--ace/TSS_T.cpp4
-rw-r--r--ace/Timer_Heap_T.cpp5
-rw-r--r--ace/Timer_Wheel_T.cpp6
-rw-r--r--ace/Token_Collection.cpp3
-rw-r--r--ace/UPIPE_Stream.cpp2
-rw-r--r--ace/UUID.cpp32
-rw-r--r--ace/Unbounded_Queue.cpp6
-rw-r--r--ace/Unbounded_Set.cpp3
-rw-r--r--ace/WFMO_Reactor.cpp2
-rw-r--r--ace/WIN32_Asynch_IO.cpp43
-rw-r--r--ace/WIN32_Proactor.cpp20
57 files changed, 316 insertions, 338 deletions
diff --git a/ChangeLog b/ChangeLog
index fbb707b19e6..24279eeda92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,66 @@
+Thu Jan 13 23:32:03 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * ace/Capabilities.cpp:
+ * ace/Configuration.cpp:
+ * ace/Connector.cpp:
+ * ace/Containers_T.cpp:
+ * ace/Dev_Poll_Reactor.cpp:
+ * ace/Dynamic_Service.cpp:
+ * ace/FILE.cpp:
+ * ace/LSOCK_Acceptor.cpp:
+ * ace/LSOCK_Stream.cpp:
+ * ace/Log_Msg.cpp:
+ * ace/Message_Queue.cpp:
+ * ace/Message_Queue_T.cpp:
+ * ace/Naming_Context.cpp:
+ * ace/OS_NS_fcntl.cpp:
+ * ace/OS_NS_netdb.cpp:
+ * ace/OS_NS_stdio.cpp:
+ * ace/OS_NS_stropts.cpp:
+ * ace/OS_NS_sys_uio.cpp:
+ * ace/OS_NS_sys_utsname.cpp:
+ * ace/OS_NS_time.cpp:
+ * ace/OS_NS_unistd.inl:
+ * ace/OS_NS_wchar.cpp:
+ * ace/OS_Thread_Adapter.cpp:
+ * ace/Obstack_T.cpp:
+ * ace/POSIX_Asynch_IO.cpp:
+ * ace/POSIX_CB_Proactor.cpp:
+ * ace/POSIX_Proactor.cpp:
+ * ace/Parse_Node.cpp:
+ * ace/Remote_Name_Space.cpp:
+ * ace/SOCK_Acceptor.cpp:
+ * ace/SOCK_Connector.cpp:
+ * ace/SOCK_Dgram_Mcast.cpp:
+ * ace/SOCK_SEQPACK_Acceptor.cpp:
+ * ace/SOCK_SEQPACK_Association.cpp:
+ * ace/SOCK_SEQPACK_Connector.cpp:
+ * ace/Select_Reactor_Base.cpp:
+ * ace/Service_Config.cpp:
+ * ace/Service_Repository.cpp:
+ * ace/Sock_Connect.cpp:
+ * ace/Stream_Modules.cpp:
+ * ace/Svc_Conf.y:
+ * ace/Svc_Conf_y.cpp:
+ * ace/TLI.cpp:
+ * ace/TLI_Acceptor.cpp:
+ * ace/TLI_Connector.cpp:
+ * ace/TSS_T.cpp:
+ * ace/Timer_Heap_T.cpp:
+ * ace/Timer_Wheel_T.cpp:
+ * ace/Token_Collection.cpp:
+ * ace/UPIPE_Stream.cpp:
+ * ace/UUID.cpp:
+ * ace/Unbounded_Queue.cpp:
+ * ace/Unbounded_Set.cpp:
+ * ace/WFMO_Reactor.cpp:
+ * ace/WIN32_Asynch_IO.cpp:
+ * ace/WIN32_Proactor.cpp:
+
+ Converted all ACE_*_cast macro calls to their standard C++
+ counterparts. The ACE_*_cast macros were deprecated in ACE
+ 5.4.2.
+
Thu Jan 13 11:29:35 2005 Boris Kolpackov <boris@dre.vanderbilt.edu>
* ace/TMCast/Group.cpp:
diff --git a/ace/Capabilities.cpp b/ace/Capabilities.cpp
index c899c1a8a48..46d0da48286 100644
--- a/ace/Capabilities.cpp
+++ b/ace/Capabilities.cpp
@@ -254,7 +254,7 @@ ACE_Capabilities::getval (const ACE_TCHAR *keyname, ACE_TString &val)
return -1;
ACE_StringCapEntry *scap =
- ACE_dynamic_cast (ACE_StringCapEntry *, cap);
+ dynamic_cast<ACE_StringCapEntry *> (cap);
if (scap == 0)
return -1;
@@ -270,7 +270,7 @@ ACE_Capabilities::getval (const ACE_TCHAR *keyname, int &val)
return -1;
ACE_IntCapEntry *icap =
- ACE_dynamic_cast (ACE_IntCapEntry *, cap);
+ dynamic_cast<ACE_IntCapEntry *> (cap);
if (icap != 0)
{
val = icap->getval ();
@@ -278,7 +278,7 @@ ACE_Capabilities::getval (const ACE_TCHAR *keyname, int &val)
}
ACE_BoolCapEntry *bcap =
- ACE_dynamic_cast (ACE_BoolCapEntry *, cap);
+ dynamic_cast<ACE_BoolCapEntry *> (cap);
if (bcap == 0)
return -1;
diff --git a/ace/Configuration.cpp b/ace/Configuration.cpp
index dbfe4539fd5..fd8840bc9eb 100644
--- a/ace/Configuration.cpp
+++ b/ace/Configuration.cpp
@@ -1071,8 +1071,7 @@ int
ACE_Configuration_Win32Registry::load_key (const ACE_Configuration_Section_Key& key,
HKEY& hKey)
{
- ACE_Section_Key_Win32* pKey = ACE_dynamic_cast (ACE_Section_Key_Win32*,
- get_internal_key (key));
+ ACE_Section_Key_Win32* pKey = dynamic_cast<ACE_Section_Key_Win32*> (get_internal_key (key));
if (!pKey)
return -1;
@@ -1463,8 +1462,7 @@ ACE_Configuration_Heap::load_key (const ACE_Configuration_Section_Key& key,
{
ACE_ASSERT (this->allocator_);
ACE_Configuration_Section_Key_Heap* pKey =
- ACE_dynamic_cast (ACE_Configuration_Section_Key_Heap*,
- get_internal_key (key));
+ dynamic_cast<ACE_Configuration_Section_Key_Heap*> (get_internal_key (key));
if (!pKey)
{
@@ -1807,8 +1805,7 @@ ACE_Configuration_Heap::enumerate_values (const ACE_Configuration_Section_Key& k
{
ACE_ASSERT (this->allocator_);
ACE_Configuration_Section_Key_Heap* pKey =
- ACE_dynamic_cast (ACE_Configuration_Section_Key_Heap*,
- get_internal_key (key));
+ dynamic_cast<ACE_Configuration_Section_Key_Heap*> (get_internal_key (key));
if (!pKey)
return -1;
@@ -1857,8 +1854,7 @@ ACE_Configuration_Heap::enumerate_sections (const ACE_Configuration_Section_Key&
ACE_ASSERT (this->allocator_);
// cast to a heap section key
ACE_Configuration_Section_Key_Heap* pKey =
- ACE_dynamic_cast (ACE_Configuration_Section_Key_Heap*,
- get_internal_key (key));
+ dynamic_cast<ACE_Configuration_Section_Key_Heap*> (get_internal_key (key));
if (!pKey)
return -1; // not a heap key!
diff --git a/ace/Connector.cpp b/ace/Connector.cpp
index bbe2119947e..2c0c9846dfa 100644
--- a/ace/Connector.cpp
+++ b/ace/Connector.cpp
@@ -486,7 +486,7 @@ ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::cancel (SVC_HANDLER *sh)
ACE_Event_Handler_var safe_handler (handler);
NBCH *nbch =
- ACE_dynamic_cast (NBCH *, handler);
+ dynamic_cast<NBCH *> (handler);
if (nbch == 0)
return -1;
@@ -667,7 +667,7 @@ ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::close (void)
ACE_Event_Handler_var safe_handler (handler);
NBCH *nbch =
- ACE_dynamic_cast (NBCH *, handler);
+ dynamic_cast<NBCH *> (handler);
ACE_ASSERT (nbch != 0);
diff --git a/ace/Containers_T.cpp b/ace/Containers_T.cpp
index 226bfd54012..1b7ecfca264 100644
--- a/ace/Containers_T.cpp
+++ b/ace/Containers_T.cpp
@@ -1074,7 +1074,7 @@ ACE_Fixed_Set_Iterator_Base<T, ACE_SIZE>::advance (void)
if (this->iterated_items_ < this->s_.cur_size_)
{
for (++this->next_;
- ACE_static_cast(size_t, this->next_) < this->s_.max_size_;
+ static_cast<size_t> (this->next_) < this->s_.max_size_;
++this->next_)
if (this->s_.search_structure_[this->next_].is_free_ == 0)
{
@@ -1111,7 +1111,7 @@ ACE_Fixed_Set_Iterator_Base<T, ACE_SIZE>::next_i (T *&item)
{
ACE_TRACE ("ACE_Fixed_Set_Iterator_Base<T, ACE_SIZE>::next_i");
- if (ACE_static_cast(size_t, this->next_) < this->s_.max_size_)
+ if (static_cast<size_t> (this->next_) < this->s_.max_size_)
do
{
if (this->s_.search_structure_[this->next_].is_free_ == 0)
diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp
index da74933376f..83e5338990e 100644
--- a/ace/Dev_Poll_Reactor.cpp
+++ b/ace/Dev_Poll_Reactor.cpp
@@ -60,7 +60,7 @@ ACE_Dev_Poll_Reactor_Notify::open (ACE_Reactor_Impl *r,
if (disable_notify_pipe == 0)
{
- this->dp_reactor_ = ACE_dynamic_cast (ACE_Dev_Poll_Reactor *, r);
+ this->dp_reactor_ = dynamic_cast<ACE_Dev_Poll_Reactor *> (r);
if (this->dp_reactor_ == 0)
{
diff --git a/ace/Dynamic_Service.cpp b/ace/Dynamic_Service.cpp
index 404916d4528..9178889675c 100644
--- a/ace/Dynamic_Service.cpp
+++ b/ace/Dynamic_Service.cpp
@@ -21,7 +21,7 @@ ACE_Dynamic_Service<TYPE>::instance (const ACE_TCHAR *name)
{
ACE_Service_Object *svc_obj =
static_cast<ACE_Service_Object *> (ACE_Dynamic_Service_Base::instance (name));
- return ACE_dynamic_cast (TYPE *, svc_obj);
+ return dynamic_cast<TYPE *> (svc_obj);
}
ACE_RCSID(ace, Dynamic_Service, "$Id$")
diff --git a/ace/FILE.cpp b/ace/FILE.cpp
index 2f15a3135b1..de7c294cc6e 100644
--- a/ace/FILE.cpp
+++ b/ace/FILE.cpp
@@ -108,7 +108,7 @@ ACE_FILE::get_local_addr (ACE_Addr &addr) const
// Perform the downcast since <addr> had better be an
// <ACE_FILE_Addr>.
ACE_FILE_Addr *file_addr =
- ACE_dynamic_cast (ACE_FILE_Addr *, &addr);
+ dynamic_cast<ACE_FILE_Addr *> (&addr);
if (file_addr == 0)
return -1;
diff --git a/ace/LSOCK_Acceptor.cpp b/ace/LSOCK_Acceptor.cpp
index 7d700f5e566..e8674429e77 100644
--- a/ace/LSOCK_Acceptor.cpp
+++ b/ace/LSOCK_Acceptor.cpp
@@ -19,7 +19,7 @@ ACE_LSOCK_Acceptor::get_local_addr (ACE_Addr &a) const
{
ACE_TRACE ("ACE_LSOCK_Acceptor::get_local_addr");
- ACE_UNIX_Addr& target = ACE_dynamic_cast (ACE_UNIX_Addr &, a);
+ ACE_UNIX_Addr& target = dynamic_cast<ACE_UNIX_Addr &> (a);
target = this->local_addr_;
diff --git a/ace/LSOCK_Stream.cpp b/ace/LSOCK_Stream.cpp
index 5b0cd23382f..caca16b372b 100644
--- a/ace/LSOCK_Stream.cpp
+++ b/ace/LSOCK_Stream.cpp
@@ -22,7 +22,7 @@ ACE_LSOCK_Stream::get_local_addr (ACE_Addr &addr) const
// Perform the downcast since <addr> had better be an
// <ACE_UNIX_Addr>.
- ACE_UNIX_Addr *rhs_unix_addr = ACE_dynamic_cast (ACE_UNIX_Addr *, &addr);
+ ACE_UNIX_Addr *rhs_unix_addr = dynamic_cast<ACE_UNIX_Addr *> (&addr);
ACE_UNIX_Addr lhs_unix_addr;
if (rhs_unix_addr == 0)
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index beaa850dd31..083dc6c2571 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -1787,8 +1787,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
// On some platforms sizeof (wchar_t) can be 2
// on the others 4 ...
wchar_t wtchar =
- ACE_static_cast(wchar_t,
- va_arg (argp, int));
+ static_cast<wchar_t> (va_arg (argp, int));
#if defined (ACE_WIN32)
# if defined (ACE_USES_WCHAR)
ACE_OS::strcpy (fp, ACE_LIB_TEXT ("c"));
diff --git a/ace/Message_Queue.cpp b/ace/Message_Queue.cpp
index 0697a564a7e..6ba5fa5c649 100644
--- a/ace/Message_Queue.cpp
+++ b/ace/Message_Queue.cpp
@@ -437,7 +437,7 @@ ACE_Message_Queue_NT::deactivate (void)
// Get the number of shutdown messages necessary to wake up all
// waiting threads.
DWORD cntr =
- this->cur_thrs_ - ACE_static_cast (DWORD, this->cur_count_);
+ this->cur_thrs_ - static_cast<DWORD> (this->cur_count_);
while (cntr-- > 0)
::PostQueuedCompletionStatus (this->completion_port_,
0,
@@ -472,7 +472,7 @@ ACE_Message_Queue_NT::pulse (void)
// waiting threads.
DWORD cntr =
- this->cur_thrs_ - ACE_static_cast (DWORD, this->cur_count_);
+ this->cur_thrs_ - static_cast<DWORD> (this->cur_count_);
while (cntr-- > 0)
::PostQueuedCompletionStatus (this->completion_port_,
0,
diff --git a/ace/Message_Queue_T.cpp b/ace/Message_Queue_T.cpp
index ff017456769..58fb0053f86 100644
--- a/ace/Message_Queue_T.cpp
+++ b/ace/Message_Queue_T.cpp
@@ -118,7 +118,7 @@ ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::peek_dequeue_head (ACE_ME
int cur_count = this->queue_.peek_dequeue_head (mb, timeout);
if (cur_count != -1)
- first_item = ACE_reinterpret_cast (ACE_MESSAGE_TYPE *, mb->base ());
+ first_item = reinterpret_cast<ACE_MESSAGE_TYPE *> (mb->base ());
return cur_count;
}
@@ -242,7 +242,7 @@ ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::dequeue_head (ACE_MESSAGE
// Dequeue the message.
if (cur_count != -1)
{
- first_item = ACE_reinterpret_cast (ACE_MESSAGE_TYPE *, mb->base ());
+ first_item = reinterpret_cast<ACE_MESSAGE_TYPE *> (mb->base ());
// Delete the message block.
mb->release ();
return cur_count;
@@ -268,7 +268,7 @@ ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::dequeue_prio (ACE_MESSAGE
// Dequeue the message.
if (cur_count != -1)
{
- dequeued = ACE_reinterpret_cast (ACE_MESSAGE_TYPE *, mb->base ());
+ dequeued = reinterpret_cast<ACE_MESSAGE_TYPE *> (mb->base ());
// Delete the message block.
mb->release ();
return cur_count;
@@ -294,7 +294,7 @@ ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::dequeue_tail (ACE_MESSAGE
// Dequeue the message.
if (cur_count != -1)
{
- dequeued = ACE_reinterpret_cast (ACE_MESSAGE_TYPE *, mb->base ());
+ dequeued = reinterpret_cast<ACE_MESSAGE_TYPE *> (mb->base ());
// Delete the message block.
mb->release ();
return cur_count;
@@ -320,7 +320,7 @@ ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::dequeue_deadline (ACE_MES
// Dequeue the message.
if (cur_count != -1)
{
- dequeued = ACE_reinterpret_cast (ACE_MESSAGE_TYPE *, mb->base ());
+ dequeued = reinterpret_cast<ACE_MESSAGE_TYPE *> (mb->base ());
// Delete the message block.
mb->release ();
return cur_count;
diff --git a/ace/Naming_Context.cpp b/ace/Naming_Context.cpp
index 112f1dfcf0e..220ad5a9e17 100644
--- a/ace/Naming_Context.cpp
+++ b/ace/Naming_Context.cpp
@@ -54,7 +54,7 @@ ACE_Naming_Context::info (ACE_TCHAR **strp,
return -1;
else
ACE_OS::strsncpy (*strp, buf, length);
- return ACE_static_cast (int, ACE_OS::strlen (buf));
+ return static_cast<int> (ACE_OS::strlen (buf));
}
int
@@ -655,7 +655,7 @@ ACE_Name_Options::parse_args (int argc, ACE_TCHAR *argv[])
break;
case 'b':
this->base_address
- (ACE_static_cast (char *, ACE_OS::atop (get_opt.opt_arg ())));
+ (static_cast<char *> (ACE_OS::atop (get_opt.opt_arg ())));
break;
case 'T':
#if defined (ACE_HAS_TRACE)
diff --git a/ace/OS_NS_fcntl.cpp b/ace/OS_NS_fcntl.cpp
index d9586a8e4ac..d901c53e702 100644
--- a/ace/OS_NS_fcntl.cpp
+++ b/ace/OS_NS_fcntl.cpp
@@ -121,26 +121,26 @@ ACE_OS::open (const char *filename,
return 0;
# else
unsigned long result, handle;
- result = ::open_f (&handle, ACE_const_cast(char *, filename), 0);
+ result = ::open_f (&handle, const_cast<char *> (filename), 0);
if (result != 0)
{
// We need to clean this up...not 100% correct!
// To correct we should handle all the cases of TRUNC and CREAT
if ((result == 0x200B) && (ACE_BIT_ENABLED (mode, O_CREAT)))
{
- result = ::create_f(ACE_const_cast(char *, filename),1,0);
+ result = ::create_f(const_cast<char *> (filename),1,0);
if (result != 0)
{
errno = result;
- return ACE_static_cast (ACE_HANDLE, -1);
+ return static_cast<ACE_HANDLE> (-1);
}
else //File created...try to open it again
{
- result = ::open_f (&handle, ACE_const_cast(char *, filename), 0);
+ result = ::open_f (&handle, const_cast<char *> (filename), 0);
if (result != 0)
{
errno = result;
- return ACE_static_cast (ACE_HANDLE, -1);
+ return static_cast<ACE_HANDLE> (-1);
}
}
@@ -148,10 +148,10 @@ ACE_OS::open (const char *filename,
else
{
errno = result;
- return ACE_static_cast (ACE_HANDLE, -1);
+ return static_cast<ACE_HANDLE> (-1);
}
}
- return ACE_static_cast (ACE_HANDLE, handle);
+ return static_cast<ACE_HANDLE> (handle);
# endif /* defined (ACE_PSOS_LACKS_PHILE) */
#elif defined (INTEGRITY)
ACE_UNUSED_ARG (sa);
diff --git a/ace/OS_NS_netdb.cpp b/ace/OS_NS_netdb.cpp
index 1915e714427..ed102852f07 100644
--- a/ace/OS_NS_netdb.cpp
+++ b/ace/OS_NS_netdb.cpp
@@ -208,7 +208,7 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node)
ACE_OS::memset (&ncb, 0, sizeof(ncb));
ncb.ncb_command = NCBENUM;
- ncb.ncb_buffer = ACE_reinterpret_cast (unsigned char*,&lenum);
+ ncb.ncb_buffer = reinterpret_cast<unsigned char*> (&lenum);
ncb.ncb_length = sizeof(lenum);
result = Netbios (&ncb);
@@ -229,10 +229,10 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node)
ADAPTERSTAT adapter;
ACE_OS::memset (&ncb, 0, sizeof (ncb));
- ACE_OS::strcpy (ACE_reinterpret_cast (char*, ncb.ncb_callname), "*");
+ ACE_OS::strcpy (reinterpret_cast<char*> (ncb.ncb_callname), "*");
ncb.ncb_command = NCBASTAT;
ncb.ncb_lana_num = lenum.lana[i];
- ncb.ncb_buffer = ACE_reinterpret_cast (unsigned char*, &adapter);
+ ncb.ncb_buffer = reinterpret_cast<unsigned char*> (&adapter);
ncb.ncb_length = sizeof (adapter);
result = Netbios (&ncb);
diff --git a/ace/OS_NS_stdio.cpp b/ace/OS_NS_stdio.cpp
index 0744250b2c5..a2c965027d7 100644
--- a/ace/OS_NS_stdio.cpp
+++ b/ace/OS_NS_stdio.cpp
@@ -134,9 +134,9 @@ ACE_OS::fopen (const char *filename,
if (fd != -1)
{
# if defined (__BORLANDC__) && !defined (ACE_USES_WCHAR)
- FILE *fp = ::_fdopen (fd, ACE_const_cast (char *, mode));
+ FILE *fp = ::_fdopen (fd, const_cast<char *> (mode));
# elif defined (__BORLANDC__) && defined (ACE_USES_WCHAR)
- FILE *fp = ::_wfdopen (fd, ACE_const_cast (wchar_t *, mode));
+ FILE *fp = ::_wfdopen (fd, const_cast<wchar_t *> (mode));
# elif defined (ACE_USES_WCHAR)
FILE *fp = ::_wfdopen (fd, mode);
# else
@@ -189,9 +189,9 @@ ACE_OS::fopen (const wchar_t *filename,
if (fd != -1)
{
# if defined (__BORLANDC__) && !defined (ACE_USES_WCHAR)
- FILE *fp = ::_fdopen (fd, ACE_const_cast (char *, mode));
+ FILE *fp = ::_fdopen (fd, const_cast<char *> (mode));
# elif defined (__BORLANDC__) && defined (ACE_USES_WCHAR)
- FILE *fp = ::_wfdopen (fd, ACE_const_cast (wchar_t *, mode));
+ FILE *fp = ::_wfdopen (fd, const_cast<wchar_t *> (mode));
# elif defined (ACE_USES_WCHAR)
FILE *fp = ::_wfdopen (fd, mode);
# else
diff --git a/ace/OS_NS_stropts.cpp b/ace/OS_NS_stropts.cpp
index f8fe0b4ad7a..a8f4710a1f7 100644
--- a/ace/OS_NS_stropts.cpp
+++ b/ace/OS_NS_stropts.cpp
@@ -120,8 +120,7 @@ ACE_OS::ioctl (ACE_HANDLE socket,
char [dwBufferLen],
-1);
- QOS *qos = ACE_reinterpret_cast (QOS*,
- qos_buf);
+ QOS *qos = reinterpret_cast<QOS*> (qos_buf);
result = ::WSAIoctl ((ACE_SOCKET) socket,
io_control_code,
diff --git a/ace/OS_NS_sys_uio.cpp b/ace/OS_NS_sys_uio.cpp
index 7c52d91bab7..5b7563dc7fd 100644
--- a/ace/OS_NS_sys_uio.cpp
+++ b/ace/OS_NS_sys_uio.cpp
@@ -33,7 +33,7 @@ ACE_OS::readv_emulation (ACE_HANDLE handle,
int i;
for (i = 0; i < n; ++i)
- if (ACE_static_cast (int, iov[i].iov_len) < 0)
+ if (static_cast<int> (iov[i].iov_len) < 0)
return -1;
else
length += iov[i].iov_len;
@@ -117,7 +117,7 @@ ACE_OS::writev_emulation (ACE_HANDLE handle, const iovec *iov, int n)
// This avoids a subtle problem where "holes" in the data
// stream would occur if partial sends of a given buffer in
// the iovec array occured.
- if (ACE_static_cast (size_t, result) < iov[i].iov_len)
+ if (static_cast<size_t> (result) < iov[i].iov_len)
break;
}
}
diff --git a/ace/OS_NS_sys_utsname.cpp b/ace/OS_NS_sys_utsname.cpp
index 62d8476b53a..be9c24a089c 100644
--- a/ace/OS_NS_sys_utsname.cpp
+++ b/ace/OS_NS_sys_utsname.cpp
@@ -45,7 +45,7 @@ ACE_OS::uname (ACE_utsname *name)
EK_KERNELINFO ets_kern;
EK_SYSTEMINFO ets_sys;
EtsGetSystemInfo (&ets_kern, &ets_sys);
- sinfo.wProcessorLevel = ACE_static_cast (WORD, ets_kern.CpuType);
+ sinfo.wProcessorLevel = static_cast<WORD> (ets_kern.CpuType);
sinfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL;
sinfo.dwProcessorType = ets_kern.CpuType * 100 + 86;
# else
diff --git a/ace/OS_NS_time.cpp b/ace/OS_NS_time.cpp
index 7995a717178..a0d19c4a83d 100644
--- a/ace/OS_NS_time.cpp
+++ b/ace/OS_NS_time.cpp
@@ -76,26 +76,24 @@ ACE_PSOS_Time_t::ACE_PSOS_Time_t (const timespec_t& t)
(tm_struct->tm_year + ACE_PSOS_Time_t::year_origin)) <<
ACE_PSOS_Time_t::year_shift;
date_ |= (ACE_PSOS_Time_t::month_mask &
- ACE_static_cast (u_long,
- tm_struct->tm_mon + ACE_PSOS_Time_t::month_origin)) <<
+ static_cast<u_long> (tm_struct->tm_mon + ACE_PSOS_Time_t::month_origin)) <<
ACE_PSOS_Time_t::month_shift;
date_ |= ACE_PSOS_Time_t::day_mask &
- ACE_static_cast (u_long, tm_struct->tm_mday);
+ static_cast<u_long> (tm_struct->tm_mday);
// Encode time values from tm struct into pSOS time bit array.
time_ = (ACE_PSOS_Time_t::hour_mask &
- ACE_static_cast (u_long, tm_struct->tm_hour)) <<
+ static_cast<u_long> (tm_struct->tm_hour)) <<
ACE_PSOS_Time_t::hour_shift;
time_ |= (ACE_PSOS_Time_t::minute_mask &
- ACE_static_cast (u_long, tm_struct->tm_min)) <<
+ static_cast<u_long> (tm_struct->tm_min)) <<
ACE_PSOS_Time_t::minute_shift;
time_ |= ACE_PSOS_Time_t::second_mask &
- ACE_static_cast (u_int, tm_struct->tm_sec);
+ static_cast<u_int> (tm_struct->tm_sec);
// encode nanoseconds as system clock ticks
- ticks_ = ACE_static_cast (u_long,
- ((ACE_static_cast (double, t.tv_nsec) *
- ACE_static_cast (double, KC_TICKS2SEC)) /
- ACE_static_cast (double, 1000000000)));
+ ticks_ = static_cast<u_long> (((static_cast<double> (t.tv_nsec) *
+ static_cast<double> (KC_TICKS2SEC)) /
+ static_cast<double> (1000000000)));
}
@@ -108,23 +106,23 @@ ACE_PSOS_Time_t::operator timespec_t (void)
// Decode date and time bit arrays and fill in fields of tm_struct.
tm_struct.tm_year =
- ACE_static_cast (int, (ACE_PSOS_Time_t::year_mask &
+ static_cast<int> ((ACE_PSOS_Time_t::year_mask &
(date_ >> ACE_PSOS_Time_t::year_shift))) -
ACE_PSOS_Time_t::year_origin;
tm_struct.tm_mon =
- ACE_static_cast (int, (ACE_PSOS_Time_t::month_mask &
+ static_cast<int> ((ACE_PSOS_Time_t::month_mask &
(date_ >> ACE_PSOS_Time_t::month_shift))) -
ACE_PSOS_Time_t::month_origin;
tm_struct.tm_mday =
- ACE_static_cast (int, (ACE_PSOS_Time_t::day_mask & date_));
+ static_cast<int> ((ACE_PSOS_Time_t::day_mask & date_));
tm_struct.tm_hour =
- ACE_static_cast (int, (ACE_PSOS_Time_t::hour_mask &
+ static_cast<int> ((ACE_PSOS_Time_t::hour_mask &
(time_ >> ACE_PSOS_Time_t::hour_shift)));
tm_struct.tm_min =
- ACE_static_cast (int, (ACE_PSOS_Time_t::minute_mask &
+ static_cast<int> ((ACE_PSOS_Time_t::minute_mask &
(time_ >> ACE_PSOS_Time_t::minute_shift)));
tm_struct.tm_sec =
- ACE_static_cast (int, (ACE_PSOS_Time_t::second_mask & time_));
+ static_cast<int> ((ACE_PSOS_Time_t::second_mask & time_));
// Indicate values we don't know as negative numbers.
tm_struct.tm_wday = -1;
@@ -137,10 +135,9 @@ ACE_PSOS_Time_t::operator timespec_t (void)
t.tv_sec = ACE_OS::mktime (&tm_struct);
// Encode nanoseconds as system clock ticks.
- t.tv_nsec = ACE_static_cast (long,
- ((ACE_static_cast (double, ticks_) *
- ACE_static_cast (double, 1000000000)) /
- ACE_static_cast (double, KC_TICKS2SEC)));
+ t.tv_nsec = static_cast<long> (((static_cast<double> (ticks_) *
+ static_cast<double> (1000000000)) /
+ static_cast<double> (KC_TICKS2SEC)));
return t;
}
diff --git a/ace/OS_NS_unistd.inl b/ace/OS_NS_unistd.inl
index ddc25a35042..fb0380c44c7 100644
--- a/ace/OS_NS_unistd.inl
+++ b/ace/OS_NS_unistd.inl
@@ -520,7 +520,7 @@ ACE_OS::getcwd (wchar_t *buf, size_t size)
ACE_UNUSED_ARG (size);
ACE_NOTSUP_RETURN (0);
# elif defined (ACE_WIN32)
- return ::_wgetcwd (buf, ACE_static_cast (int, size));
+ return ::_wgetcwd (buf, static_cast<int> (size));
# else
char *narrow_buf = new char[size];
char *result = 0;
diff --git a/ace/OS_NS_wchar.cpp b/ace/OS_NS_wchar.cpp
index 04d7fca9926..5e09dfc0a8d 100644
--- a/ace/OS_NS_wchar.cpp
+++ b/ace/OS_NS_wchar.cpp
@@ -69,8 +69,8 @@ wchar_t *
ACE_OS::wcschr_emulation (const wchar_t *string, wint_t c)
{
for (;*string ; ++string)
- if (*string == ACE_static_cast (wchar_t, c))
- return ACE_const_cast (wchar_t *, string);
+ if (*string == static_cast<wchar_t> (c))
+ return const_cast<wchar_t *> (string);
return 0;
}
@@ -291,7 +291,7 @@ ACE_OS::wcspbrk_emulation (const wchar_t *string,
{
for (scanp = charset; (sc = *scanp++) != 0;)
if (sc == c)
- return ACE_const_cast (wchar_t *, string - 1);
+ return const_cast<wchar_t *> (string - 1);
}
return 0;
@@ -304,7 +304,7 @@ ACE_OS::wcsrchr_emulation (const wchar_t *s, wint_t c)
{
const wchar_t *p = s + ACE_OS::strlen (s);
- while (*p != ACE_static_cast (wchar_t, c))
+ while (*p != static_cast<wchar_t> (c))
if (p == s)
return 0;
else
@@ -318,7 +318,7 @@ ACE_OS::wcsrchr_emulation (wchar_t *s, wint_t c)
{
wchar_t *p = s + ACE_OS::strlen (s);
- while (*p != ACE_static_cast(wchar_t, c))
+ while (*p != static_cast<wchar_t> (c))
if (p == s)
return 0;
else
@@ -369,7 +369,7 @@ ACE_OS::wcsstr_emulation (const wchar_t *string,
string--;
}
- return ACE_const_cast (wchar_t *, string);
+ return const_cast<wchar_t *> (string);
}
#endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSTR */
diff --git a/ace/OS_Thread_Adapter.cpp b/ace/OS_Thread_Adapter.cpp
index 85f8caf1670..1f7e94a2890 100644
--- a/ace/OS_Thread_Adapter.cpp
+++ b/ace/OS_Thread_Adapter.cpp
@@ -43,7 +43,7 @@ ACE_OS_Thread_Adapter::invoke (void)
// Extract the arguments.
ACE_THR_FUNC_INTERNAL func =
- ACE_reinterpret_cast (ACE_THR_FUNC_INTERNAL, this->user_func_);
+ reinterpret_cast<ACE_THR_FUNC_INTERNAL> (this->user_func_);
void *arg = this->arg_;
// Delete ourselves since we don't need <this> anymore. Make sure
@@ -80,7 +80,7 @@ ACE_OS_Thread_Adapter::invoke (void)
// Invoke the start hook to give the user a chance to
// perform some initialization processing before the
// <func> is invoked.
- status = hook->start (ACE_reinterpret_cast (ACE_THR_FUNC, func),
+ status = hook->start (reinterpret_cast<ACE_THR_FUNC> (func),
arg);
else
{
@@ -109,8 +109,7 @@ ACE_OS_Thread_Adapter::invoke (void)
// Task::svc_run to 0.
#if 0
// Call the <Task->close> hook.
- if (func == ACE_reinterpret_cast (ACE_THR_FUNC_INTERNAL,
- ACE_Task_Base::svc_run))
+ if (func == reinterpret_cast<ACE_THR_FUNC_INTERNAL> (ACE_Task_Base::svc_run))
{
ACE_Task_Base *task_ptr = (ACE_Task_Base *) arg;
ACE_Thread_Manager *thr_mgr_ptr = task_ptr->thr_mgr ();
diff --git a/ace/Obstack_T.cpp b/ace/Obstack_T.cpp
index b32171b7337..4fdeeae1c26 100644
--- a/ace/Obstack_T.cpp
+++ b/ace/Obstack_T.cpp
@@ -95,8 +95,7 @@ ACE_Obstack_T<CHAR>::grow (CHAR c)
if (this->request (1) == 0)
{
- CHAR *retv = ACE_reinterpret_cast (CHAR *,
- this->curr_->cur_);
+ CHAR *retv = reinterpret_cast<CHAR *> (this->curr_->cur_);
this->curr_->cur_ += sizeof (CHAR);
*retv = c;
return retv;
@@ -113,8 +112,7 @@ ACE_Obstack_T<CHAR>::new_chunk (void)
ACE_Obchunk *temp;
ACE_NEW_MALLOC_RETURN (temp,
- ACE_static_cast (ACE_Obchunk *,
- this->allocator_strategy_->malloc
+ static_cast<ACE_Obchunk *> (this->allocator_strategy_->malloc
(sizeof (class ACE_Obchunk) + this->size_)),
ACE_Obchunk (this->size_),
0);
@@ -172,8 +170,7 @@ template <class CHAR> void
ACE_Obstack_T<CHAR>::unwind (void* obj)
{
if (obj >= this->curr_->contents_ && obj < this->curr_->end_)
- this->curr_->block_ = this->curr_->cur_ = ACE_reinterpret_cast (char*,
- obj);
+ this->curr_->block_ = this->curr_->cur_ = reinterpret_cast<char*> (obj);
else
this->unwind_i (obj);
}
@@ -189,8 +186,7 @@ ACE_Obstack_T<CHAR>::unwind_i (void* obj)
if (curr)
{
this->curr_ = curr;
- this->curr_->block_ = this->curr_->cur_ = ACE_reinterpret_cast (char*,
- obj);
+ this->curr_->block_ = this->curr_->cur_ = reinterpret_cast<char*> (obj);
}
else if (obj != 0)
ACE_ERROR ((LM_ERROR,
diff --git a/ace/POSIX_Asynch_IO.cpp b/ace/POSIX_Asynch_IO.cpp
index 10558ce4fa7..900364ff095 100644
--- a/ace/POSIX_Asynch_IO.cpp
+++ b/ace/POSIX_Asynch_IO.cpp
@@ -96,8 +96,7 @@ int
ACE_POSIX_Asynch_Result::post_completion (ACE_Proactor_Impl *proactor_impl)
{
// Get to the platform specific implementation.
- ACE_POSIX_Proactor *posix_proactor = ACE_dynamic_cast (ACE_POSIX_Proactor *,
- proactor_impl);
+ ACE_POSIX_Proactor *posix_proactor = dynamic_cast<ACE_POSIX_Proactor *> (proactor_impl);
if (posix_proactor == 0)
ACE_ERROR_RETURN ((LM_ERROR, "Dynamic cast to POSIX Proactor failed\n"), -1);
@@ -1513,8 +1512,7 @@ ACE_POSIX_Asynch_Connect::connect_i (ACE_POSIX_Asynch_Connect_Result *result,
if (local_sap != ACE_Addr::sap_any)
{
- sockaddr * laddr = ACE_reinterpret_cast (sockaddr *,
- local_sap.get_addr ());
+ sockaddr * laddr = reinterpret_cast<sockaddr *> (local_sap.get_addr ());
size_t size = local_sap.get_size ();
if (ACE_OS::bind (handle, laddr, size) == -1)
@@ -1543,8 +1541,7 @@ ACE_POSIX_Asynch_Connect::connect_i (ACE_POSIX_Asynch_Connect_Result *result,
for (;;)
{
int rc = ACE_OS::connect (handle,
- ACE_reinterpret_cast (sockaddr *,
- remote_sap.get_addr ()),
+ reinterpret_cast<sockaddr *> (remote_sap.get_addr ()),
remote_sap.get_size ());
if (rc < 0) // failure
{
@@ -2034,7 +2031,7 @@ ACE_POSIX_Asynch_Transmit_Handler::transmit (void)
// Transmit the header.
if (this->ws_.write (*this->result_->header_and_trailer ()->header (),
this->result_->header_and_trailer ()->header_bytes (),
- ACE_reinterpret_cast (void *, &this->header_act_),
+ reinterpret_cast<void *> (&this->header_act_),
0) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Asynch_Transmit_Handler:transmitting header:write_stream failed\n"),
diff --git a/ace/POSIX_CB_Proactor.cpp b/ace/POSIX_CB_Proactor.cpp
index afae1751103..7bbaa7cc059 100644
--- a/ace/POSIX_CB_Proactor.cpp
+++ b/ace/POSIX_CB_Proactor.cpp
@@ -33,7 +33,7 @@ ACE_POSIX_CB_Proactor::~ACE_POSIX_CB_Proactor (void)
void ACE_POSIX_CB_Proactor::aio_completion_func (sigval_t cb_data)
{
- ACE_POSIX_CB_Proactor * impl = ACE_static_cast (ACE_POSIX_CB_Proactor *, cb_data.sival_ptr);
+ ACE_POSIX_CB_Proactor * impl = static_cast<ACE_POSIX_CB_Proactor *> (cb_data.sival_ptr);
if ( impl != 0 )
impl->notify_completion (0);
}
diff --git a/ace/POSIX_Proactor.cpp b/ace/POSIX_Proactor.cpp
index 08f23facffc..3f999a99c8f 100644
--- a/ace/POSIX_Proactor.cpp
+++ b/ace/POSIX_Proactor.cpp
@@ -1220,7 +1220,7 @@ ACE_POSIX_AIOCB_Proactor::get_result_status (ACE_POSIX_Asynch_Result *asynch_res
ssize_t op_return = aio_return (asynch_result);
if (op_return > 0)
- transfer_count = ACE_static_cast (size_t, op_return);
+ transfer_count = static_cast<size_t> (op_return);
// else transfer_count is already 0, error_status reports the error.
return 1; // completed
}
@@ -1320,7 +1320,7 @@ ACE_POSIX_AIOCB_Proactor::start_aio (ACE_POSIX_Asynch_Result *result,
if (slot < 0)
return -1;
- size_t index = ACE_static_cast (size_t, slot);
+ size_t index = static_cast<size_t> (slot);
result_list_[index] = result; //Store result ptr anyway
aiocb_list_cur_size_++;
@@ -1382,7 +1382,7 @@ ACE_POSIX_AIOCB_Proactor::allocate_aio_slot (ACE_POSIX_Asynch_Result *result)
//setup OS notification methods for this aio
result->aio_sigevent.sigev_notify = SIGEV_NONE;
- return ACE_static_cast (ssize_t, i);
+ return static_cast<ssize_t> (i);
}
// start_aio_i has new return codes
@@ -1837,12 +1837,12 @@ ACE_POSIX_SIG_Proactor::allocate_aio_slot (ACE_POSIX_Asynch_Result *result)
result->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
result->aio_sigevent.sigev_signo = result->signal_number ();
#if defined (__FreeBSD__)
- result->aio_sigevent.sigev_value.sigval_int = ACE_static_cast (int, i);
+ result->aio_sigevent.sigev_value.sigval_int = static_cast<int> (i);
#else
- result->aio_sigevent.sigev_value.sival_int = ACE_static_cast (int, i);
+ result->aio_sigevent.sigev_value.sival_int = static_cast<int> (i);
#endif /* __FreeBSD__ */
- return ACE_static_cast (ssize_t, i);
+ return static_cast<ssize_t> (i);
}
int
@@ -1887,9 +1887,9 @@ ACE_POSIX_SIG_Proactor::handle_events_i (const ACE_Time_Value *timeout)
// define index to start
// nothing will happen if it contains garbage
#if defined (__FreeBSD__)
- index = ACE_static_cast (size_t, sig_info.si_value.sigval_int);
+ index = static_cast<size_t> (sig_info.si_value.sigval_int);
#else
- index = ACE_static_cast (size_t, sig_info.si_value.sival_int);
+ index = static_cast<size_t> (sig_info.si_value.sival_int);
#endif
// Assume we have a correctly-functioning implementation, and that
// there is one I/O to process, and it's correctly specified in the
diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp
index 4783472d48e..bb702ecd68a 100644
--- a/ace/Parse_Node.cpp
+++ b/ace/Parse_Node.cpp
@@ -83,10 +83,8 @@ ACE_Parse_Node::link (ACE_Parse_Node *n)
ACE_Stream_Node::ACE_Stream_Node (const ACE_Static_Node *str_ops,
const ACE_Parse_Node *str_mods)
#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- : ACE_Parse_Node (str_ops == 0 ? ACE_static_cast (ACE_TCHAR *,
- ACE_LIB_TEXT ("<unknown>"))
- : ACE_static_cast (ACE_TCHAR *,
- str_ops->name ())),
+ : ACE_Parse_Node (str_ops == 0 ? static_cast<ACE_TCHAR *> (ACE_LIB_TEXT ("<unknown>"))
+ : static_cast<ACE_TCHAR *> (str_ops->name ())),
#else
: ACE_Parse_Node ((str_ops == 0 ? ACE_LIB_TEXT ("<unknown>") : str_ops->name ())),
#endif /* defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
@@ -100,11 +98,9 @@ ACE_Stream_Node::ACE_Stream_Node (const ACE_Static_Node *str_ops,
ACE_Stream_Node::~ACE_Stream_Node (void)
{
ACE_TRACE ("ACE_Stream_Node::~ACE_Stream_Node");
- ACE_Static_Node *n = ACE_const_cast (ACE_Static_Node *,
- this->node_);
+ ACE_Static_Node *n = const_cast<ACE_Static_Node *> (this->node_);
delete n;
- ACE_Parse_Node *m = ACE_const_cast (ACE_Parse_Node *,
- this->mods_);
+ ACE_Parse_Node *m = const_cast<ACE_Parse_Node *> (this->mods_);
delete m;
}
@@ -140,7 +136,7 @@ ACE_Parse_Node::print (void) const
ACE_Parse_Node::~ACE_Parse_Node (void)
{
ACE_TRACE ("ACE_Parse_Node::~ACE_Parse_Node");
- delete[] ACE_const_cast (ACE_TCHAR*, this->name_);
+ delete[] const_cast<ACE_TCHAR*> (this->name_);
delete this->next_;
}
@@ -447,7 +443,7 @@ ACE_Object_Node::symbol (int & yyerrno,
ACE_TRACE ("ACE_Object_Node::symbol");
if (this->open_dll (yyerrno) == 0)
{
- ACE_TCHAR *object_name = ACE_const_cast (ACE_TCHAR *, this->object_name_);
+ ACE_TCHAR *object_name = const_cast<ACE_TCHAR *> (this->object_name_);
this->symbol_ = this->dll_.symbol (object_name);
if (this->symbol_ == 0)
@@ -474,7 +470,7 @@ ACE_Object_Node::symbol (int & yyerrno,
ACE_Object_Node::~ACE_Object_Node (void)
{
ACE_TRACE ("ACE_Object_Node::~ACE_Object_Node");
- delete[] ACE_const_cast (ACE_TCHAR *, this->object_name_);
+ delete[] const_cast<ACE_TCHAR *> (this->object_name_);
}
ACE_ALLOC_HOOK_DEFINE (ACE_Function_Node)
@@ -511,8 +507,7 @@ ACE_Function_Node::symbol (int & yyerrno,
// Locate the factory function <function_name> in the shared
// object.
- ACE_TCHAR *function_name = ACE_const_cast (ACE_TCHAR *,
- this->function_name_);
+ ACE_TCHAR *function_name = const_cast<ACE_TCHAR *> (this->function_name_);
void *func_p = this->dll_.symbol (function_name);
if (func_p == 0)
{
@@ -534,8 +529,8 @@ ACE_Function_Node::symbol (int & yyerrno,
return 0;
}
}
- ptrdiff_t temp_p = ACE_reinterpret_cast (ptrdiff_t, func_p);
- func = ACE_reinterpret_cast (ACE_Service_Factory_Ptr, temp_p);
+ ptrdiff_t temp_p = reinterpret_cast<ptrdiff_t> (func_p);
+ func = reinterpret_cast<ACE_Service_Factory_Ptr> (temp_p);
// Invoke the factory function and record it's return value.
this->symbol_ = (*func) (gobbler);
@@ -554,8 +549,8 @@ ACE_Function_Node::symbol (int & yyerrno,
ACE_Function_Node::~ACE_Function_Node (void)
{
ACE_TRACE ("ACE_Function_Node::~ACE_Function_Node");
- delete[] ACE_const_cast (ACE_TCHAR *, function_name_);
- delete[] ACE_const_cast (ACE_TCHAR *, pathname_);
+ delete[] const_cast<ACE_TCHAR *> (function_name_);
+ delete[] const_cast<ACE_TCHAR *> (pathname_);
}
ACE_ALLOC_HOOK_DEFINE (ACE_Dummy_Node)
@@ -596,11 +591,9 @@ ACE_Dummy_Node::apply (int & yyerrno)
ACE_Dummy_Node::~ACE_Dummy_Node (void)
{
ACE_TRACE ("ACE_Dummy_Node::~ACE_Dummy_Node");
- ACE_Static_Node *n = ACE_const_cast (ACE_Static_Node *,
- this->node_);
+ ACE_Static_Node *n = const_cast<ACE_Static_Node *> (this->node_);
delete n;
- ACE_Parse_Node *m = ACE_const_cast (ACE_Parse_Node *,
- this->mods_);
+ ACE_Parse_Node *m = const_cast<ACE_Parse_Node *> (this->mods_);
delete m;
}
@@ -635,7 +628,7 @@ ACE_Static_Function_Node::symbol (int & yyerrno,
ACE_Static_Svc_Descriptor **ssdp = 0;
ACE_STATIC_SVCS &svcs = *ACE_Service_Config::static_svcs ();
- ACE_TCHAR *function_name = ACE_const_cast (ACE_TCHAR *, this->function_name_);
+ ACE_TCHAR *function_name = const_cast<ACE_TCHAR *> (this->function_name_);
for (ACE_STATIC_SVCS_ITERATOR iter (svcs);
iter.next (ssdp) != 0;
@@ -680,7 +673,7 @@ ACE_Static_Function_Node::symbol (int & yyerrno,
ACE_Static_Function_Node::~ACE_Static_Function_Node (void)
{
ACE_TRACE ("ACE_Static_Function_Node::~ACE_Static_Function_Node");
- delete[] ACE_const_cast (ACE_TCHAR *, this->function_name_);
+ delete[] const_cast<ACE_TCHAR *> (this->function_name_);
}
#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */
diff --git a/ace/Remote_Name_Space.cpp b/ace/Remote_Name_Space.cpp
index a8f91571ad7..fea56fd5b26 100644
--- a/ace/Remote_Name_Space.cpp
+++ b/ace/Remote_Name_Space.cpp
@@ -46,11 +46,11 @@ ACE_Remote_Name_Space::bind (const ACE_NS_WString &name,
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> name_urep (name.rep ());
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> value_urep (value.rep ());
ACE_UINT32 name_len =
- ACE_static_cast (ACE_UINT32, name.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (name.length () * sizeof (ACE_WCHAR_T));
ACE_UINT32 value_len =
- ACE_static_cast (ACE_UINT32, value.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (value.length () * sizeof (ACE_WCHAR_T));
ACE_UINT32 type_len =
- ACE_static_cast (ACE_UINT32, ACE_OS::strlen (type));
+ static_cast<ACE_UINT32> (ACE_OS::strlen (type));
ACE_Name_Request request (ACE_Name_Request::BIND,
name_urep.get (),
name_len,
@@ -70,11 +70,11 @@ ACE_Remote_Name_Space::rebind (const ACE_NS_WString &name,
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> name_urep (name.rep ());
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> value_urep (value.rep ());
ACE_UINT32 name_len =
- ACE_static_cast (ACE_UINT32, name.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (name.length () * sizeof (ACE_WCHAR_T));
ACE_UINT32 value_len =
- ACE_static_cast (ACE_UINT32, value.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (value.length () * sizeof (ACE_WCHAR_T));
ACE_UINT32 type_len =
- ACE_static_cast (ACE_UINT32, ACE_OS::strlen (type));
+ static_cast<ACE_UINT32> (ACE_OS::strlen (type));
ACE_Name_Request request (ACE_Name_Request::REBIND,
name_urep.get (),
name_len,
@@ -93,7 +93,7 @@ ACE_Remote_Name_Space::resolve (const ACE_NS_WString &name,
ACE_TRACE ("ACE_Remote_Name_Space::resolve");
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> name_urep (name.rep ());
ACE_UINT32 name_len =
- ACE_static_cast (ACE_UINT32, name.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (name.length () * sizeof (ACE_WCHAR_T));
ACE_Name_Request request (ACE_Name_Request::RESOLVE,
name_urep.get (),
name_len,
@@ -122,7 +122,7 @@ ACE_Remote_Name_Space::unbind (const ACE_NS_WString &name)
ACE_TRACE ("ACE_Remote_Name_Space::unbind");
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> name_urep (name.rep ());
ACE_UINT32 name_len =
- ACE_static_cast (ACE_UINT32, name.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (name.length () * sizeof (ACE_WCHAR_T));
ACE_Name_Request request (ACE_Name_Request::UNBIND,
name_urep.get (),
name_len,
@@ -137,7 +137,7 @@ ACE_Remote_Name_Space::list_names (ACE_WSTRING_SET &set,
ACE_TRACE ("ACE_Remote_Name_Space::list_names");
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> pattern_urep (pattern.rep ());
ACE_UINT32 pattern_len =
- ACE_static_cast (ACE_UINT32, pattern.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (pattern.length () * sizeof (ACE_WCHAR_T));
ACE_Name_Request request (ACE_Name_Request::LIST_NAMES,
pattern_urep.get (),
pattern_len,
@@ -171,7 +171,7 @@ ACE_Remote_Name_Space::list_values (ACE_WSTRING_SET &set,
ACE_TRACE ("ACE_Remote_Name_Space::list_values");
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> pattern_urep (pattern.rep ());
ACE_UINT32 pattern_len =
- ACE_static_cast (ACE_UINT32, pattern.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (pattern.length () * sizeof (ACE_WCHAR_T));
ACE_Name_Request request (ACE_Name_Request::LIST_VALUES,
pattern_urep.get (),
pattern_len,
@@ -206,7 +206,7 @@ ACE_Remote_Name_Space::list_types (ACE_WSTRING_SET &set,
ACE_TRACE ("ACE_Remote_Name_Space::list_types");
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> pattern_urep (pattern.rep ());
ACE_UINT32 pattern_len =
- ACE_static_cast (ACE_UINT32, pattern.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (pattern.length () * sizeof (ACE_WCHAR_T));
ACE_Name_Request request (ACE_Name_Request::LIST_TYPES,
pattern_urep.get (),
pattern_len,
@@ -241,7 +241,7 @@ ACE_Remote_Name_Space::list_name_entries (ACE_BINDING_SET &set,
ACE_TRACE ("ACE_Remote_Name_Space::list_name_entries");
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> pattern_urep (pattern.rep ());
ACE_UINT32 pattern_len =
- ACE_static_cast (ACE_UINT32, pattern.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (pattern.length () * sizeof (ACE_WCHAR_T));
ACE_Name_Request request (ACE_Name_Request::LIST_NAME_ENTRIES,
pattern_urep.get (),
pattern_len,
@@ -282,7 +282,7 @@ ACE_Remote_Name_Space::list_value_entries (ACE_BINDING_SET &set,
ACE_TRACE ("ACE_Remote_Name_Space::list_value_entries");
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> pattern_urep (pattern.rep ());
ACE_UINT32 pattern_len =
- ACE_static_cast (ACE_UINT32, pattern.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (pattern.length () * sizeof (ACE_WCHAR_T));
ACE_Name_Request request (ACE_Name_Request::LIST_VALUE_ENTRIES,
pattern_urep.get (),
pattern_len,
@@ -323,7 +323,7 @@ ACE_Remote_Name_Space::list_type_entries (ACE_BINDING_SET &set,
ACE_TRACE ("ACE_Remote_Name_Space::list_type_entries");
ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> pattern_urep (pattern.rep ());
ACE_UINT32 pattern_len =
- ACE_static_cast (ACE_UINT32, pattern.length () * sizeof (ACE_WCHAR_T));
+ static_cast<ACE_UINT32> (pattern.length () * sizeof (ACE_WCHAR_T));
ACE_Name_Request request (ACE_Name_Request::LIST_TYPE_ENTRIES,
pattern_urep.get (),
pattern_len,
diff --git a/ace/SOCK_Acceptor.cpp b/ace/SOCK_Acceptor.cpp
index 151c29b3ce0..ffb187b5e17 100644
--- a/ace/SOCK_Acceptor.cpp
+++ b/ace/SOCK_Acceptor.cpp
@@ -229,8 +229,7 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap,
if (protocol_family == PF_INET6)
{
sockaddr_in6 local_inet6_addr;
- ACE_OS::memset (ACE_reinterpret_cast (void *,
- &local_inet6_addr),
+ ACE_OS::memset (reinterpret_cast<void *> (&local_inet6_addr),
0,
sizeof local_inet6_addr);
@@ -241,15 +240,13 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap,
local_inet6_addr.sin6_addr = in6addr_any;
}
else
- local_inet6_addr = *ACE_reinterpret_cast (sockaddr_in6 *,
- local_sap.get_addr ());
+ local_inet6_addr = *reinterpret_cast<sockaddr_in6 *> (local_sap.get_addr ());
// We probably don't need a bind_port written here.
// There are currently no supported OS's that define
// ACE_LACKS_WILDCARD_BIND.
if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- &local_inet6_addr),
+ reinterpret_cast<sockaddr *> (&local_inet6_addr),
sizeof local_inet6_addr) == -1)
error = 1;
}
@@ -258,8 +255,7 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap,
if (protocol_family == PF_INET)
{
sockaddr_in local_inet_addr;
- ACE_OS::memset (ACE_reinterpret_cast (void *,
- &local_inet_addr),
+ ACE_OS::memset (reinterpret_cast<void *> (&local_inet_addr),
0,
sizeof local_inet_addr);
@@ -268,8 +264,7 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap,
local_inet_addr.sin_port = 0;
}
else
- local_inet_addr = *ACE_reinterpret_cast (sockaddr_in *,
- local_sap.get_addr ());
+ local_inet_addr = *reinterpret_cast<sockaddr_in *> (local_sap.get_addr ());
if (local_inet_addr.sin_port == 0)
{
if (ACE::bind_port (this->get_handle (),
@@ -277,8 +272,7 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap,
error = 1;
}
else if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- &local_inet_addr),
+ reinterpret_cast<sockaddr *> (&local_inet_addr),
sizeof local_inet_addr) == -1)
error = 1;
}
diff --git a/ace/SOCK_Connector.cpp b/ace/SOCK_Connector.cpp
index fe7fa79103d..86c09b92f1d 100644
--- a/ace/SOCK_Connector.cpp
+++ b/ace/SOCK_Connector.cpp
@@ -81,8 +81,7 @@ ACE_SOCK_Connector::shared_connect_start (ACE_SOCK_Stream &new_stream,
if (local_sap != ACE_Addr::sap_any)
{
- sockaddr *laddr = ACE_reinterpret_cast (sockaddr *,
- local_sap.get_addr ());
+ sockaddr *laddr = reinterpret_cast<sockaddr *> (local_sap.get_addr ());
int size = local_sap.get_size ();
if (ACE_OS::bind (new_stream.get_handle (),
@@ -168,8 +167,7 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream,
return -1;
int result = ACE_OS::connect (new_stream.get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- remote_sap.get_addr ()),
+ reinterpret_cast<sockaddr *> (remote_sap.get_addr ()),
remote_sap.get_size ());
return this->shared_connect_finish (new_stream,
@@ -206,8 +204,7 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream,
return -1;
int result = ACE_OS::connect (new_stream.get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- remote_sap.get_addr ()),
+ reinterpret_cast<sockaddr *> (remote_sap.get_addr ()),
remote_sap.get_size (),
qos_params);
@@ -254,8 +251,7 @@ ACE_SOCK_Connector::complete (ACE_SOCK_Stream &new_stream,
if (remote_sap != 0)
{
int len = remote_sap->get_size ();
- sockaddr *addr = ACE_reinterpret_cast (sockaddr *,
- remote_sap->get_addr ());
+ sockaddr *addr = reinterpret_cast<sockaddr *> (remote_sap->get_addr ());
if (ACE_OS::getpeername (h,
addr,
&len) == -1)
diff --git a/ace/SOCK_Dgram_Mcast.cpp b/ace/SOCK_Dgram_Mcast.cpp
index 243ac51dd5c..b4755a848be 100644
--- a/ace/SOCK_Dgram_Mcast.cpp
+++ b/ace/SOCK_Dgram_Mcast.cpp
@@ -92,13 +92,13 @@ ACE_SOCK_Dgram_Mcast::dump (void) const
ip_mreq *pm = iter.next ();
// Get subscribed address (w/out port# info - not relevant).
- ACE_INET_Addr ip_addr (ACE_static_cast (u_short, 0),
+ ACE_INET_Addr ip_addr (static_cast<u_short> (0),
ACE_NTOHL (pm->IMR_MULTIADDR.s_addr));
ACE_SDM_helpers::addr_to_string (ip_addr, addr_string,
sizeof addr_string, 1);
// Get interface address/specification.
- ACE_INET_Addr if_addr (ACE_static_cast (u_short, 0),
+ ACE_INET_Addr if_addr (static_cast<u_short> (0),
ACE_NTOHL (pm->imr_interface.s_addr));
ACE_SDM_helpers::addr_to_string (if_addr, iface_string,
sizeof iface_string, 1);
@@ -984,8 +984,7 @@ ACE_SOCK_Dgram_Mcast::make_multicast_ifaddr (ip_mreq *ret_mreq,
return -1;
sockaddr_in *socket_address;
- socket_address = ACE_reinterpret_cast (sockaddr_in*,
- &if_address.ifr_addr);
+ socket_address = reinterpret_cast<sockaddr_in*> (&if_address.ifr_addr);
lmreq.imr_interface.s_addr = socket_address->sin_addr.s_addr;
#endif /* ACE_WIN32 || __INTERIX */
}
diff --git a/ace/SOCK_SEQPACK_Acceptor.cpp b/ace/SOCK_SEQPACK_Acceptor.cpp
index fa45e5d83a0..7ec5fadbbde 100644
--- a/ace/SOCK_SEQPACK_Acceptor.cpp
+++ b/ace/SOCK_SEQPACK_Acceptor.cpp
@@ -171,8 +171,7 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Addr &local_sap,
if (protocol_family == PF_INET6)
{
sockaddr_in6 local_inet6_addr;
- ACE_OS::memset (ACE_reinterpret_cast (void *,
- &local_inet6_addr),
+ ACE_OS::memset (reinterpret_cast<void *> (&local_inet6_addr),
0,
sizeof local_inet6_addr);
@@ -183,15 +182,13 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Addr &local_sap,
local_inet6_addr.sin6_addr = in6addr_any;
}
else
- local_inet6_addr = *ACE_reinterpret_cast (sockaddr_in6 *,
- local_sap.get_addr ());
+ local_inet6_addr = *reinterpret_cast<sockaddr_in6 *> (local_sap.get_addr ());
// We probably don't need a bind_port written here.
// There are currently no supported OS's that define
// ACE_LACKS_WILDCARD_BIND.
if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- &local_inet6_addr),
+ reinterpret_cast<sockaddr *> (&local_inet6_addr),
sizeof local_inet6_addr) == -1)
error = 1;
}
@@ -200,8 +197,7 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Addr &local_sap,
if (protocol_family == PF_INET)
{
sockaddr_in local_inet_addr;
- ACE_OS::memset (ACE_reinterpret_cast (void *,
- &local_inet_addr),
+ ACE_OS::memset (reinterpret_cast<void *> (&local_inet_addr),
0,
sizeof local_inet_addr);
@@ -210,16 +206,14 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Addr &local_sap,
local_inet_addr.sin_port = 0;
}
else
- local_inet_addr = *ACE_reinterpret_cast (sockaddr_in *,
- local_sap.get_addr ());
+ local_inet_addr = *reinterpret_cast<sockaddr_in *> (local_sap.get_addr ());
if (local_inet_addr.sin_port == 0)
{
if (ACE::bind_port (this->get_handle ()) == -1)
error = 1;
}
else if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- &local_inet_addr),
+ reinterpret_cast<sockaddr *> (&local_inet_addr),
sizeof local_inet_addr) == -1)
error = 1;
}
@@ -256,8 +250,7 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Multihomed_INET_Addr &local_sa
if (protocol_family == PF_INET6)
{
sockaddr_in6 local_inet6_addr;
- ACE_OS::memset (ACE_reinterpret_cast (void *,
- &local_inet6_addr),
+ ACE_OS::memset (reinterpret_cast<void *> (&local_inet6_addr),
0,
sizeof local_inet6_addr);
@@ -268,15 +261,13 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Multihomed_INET_Addr &local_sa
local_inet6_addr.sin6_addr = in6addr_any;
}
else
- local_inet6_addr = *ACE_reinterpret_cast (sockaddr_in6 *,
- local_sap.get_addr ());
+ local_inet6_addr = *reinterpret_cast<sockaddr_in6 *> (local_sap.get_addr ());
// We probably don't need a bind_port written here.
// There are currently no supported OS's that define
// ACE_LACKS_WILDCARD_BIND.
if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- &local_inet6_addr),
+ reinterpret_cast<sockaddr *> (&local_inet6_addr),
sizeof local_inet6_addr) == -1)
error = 1;
}
@@ -285,8 +276,7 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Multihomed_INET_Addr &local_sa
if (protocol_family == PF_INET)
{
sockaddr_in local_inet_addr;
- ACE_OS::memset (ACE_reinterpret_cast (void *,
- &local_inet_addr),
+ ACE_OS::memset (reinterpret_cast<void *> (&local_inet_addr),
0,
sizeof local_inet_addr);
@@ -295,8 +285,7 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Multihomed_INET_Addr &local_sa
local_inet_addr.sin_port = 0;
}
else
- local_inet_addr = *ACE_reinterpret_cast (sockaddr_in *,
- local_sap.get_addr ());
+ local_inet_addr = *reinterpret_cast<sockaddr_in *> (local_sap.get_addr ());
// A port number of 0 means that the user is requesting that the
// operating system choose an arbitrary, unused port. Since some
@@ -362,8 +351,7 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Multihomed_INET_Addr &local_sa
// bind the primary first
if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast(sockaddr *,
- &(local_inet_addrs[0])),
+ reinterpret_cast<sockaddr *> (&(local_inet_addrs[0])),
sizeof(sockaddr)) == -1)
{
error = 1;
@@ -391,8 +379,7 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Multihomed_INET_Addr &local_sa
// now call bindx
if (!error && sctp_bindx(this->get_handle (),
- ACE_reinterpret_cast(sockaddr *,
- local_sockaddr),
+ reinterpret_cast<sockaddr *> (local_sockaddr),
num_addresses - 1,
SCTP_BINDX_ADD_ADDR))
{
@@ -405,9 +392,8 @@ ACE_SOCK_SEQPACK_Acceptor::shared_open (const ACE_Multihomed_INET_Addr &local_sa
// Call bind
size_t name_len = (sizeof local_inet_addr) * num_addresses;
if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- local_inet_addrs),
- ACE_static_cast (int, name_len)) == -1)
+ reinterpret_cast<sockaddr *> (local_inet_addrs),
+ static_cast<int> (name_len)) == -1)
error = 1;
#endif /* ACE_HAS_LKSCTP */
}
diff --git a/ace/SOCK_SEQPACK_Association.cpp b/ace/SOCK_SEQPACK_Association.cpp
index 671da106056..45eed58d1a4 100644
--- a/ace/SOCK_SEQPACK_Association.cpp
+++ b/ace/SOCK_SEQPACK_Association.cpp
@@ -57,7 +57,7 @@ ACE_SOCK_SEQPACK_Association::abort (void)
if (-1 == ACE_OS::setsockopt (this->get_handle (),
SOL_SOCKET,
SO_LINGER,
- ACE_reinterpret_cast (const char *, &slinger),
+ reinterpret_cast<const char *> (&slinger),
sizeof (linger)))
{
return -1;
@@ -177,20 +177,19 @@ ACE_SOCK_SEQPACK_Association::get_local_addrs (ACE_INET_Addr *addrs, size_t &siz
** the number of bytes written to addr_structs.
** Use name_size to get the data types right across the call.
*/
- int name_size = ACE_static_cast (int, physical_size);
+ int name_size = static_cast<int> (physical_size);
if (ACE_OS::getsockname (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- addr_structs.get()),
+ reinterpret_cast<sockaddr *> (addr_structs.get()),
&name_size) == -1)
return -1;
/* Calculate the NEW physical size of the array */
name_size /= sizeof (sockaddr_in);
- size = ACE_static_cast (size_t, name_size);
+ size = static_cast<size_t> (name_size);
/* Copy each sockaddr_in to the address structure of an ACE_Addr from
the passed-in array */
- const int addrlen (ACE_static_cast (int, sizeof (sockaddr_in)));
+ const int addrlen (static_cast<int> (sizeof (sockaddr_in)));
for (int i = 0; i < name_size; ++i)
{
addrs[i].set_addr (&(addr_structs[i]), addrlen);
@@ -312,20 +311,19 @@ ACE_SOCK_SEQPACK_Association::get_remote_addrs (ACE_INET_Addr *addrs, size_t &si
** the number of bytes written to addr_structs.
** Use name_size to get the data types right across the call.
*/
- int name_size = ACE_static_cast (int, physical_size);
+ int name_size = static_cast<int> (physical_size);
if (ACE_OS::getpeername (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- addr_structs.get()),
+ reinterpret_cast<sockaddr *> (addr_structs.get()),
&name_size) == -1)
return -1;
/* Calculate the NEW physical size of the array */
name_size /= sizeof (sockaddr_in);
- size = ACE_static_cast (size_t, name_size);
+ size = static_cast<size_t> (name_size);
/* Copy each sockaddr_in to the address structure of an ACE_Addr from
the passed-in array */
- const int addrlen (ACE_static_cast (int, sizeof (sockaddr_in)));
+ const int addrlen (static_cast<int> (sizeof (sockaddr_in)));
for (int i = 0; i < name_size; ++i)
{
addrs[i].set_addr (&(addr_structs[i]), addrlen);
diff --git a/ace/SOCK_SEQPACK_Connector.cpp b/ace/SOCK_SEQPACK_Connector.cpp
index 3db27f24e26..b7cb5471755 100644
--- a/ace/SOCK_SEQPACK_Connector.cpp
+++ b/ace/SOCK_SEQPACK_Connector.cpp
@@ -93,8 +93,7 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association &
if (local_sap != ACE_Addr::sap_any)
{
- sockaddr *laddr = ACE_reinterpret_cast (sockaddr *,
- local_sap.get_addr ());
+ sockaddr *laddr = reinterpret_cast<sockaddr *> (local_sap.get_addr ());
int size = local_sap.get_size ();
if (ACE_OS::bind (new_association.get_handle (),
@@ -149,8 +148,7 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association &
// bind to the primary addr first
if (ACE_OS::bind(new_association.get_handle (),
- ACE_reinterpret_cast(sockaddr *,
- &(local_inet_addrs[0])),
+ reinterpret_cast<sockaddr *> (&(local_inet_addrs[0])),
sizeof(sockaddr)))
{
ACE_Errno_Guard error (errno);
@@ -167,8 +165,7 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association &
// get sockaddr_in for the local handle
if (ACE_OS::getsockname(new_association.get_handle (),
- ACE_reinterpret_cast(sockaddr *,
- &portst),
+ reinterpret_cast<sockaddr *> (&portst),
&sn))
{
ACE_Errno_Guard error (errno);
@@ -192,7 +189,7 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association &
// bind other ifaces
if (sctp_bindx(new_association.get_handle(),
- ACE_reinterpret_cast(sockaddr *, local_sockaddr),
+ reinterpret_cast<sockaddr *> (local_sockaddr),
num_addresses - 1,
SCTP_BINDX_ADD_ADDR))
{
@@ -208,9 +205,8 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association &
// Call bind
size_t name_len = (sizeof (sockaddr_in)) * num_addresses;
if (ACE_OS::bind (new_association.get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- local_inet_addrs),
- ACE_static_cast (int, name_len)) == -1)
+ reinterpret_cast<sockaddr *> (local_inet_addrs),
+ static_cast<int> (name_len)) == -1)
{
// Save/restore errno.
ACE_Errno_Guard error (errno);
@@ -295,8 +291,7 @@ ACE_SOCK_SEQPACK_Connector::connect (ACE_SOCK_SEQPACK_Association &new_associati
return -1;
int result = ACE_OS::connect (new_association.get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- remote_sap.get_addr ()),
+ reinterpret_cast<sockaddr *> (remote_sap.get_addr ()),
remote_sap.get_size ());
return this->shared_connect_finish (new_association,
@@ -328,8 +323,7 @@ ACE_SOCK_SEQPACK_Connector::connect (ACE_SOCK_SEQPACK_Association &new_associati
return -1;
int result = ACE_OS::connect (new_association.get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- remote_sap.get_addr ()),
+ reinterpret_cast<sockaddr *> (remote_sap.get_addr ()),
remote_sap.get_size ());
return this->shared_connect_finish (new_association,
@@ -374,8 +368,7 @@ ACE_SOCK_SEQPACK_Connector::complete (ACE_SOCK_SEQPACK_Association &new_associat
if (remote_sap != 0)
{
int len = remote_sap->get_size ();
- sockaddr *addr = ACE_reinterpret_cast (sockaddr *,
- remote_sap->get_addr ());
+ sockaddr *addr = reinterpret_cast<sockaddr *> (remote_sap->get_addr ());
if (ACE_OS::getpeername (h,
addr,
&len) == -1)
diff --git a/ace/Select_Reactor_Base.cpp b/ace/Select_Reactor_Base.cpp
index 294417c0511..735babf577a 100644
--- a/ace/Select_Reactor_Base.cpp
+++ b/ace/Select_Reactor_Base.cpp
@@ -686,7 +686,7 @@ ACE_Select_Reactor_Notify::open (ACE_Reactor_Impl *r,
if (disable_notify_pipe == 0)
{
this->select_reactor_ =
- ACE_dynamic_cast (ACE_Select_Reactor_Impl *, r);
+ dynamic_cast<ACE_Select_Reactor_Impl *> (r);
if (select_reactor_ == 0)
{
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
index 16bfe2510c8..8e8f1278ef6 100644
--- a/ace/Service_Config.cpp
+++ b/ace/Service_Config.cpp
@@ -687,7 +687,7 @@ ACE_Service_Config::open_i (const ACE_TCHAR program_name[],
{
ACE_OS::fprintf (pidf,
"%ld\n",
- ACE_static_cast(long, ACE_OS::getpid()));
+ static_cast<long> (ACE_OS::getpid()));
ACE_OS::fclose (pidf);
}
}
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp
index 4952f95fc1b..c872df591ff 100644
--- a/ace/Service_Repository.cpp
+++ b/ace/Service_Repository.cpp
@@ -112,8 +112,7 @@ ACE_Service_Repository::open (int size)
ACE_Service_Type *[size],
-1);
- this->service_vector_ = ACE_const_cast (const ACE_Service_Type **,
- temp);
+ this->service_vector_ = const_cast<const ACE_Service_Type **> (temp);
this->total_size_ = size;
return 0;
}
@@ -154,8 +153,7 @@ ACE_Service_Repository::fini (void)
ACE_LIB_TEXT ("finalizing %s\n"),
this->service_vector_[i]->name ()));
ACE_Service_Type *s =
- ACE_const_cast (ACE_Service_Type *,
- this->service_vector_[i]);
+ const_cast<ACE_Service_Type *> (this->service_vector_[i]);
// Collect errors.
retval += s->fini ();
}
@@ -182,8 +180,7 @@ ACE_Service_Repository::close (void)
for (int i = this->current_size_ - 1; i >= 0; i--)
{
- ACE_Service_Type *s = ACE_const_cast (ACE_Service_Type *,
- this->service_vector_[i]);
+ ACE_Service_Type *s = const_cast<ACE_Service_Type *> (this->service_vector_[i]);
--this->current_size_;
delete s;
}
@@ -284,8 +281,7 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr)
}
else
{
- s = ACE_const_cast (ACE_Service_Type *,
- this->service_vector_[i]);
+ s = const_cast<ACE_Service_Type *> (this->service_vector_[i]);
this->service_vector_[i] = sr;
return_value = 0;
}
@@ -365,8 +361,7 @@ ACE_Service_Repository::remove (const ACE_TCHAR name[], ACE_Service_Type **ps)
if (i == -1)
return -1;
- s = ACE_const_cast (ACE_Service_Type *,
- this->service_vector_[i]);
+ s = const_cast<ACE_Service_Type *> (this->service_vector_[i]);
--this->current_size_;
if (this->current_size_ >= 1)
diff --git a/ace/Sock_Connect.cpp b/ace/Sock_Connect.cpp
index 138f0150d09..caa60a11b2a 100644
--- a/ace/Sock_Connect.cpp
+++ b/ace/Sock_Connect.cpp
@@ -488,8 +488,8 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
ACE_LIB_TEXT ("ioctl (get broadaddr)")));
else
{
- ACE_OS::memcpy (ACE_reinterpret_cast(sockaddr_in *, &ip_addr),
- ACE_reinterpret_cast(sockaddr_in *, &if_req.ifr_broadaddr),
+ ACE_OS::memcpy (reinterpret_cast<sockaddr_in *> (&ip_addr),
+ reinterpret_cast<sockaddr_in *> (&if_req.ifr_broadaddr),
sizeof if_req.ifr_broadaddr);
ACE_OS::memcpy ((void *) &host_addr,
@@ -587,7 +587,7 @@ ACE::get_ip_interfaces (size_t &count,
continue;
// We assume IPv4 addresses here
- addrp = ACE_reinterpret_cast(struct sockaddr_in *, &(lpii->iiAddress));
+ addrp = reinterpret_cast<struct sockaddr_in *> (&(lpii->iiAddress));
if (addrp->sin_addr.s_addr == INADDR_ANY)
continue;
@@ -997,7 +997,7 @@ ACE::get_ip_interfaces (size_t &count,
p_if->ifa_addr->sa_family == AF_INET)
{
struct sockaddr_in *addr =
- ACE_reinterpret_cast(sockaddr_in *, p_if->ifa_addr);
+ reinterpret_cast<sockaddr_in *> (p_if->ifa_addr);
// Sometimes the kernel returns 0.0.0.0 as the interface
// address, skip those...
@@ -1098,7 +1098,7 @@ ACE::get_ip_interfaces (size_t &count,
{
#if !defined(_UNICOS)
struct sockaddr_in *addr =
- ACE_reinterpret_cast(sockaddr_in *, &pcur->ifr_addr);
+ reinterpret_cast<sockaddr_in *> (&pcur->ifr_addr);
// Sometimes the kernel returns 0.0.0.0 as the interface
// address, skip those...
diff --git a/ace/Stream_Modules.cpp b/ace/Stream_Modules.cpp
index 6afe507f06b..3e4b4a6f1b7 100644
--- a/ace/Stream_Modules.cpp
+++ b/ace/Stream_Modules.cpp
@@ -143,7 +143,7 @@ ACE_Stream_Head<ACE_SYNCH_USE>::info (ACE_TCHAR **strp, size_t length) const
return -1;
else
ACE_OS::strsncpy (*strp, name, length);
- return ACE_static_cast (int, ACE_OS::strlen (name));
+ return static_cast<int> (ACE_OS::strlen (name));
}
template <ACE_SYNCH_DECL> int
@@ -286,7 +286,7 @@ ACE_Stream_Tail<ACE_SYNCH_USE>::info (ACE_TCHAR **strp, size_t length) const
return -1;
else
ACE_OS::strsncpy (*strp, name, length);
- return ACE_static_cast (int, ACE_OS::strlen (name));
+ return static_cast<int> (ACE_OS::strlen (name));
}
template <ACE_SYNCH_DECL> int
@@ -365,7 +365,7 @@ ACE_Thru_Task<ACE_SYNCH_USE>::info (ACE_TCHAR **strp,
return -1;
else
ACE_OS::strsncpy (*strp, name, length);
- return ACE_static_cast (int, ACE_OS::strlen (name));
+ return static_cast<int> (ACE_OS::strlen (name));
}
template <ACE_SYNCH_DECL> int
diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y
index 002d4d59b00..c34b71eedcb 100644
--- a/ace/Svc_Conf.y
+++ b/ace/Svc_Conf.y
@@ -172,9 +172,7 @@ module
svc_type,
ACE_SVC_CONF_PARAM->yyerrno);
ACE_Stream_Type *st =
- ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- module->record ()->type ()));
+ dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (module->record ()->type ()));
if (mt->init (args.argc (), args.argv ()) == -1
|| st->push (mt) == -1)
@@ -224,9 +222,7 @@ module
ACE_SVC_CONF_PARAM->yyerrno);
ACE_Stream_Type *st =
- ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- stream->record ()->type ()));
+ dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (stream->record ()->type ()));
if (mt != 0 && st->remove (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
@@ -363,9 +359,7 @@ ace_get_module (ACE_Static_Node *str_rec,
const ACE_Service_Type_Impl *type = sr->type ();
ACE_Stream_Type *st = sr == 0
? 0
- : ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- type));
+ : dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (type));
ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name);
if (sr == 0 || st == 0 || mt == 0)
diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp
index 96d83d8147e..9826310aebb 100644
--- a/ace/Svc_Conf_y.cpp
+++ b/ace/Svc_Conf_y.cpp
@@ -1079,9 +1079,7 @@ case 25:
svc_type,
ACE_SVC_CONF_PARAM->yyerrno);
ACE_Stream_Type *st =
- ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- module->record ()->type ()));
+ dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (module->record ()->type ()));
if (mt->init (args.argc (), args.argv ()) == -1
|| st->push (mt) == -1)
@@ -1135,9 +1133,7 @@ case 29:
ACE_SVC_CONF_PARAM->yyerrno);
ACE_Stream_Type *st =
- ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- stream->record ()->type ()));
+ dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (stream->record ()->type ()));
if (mt != 0 && st->remove (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
@@ -1495,9 +1491,7 @@ ace_get_module (ACE_Static_Node *str_rec,
const ACE_Service_Type_Impl *type = sr->type ();
ACE_Stream_Type *st = sr == 0
? 0
- : ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- type));
+ : dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (type));
ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name);
if (sr == 0 || st == 0 || mt == 0)
diff --git a/ace/TLI.cpp b/ace/TLI.cpp
index 22c747bade0..3efa611ef74 100644
--- a/ace/TLI.cpp
+++ b/ace/TLI.cpp
@@ -129,15 +129,15 @@ ACE_TLI::set_option (int level, int option, void *optval, int optlen)
struct t_optmgmt req, ret;
ACE_NEW_RETURN (req.opt.buf, char[sizeof (struct t_opthdr) + optlen], -1);
# if (_XOPEN_SOURCE - 0 >= 500)
- auto_ptr<char> req_opt_buf_p (ACE_reinterpret_cast (char*, req.opt.buf));
+ auto_ptr<char> req_opt_buf_p (reinterpret_cast<char*> (req.opt.buf));
# else
ACE_Auto_Array_Ptr<char> req_opt_buf_p (req.opt.buf);
# endif /* XPG5 vs XPG4 */
struct t_opthdr *opthdr =
- ACE_reinterpret_cast (struct t_opthdr *, req.opt.buf);
+ reinterpret_cast<struct t_opthdr *> (req.opt.buf);
ACE_NEW_RETURN (ret.opt.buf, char[sizeof (struct t_opthdr) + optlen], -1);
# if (_XOPEN_SOURCE - 0 >= 500)
- auto_ptr<char> ret_opt_buf_p (ACE_reinterpret_cast (char*, ret.opt.buf));
+ auto_ptr<char> ret_opt_buf_p (reinterpret_cast<char*> (ret.opt.buf));
# else
ACE_Auto_Array_Ptr<char> ret_opt_buf_p (ret.opt.buf);
# endif /* XPG5 vs XPG4 */
@@ -167,7 +167,7 @@ ACE_TLI::set_option (int level, int option, void *optval, int optlen)
return -1;
}
- opthdr = ACE_reinterpret_cast (struct opthdr *, this->so_opt_req.opt.buf);
+ opthdr = reinterpret_cast<struct opthdr *> (this->so_opt_req.opt.buf);
opthdr->level = level;
opthdr->name = option;
opthdr->len = OPTLEN (optlen);
@@ -194,15 +194,15 @@ ACE_TLI::get_option (int level, int option, void *optval, int &optlen)
struct t_optmgmt req, ret;
ACE_NEW_RETURN (req.opt.buf, char[sizeof (struct t_opthdr)], -1);
# if (_XOPEN_SOURCE - 0 >= 500)
- auto_ptr<char> req_opt_buf_p (ACE_reinterpret_cast (char*, req.opt.buf));
+ auto_ptr<char> req_opt_buf_p (reinterpret_cast<char*> (req.opt.buf));
# else
ACE_Auto_Array_Ptr<char> req_opt_buf_p (req.opt.buf);
# endif /* XPG5 vs XPG4 */
struct t_opthdr *opthdr =
- ACE_reinterpret_cast (struct t_opthdr *, req.opt.buf);
+ reinterpret_cast<struct t_opthdr *> (req.opt.buf);
ACE_NEW_RETURN (ret.opt.buf, char[sizeof (struct t_opthdr) + optlen], -1);
# if (_XOPEN_SOURCE - 0 >= 500)
- auto_ptr<char> ret_opt_buf_p (ACE_reinterpret_cast (char*, ret.opt.buf));
+ auto_ptr<char> ret_opt_buf_p (reinterpret_cast<char*> (ret.opt.buf));
# else
ACE_Auto_Array_Ptr<char> ret_opt_buf_p (ret.opt.buf);
# endif /* XPG5 vs XPG4 */
@@ -217,7 +217,7 @@ ACE_TLI::get_option (int level, int option, void *optval, int &optlen)
return -1;
else
{
- opthdr = ACE_reinterpret_cast (struct t_opthdr *, ret.opt.buf);
+ opthdr = reinterpret_cast<struct t_opthdr *> (ret.opt.buf);
if (opthdr->status == T_NOTSUPPORT)
{
errno = ENOTSUP;
diff --git a/ace/TLI_Acceptor.cpp b/ace/TLI_Acceptor.cpp
index 193a64aecb9..180bcc95717 100644
--- a/ace/TLI_Acceptor.cpp
+++ b/ace/TLI_Acceptor.cpp
@@ -160,7 +160,7 @@ open_new_endpoint (ACE_HANDLE listen_handle,
#if defined (I_PUSH) && !defined (ACE_HAS_FORE_ATM_XTI)
else if (rwf != 0 && ACE_OS::ioctl (fd,
I_PUSH,
- ACE_const_cast (char *, "tirdwr"))
+ const_cast<char *> ("tirdwr"))
== ACE_INVALID_HANDLE)
fd = ACE_INVALID_HANDLE;
#else
diff --git a/ace/TLI_Connector.cpp b/ace/TLI_Connector.cpp
index 1a717f338b6..d48d854f8e1 100644
--- a/ace/TLI_Connector.cpp
+++ b/ace/TLI_Connector.cpp
@@ -178,7 +178,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
if (new_stream.get_rwflag ())
result = ACE_OS::ioctl (new_stream.get_handle (),
I_PUSH,
- ACE_const_cast (char *, "tirdwr"));
+ const_cast<char *> ("tirdwr"));
#endif /* I_PUSH */
}
else if (!(errno == EWOULDBLOCK || errno == ETIME))
diff --git a/ace/TSS_T.cpp b/ace/TSS_T.cpp
index fc25332dd1f..645a6f0612b 100644
--- a/ace/TSS_T.cpp
+++ b/ace/TSS_T.cpp
@@ -100,7 +100,7 @@ ACE_TSS<TYPE>::ts_init (void) const
// once!
if (this->once_ == 0)
{
- if (ACE_Thread::keycreate (ACE_const_cast (ACE_thread_key_t *, &this->key_),
+ if (ACE_Thread::keycreate (const_cast<ACE_thread_key_t *> (&this->key_),
#if defined (ACE_HAS_THR_C_DEST)
&ACE_TSS_C_cleanup,
#else
@@ -112,7 +112,7 @@ ACE_TSS<TYPE>::ts_init (void) const
{
// This *must* come last to avoid race conditions! Note that
// we need to "cast away const..."
- * ACE_const_cast (int*, &this->once_) = 1;
+ * const_cast<int*> (&this->once_) = 1;
return 0;
}
}
diff --git a/ace/Timer_Heap_T.cpp b/ace/Timer_Heap_T.cpp
index 537c2e85734..81224fa354b 100644
--- a/ace/Timer_Heap_T.cpp
+++ b/ace/Timer_Heap_T.cpp
@@ -234,8 +234,7 @@ ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::pop_freelist (void)
}
// We need to truncate this to <int> for backwards compatibility.
- int new_id = ACE_static_cast (int,
- this->timer_ids_curr_);
+ int new_id = static_cast<int> (this->timer_ids_curr_);
return new_id;
}
@@ -509,7 +508,7 @@ ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::grow_heap (void)
// And add the new elements to the end of the "freelist".
for (size_t i = this->max_size_; i < new_size; i++)
- this->timer_ids_[i] = -(ACE_static_cast (ssize_t, i) + 1);
+ this->timer_ids_[i] = -(static_cast<ssize_t> (i) + 1);
// Grow the preallocation array (if using preallocation)
if (this->preallocated_nodes_ != 0)
diff --git a/ace/Timer_Wheel_T.cpp b/ace/Timer_Wheel_T.cpp
index 109cd123b38..f32b29b8853 100644
--- a/ace/Timer_Wheel_T.cpp
+++ b/ace/Timer_Wheel_T.cpp
@@ -273,7 +273,7 @@ template <class TYPE, class FUNCTOR, class ACE_LOCK> u_int
ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::calculate_spoke
(const ACE_Time_Value& t) const
{
- return ACE_static_cast(u_int, (t.msec () >> this->res_bits_) & (this->spoke_count_ - 1));
+ return static_cast<u_int> ((t.msec () >> this->res_bits_) & (this->spoke_count_ - 1));
}
/// Generates a unique timer_id for the given spoke. It should be pretty
@@ -304,7 +304,7 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::generate_timer_id (u_int spoke)
# pragma warning(push)
# pragma warning(disable : 4311)
#endif /* ACE_WIN64 */
- long next_cnt = ACE_reinterpret_cast (long, root->get_act ());
+ long next_cnt = reinterpret_cast<long> (root->get_act ());
#if defined (ACE_WIN64)
# pragma warning(pop)
#endif /* ACE_WIN64 */
@@ -359,7 +359,7 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::generate_timer_id (u_int spoke)
# pragma warning(push)
# pragma warning(disable : 4312)
#endif /* ACE_WIN64 */
- root->set_act (ACE_reinterpret_cast (void*, next_cnt));
+ root->set_act (reinterpret_cast<void*> (next_cnt));
#if defined (ACE_WIN64)
# pragma warning(pop)
#endif /* ACE_WIN64 */
diff --git a/ace/Token_Collection.cpp b/ace/Token_Collection.cpp
index c85c7f7e08f..5287cd6208a 100644
--- a/ace/Token_Collection.cpp
+++ b/ace/Token_Collection.cpp
@@ -22,8 +22,7 @@ ACE_Token_Collection::ACE_Token_Collection (int debug,
name = ACE_LIB_TEXT ("no name");
ACE_OS::strsncpy (this->name_,
- ACE_const_cast (ACE_TCHAR *,
- name),
+ const_cast<ACE_TCHAR *> (name),
ACE_MAXTOKENNAMELEN);
}
diff --git a/ace/UPIPE_Stream.cpp b/ace/UPIPE_Stream.cpp
index e452db9f56e..4df8d5fc547 100644
--- a/ace/UPIPE_Stream.cpp
+++ b/ace/UPIPE_Stream.cpp
@@ -110,7 +110,7 @@ ACE_UPIPE_Stream::send (const char *buffer,
return
this->stream_.put (mb_p, timeout) == -1
? -1
- : ACE_static_cast (ssize_t, n);
+ : static_cast<ssize_t> (n);
}
// Receive a buffer.
diff --git a/ace/UUID.cpp b/ace/UUID.cpp
index 89b1c56a1a4..917f73b254d 100644
--- a/ace/UUID.cpp
+++ b/ace/UUID.cpp
@@ -164,15 +164,15 @@ namespace ACE_Utils
}
}
- this->timeLow_ = ACE_static_cast (ACE_UINT32, timeLow);
- this->timeMid_ = ACE_static_cast (ACE_UINT16, timeMid);
- this->timeHiAndVersion_ = ACE_static_cast (ACE_UINT16, timeHiAndVersion);
- this->clockSeqHiAndReserved_ = ACE_static_cast (u_char, clockSeqHiAndReserved);
- this->clockSeqLow_ = ACE_static_cast (u_char, clockSeqLow);
+ this->timeLow_ = static_cast<ACE_UINT32> (timeLow);
+ this->timeMid_ = static_cast<ACE_UINT16> (timeMid);
+ this->timeHiAndVersion_ = static_cast<ACE_UINT16> (timeHiAndVersion);
+ this->clockSeqHiAndReserved_ = static_cast<u_char> (clockSeqHiAndReserved);
+ this->clockSeqLow_ = static_cast<u_char> (clockSeqLow);
UUID_node::NodeID nodeID;
for (int i = 0; i < UUID_node::NODE_ID_SIZE; ++i)
- nodeID [i] = ACE_static_cast (u_char, node[i]);
+ nodeID [i] = static_cast<u_char> (node[i]);
this->node_->nodeID (nodeID);
@@ -332,12 +332,12 @@ namespace ACE_Utils
}
else
{
- nodeID [0] = ACE_static_cast (u_char, ACE_OS::rand());
- nodeID [1] = ACE_static_cast (u_char, ACE_OS::rand());
- nodeID [2] = ACE_static_cast (u_char, ACE_OS::rand());
- nodeID [3] = ACE_static_cast (u_char, ACE_OS::rand());
- nodeID [4] = ACE_static_cast (u_char, ACE_OS::rand());
- nodeID [5] = ACE_static_cast (u_char, ACE_OS::rand());
+ nodeID [0] = static_cast<u_char> (ACE_OS::rand());
+ nodeID [1] = static_cast<u_char> (ACE_OS::rand());
+ nodeID [2] = static_cast<u_char> (ACE_OS::rand());
+ nodeID [3] = static_cast<u_char> (ACE_OS::rand());
+ nodeID [4] = static_cast<u_char> (ACE_OS::rand());
+ nodeID [5] = static_cast<u_char> (ACE_OS::rand());
}
this->get_timestamp (timeLast_);
@@ -358,11 +358,11 @@ namespace ACE_Utils
// Construct a Version 1 UUID with the information in the arguements.
- uuid.timeLow (ACE_static_cast (ACE_UINT32, timestamp & 0xFFFFFFFF));
- uuid.timeMid (ACE_static_cast(ACE_UINT16, (timestamp >> 32) & 0xFFFF));
+ uuid.timeLow (static_cast<ACE_UINT32> (timestamp & 0xFFFFFFFF));
+ uuid.timeMid (static_cast<ACE_UINT16> ((timestamp >> 32) & 0xFFFF));
- ACE_UINT16 tHAV = ACE_static_cast (ACE_UINT16, (timestamp >> 48) & 0xFFFF);
+ ACE_UINT16 tHAV = static_cast<ACE_UINT16> ((timestamp >> 48) & 0xFFFF);
tHAV |= (version << 12);
uuid.timeHiAndVersion (tHAV);
@@ -387,7 +387,7 @@ namespace ACE_Utils
ACE_OS::sprintf (buf,
"%d",
- ACE_static_cast (int, ACE_OS::getpid ()));
+ static_cast<int> (ACE_OS::getpid ()));
uuid.pid (buf);
}
}
diff --git a/ace/Unbounded_Queue.cpp b/ace/Unbounded_Queue.cpp
index d265d9b9fd2..332fddb4428 100644
--- a/ace/Unbounded_Queue.cpp
+++ b/ace/Unbounded_Queue.cpp
@@ -166,8 +166,7 @@ ACE_Unbounded_Queue<T>::enqueue_head (const T &new_item)
// Create a new node that points to the original head.
ACE_NEW_MALLOC_RETURN (temp,
- ACE_static_cast(ACE_Node<T> *,
- this->allocator_->malloc (sizeof (ACE_Node<T>))),
+ static_cast<ACE_Node<T> *> (this->allocator_->malloc (sizeof (ACE_Node<T>))),
ACE_Node<T> (new_item, this->head_->next_),
-1);
// Link this pointer into the front of the list. Note that the
@@ -193,8 +192,7 @@ ACE_Unbounded_Queue<T>::enqueue_tail (const T &new_item)
// Create a new dummy node.
ACE_NEW_MALLOC_RETURN (temp,
- ACE_static_cast(ACE_Node<T> *,
- this->allocator_->malloc (sizeof (ACE_Node<T>))),
+ static_cast<ACE_Node<T> *> (this->allocator_->malloc (sizeof (ACE_Node<T>))),
ACE_Node<T> (this->head_->next_),
-1);
// Link this dummy pointer into the list.
diff --git a/ace/Unbounded_Set.cpp b/ace/Unbounded_Set.cpp
index 124c6223049..54ffa30a0f2 100644
--- a/ace/Unbounded_Set.cpp
+++ b/ace/Unbounded_Set.cpp
@@ -37,8 +37,7 @@ ACE_Unbounded_Set<T>::insert_tail (const T &item)
// Create a new dummy node.
ACE_NEW_MALLOC_RETURN (temp,
- ACE_static_cast(ACE_Node<T>*,
- this->allocator_->malloc (sizeof (ACE_Node<T>))),
+ static_cast<ACE_Node<T>*> (this->allocator_->malloc (sizeof (ACE_Node<T>))),
ACE_Node<T> (this->head_->next_),
-1);
// Link this pointer into the list.
diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp
index 7ec38b8da2b..1e4bb6a9720 100644
--- a/ace/WFMO_Reactor.cpp
+++ b/ace/WFMO_Reactor.cpp
@@ -2560,7 +2560,7 @@ ACE_WFMO_Reactor_Notify::purge_pending_notifications (ACE_Event_Handler *eh,
return -1; // This shouldn't happen...
ACE_Notification_Buffer *buffer =
- ACE_reinterpret_cast (ACE_Notification_Buffer *, mb->base ());
+ reinterpret_cast<ACE_Notification_Buffer *> (mb->base ());
// If this is not a Reactor notify (it is for a particular handler),
// and it matches the specified handler (or purging all),
diff --git a/ace/WIN32_Asynch_IO.cpp b/ace/WIN32_Asynch_IO.cpp
index 1d4807f548a..8e8c511f195 100644
--- a/ace/WIN32_Asynch_IO.cpp
+++ b/ace/WIN32_Asynch_IO.cpp
@@ -81,8 +81,7 @@ int
ACE_WIN32_Asynch_Result::post_completion (ACE_Proactor_Impl *proactor)
{
// Get to the platform specific implementation.
- ACE_WIN32_Proactor *win32_proactor = ACE_dynamic_cast (ACE_WIN32_Proactor *,
- proactor);
+ ACE_WIN32_Proactor *win32_proactor = dynamic_cast<ACE_WIN32_Proactor *> (proactor);
if (win32_proactor == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -454,7 +453,7 @@ ACE_WIN32_Asynch_Read_Stream::readv (ACE_Message_Block &message_block,
if (msg_space > ULONG_MAX)
this_chunk_length = ULONG_MAX;
else
- this_chunk_length = ACE_static_cast (u_long, msg_space);
+ this_chunk_length = static_cast<u_long> (msg_space);
// Collect the data in the iovec.
iov[iovcnt].iov_base = msg->wr_ptr () + wr_ptr_offset;
iov[iovcnt].iov_len = this_chunk_length;
@@ -505,8 +504,8 @@ ACE_WIN32_Asynch_Read_Stream::readv (ACE_Message_Block &message_block,
DWORD bytes_recvd = 0;
u_long flags = 0;
- int initiate_result = ::WSARecv (ACE_reinterpret_cast (SOCKET, result->handle ()),
- ACE_reinterpret_cast (WSABUF *, iov),
+ int initiate_result = ::WSARecv (reinterpret_cast<SOCKET> (result->handle ()),
+ reinterpret_cast<WSABUF *> (iov),
iovcnt,
&bytes_recvd,
&flags,
@@ -569,7 +568,7 @@ ACE_WIN32_Asynch_Read_Stream::shared_read (ACE_WIN32_Asynch_Read_Stream_Result *
errno = ERANGE;
return -1;
}
- DWORD bytes_to_read = ACE_static_cast (DWORD, result->bytes_to_read ());
+ DWORD bytes_to_read = static_cast<DWORD> (result->bytes_to_read ());
u_long bytes_read;
result->set_error (0); // Clear error before starting IO.
@@ -875,7 +874,7 @@ ACE_WIN32_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
if (msg_len > ULONG_MAX)
this_chunk_length = ULONG_MAX;
else
- this_chunk_length = ACE_static_cast (u_long, msg_len);
+ this_chunk_length = static_cast<u_long> (msg_len);
// Collect the data in the iovec.
iov[iovcnt].iov_base = msg->rd_ptr () + rd_ptr_offset;
iov[iovcnt].iov_len = this_chunk_length;
@@ -924,8 +923,8 @@ ACE_WIN32_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
u_long bytes_sent = 0;
- int initiate_result = ::WSASend (ACE_reinterpret_cast (SOCKET, result->handle ()),
- ACE_reinterpret_cast (WSABUF *, iov),
+ int initiate_result = ::WSASend (reinterpret_cast<SOCKET> (result->handle ()),
+ reinterpret_cast<WSABUF *> (iov),
iovcnt,
&bytes_sent,
0, // flags
@@ -988,7 +987,7 @@ ACE_WIN32_Asynch_Write_Stream::shared_write (ACE_WIN32_Asynch_Write_Stream_Resul
errno = ERANGE;
return -1;
}
- DWORD bytes_to_write = ACE_static_cast (DWORD, result->bytes_to_write ());
+ DWORD bytes_to_write = static_cast<DWORD> (result->bytes_to_write ());
result->set_error (0); // Clear error before starting IO.
@@ -1325,7 +1324,7 @@ ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
errno = ERANGE;
return -1;
}
- DWORD dword_bytes_to_read = ACE_static_cast (DWORD, bytes_to_read);
+ DWORD dword_bytes_to_read = static_cast<DWORD> (bytes_to_read);
// last one should be completely 0
buffer_pointers[buffer_pointers_count].Buffer = 0;
@@ -1728,7 +1727,7 @@ ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
errno = ERANGE;
return -1;
}
- DWORD dword_bytes_to_write = ACE_static_cast (DWORD, bytes_to_write);
+ DWORD dword_bytes_to_write = static_cast<DWORD> (bytes_to_write);
// last one should be completely 0
buffer_pointers[buffer_pointers_count].Buffer = 0;
@@ -2035,7 +2034,7 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
errno = ERANGE;
return -1;
}
- DWORD dword_bytes_to_read = ACE_static_cast (DWORD, bytes_to_read);
+ DWORD dword_bytes_to_read = static_cast<DWORD> (bytes_to_read);
int close_accept_handle = 0;
// If the <accept_handle> is invalid, we will create a new socket.
@@ -2080,8 +2079,8 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
(SOCKET) result->accept_handle (),
result->message_block ().wr_ptr (),
dword_bytes_to_read,
- ACE_static_cast (DWORD, address_size),
- ACE_static_cast (DWORD, address_size),
+ static_cast<DWORD> (address_size),
+ static_cast<DWORD> (address_size),
&bytes_read,
result);
if (initiate_result == 1)
@@ -2528,8 +2527,7 @@ ACE_WIN32_Asynch_Connect::connect_i (ACE_WIN32_Asynch_Connect_Result *result,
if (local_sap != ACE_Addr::sap_any)
{
- sockaddr * laddr = ACE_reinterpret_cast (sockaddr *,
- local_sap.get_addr ());
+ sockaddr * laddr = reinterpret_cast<sockaddr *> (local_sap.get_addr ());
int size = local_sap.get_size ();
if (ACE_OS::bind (handle, laddr, size) == -1)
@@ -2558,8 +2556,7 @@ ACE_WIN32_Asynch_Connect::connect_i (ACE_WIN32_Asynch_Connect_Result *result,
for (;;)
{
int rc = ACE_OS::connect (handle,
- ACE_reinterpret_cast (sockaddr *,
- remote_sap.get_addr ()),
+ reinterpret_cast<sockaddr *> (remote_sap.get_addr ()),
remote_sap.get_size ());
if (rc < 0) // failure
@@ -3006,8 +3003,8 @@ ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
errno = ERANGE;
return -1;
}
- DWORD dword_bytes_to_write = ACE_static_cast (DWORD, bytes_to_write);
- DWORD dword_bytes_per_send = ACE_static_cast (DWORD, bytes_per_send);
+ DWORD dword_bytes_to_write = static_cast<DWORD> (bytes_to_write);
+ DWORD dword_bytes_per_send = static_cast<DWORD> (bytes_per_send);
ACE_WIN32_Asynch_Transmit_File_Result *result = 0;
ACE_NEW_RETURN (result,
@@ -3343,7 +3340,7 @@ ACE_WIN32_Asynch_Read_Dgram::recv (ACE_Message_Block *message_block,
if (msg_space > ULONG_MAX)
this_chunk_length = ULONG_MAX;
else
- this_chunk_length = ACE_static_cast (u_long, msg_space);
+ this_chunk_length = static_cast<u_long> (msg_space);
// Collect the data in the iovec.
iov[iovcnt].iov_base = msg->wr_ptr () + wr_ptr_offset;
iov[iovcnt].iov_len = this_chunk_length;
@@ -3668,7 +3665,7 @@ ACE_WIN32_Asynch_Write_Dgram::send (ACE_Message_Block *message_block,
if (msg_len > ULONG_MAX)
this_chunk_length = ULONG_MAX;
else
- this_chunk_length = ACE_static_cast (u_long, msg_len);
+ this_chunk_length = static_cast<u_long> (msg_len);
// Collect the data in the iovec.
iov[iovcnt].iov_base = msg->rd_ptr () + rd_ptr_offset;
iov[iovcnt].iov_len = this_chunk_length;
diff --git a/ace/WIN32_Proactor.cpp b/ace/WIN32_Proactor.cpp
index 6905c0d7912..39a70da300f 100644
--- a/ace/WIN32_Proactor.cpp
+++ b/ace/WIN32_Proactor.cpp
@@ -44,7 +44,7 @@ ACE_WIN32_Proactor::ACE_WIN32_Proactor (size_t number_of_threads,
int used_with_reactor_event_loop)
: completion_port_ (0),
// This *MUST* be 0, *NOT* ACE_INVALID_HANDLE !!!
- number_of_threads_ (ACE_static_cast (DWORD, number_of_threads)),
+ number_of_threads_ (static_cast<DWORD> (number_of_threads)),
used_with_reactor_event_loop_ (used_with_reactor_event_loop)
{
// Create the completion port.
@@ -121,9 +121,9 @@ ACE_WIN32_Proactor::register_handle (ACE_HANDLE handle,
const void *completion_key)
{
#if defined (ACE_WIN64)
- ULONG_PTR comp_key (ACE_reinterpret_cast (ULONG_PTR, completion_key));
+ ULONG_PTR comp_key (reinterpret_cast<ULONG_PTR> (completion_key));
#else
- ULONG comp_key (ACE_reinterpret_cast (ULONG, completion_key));
+ ULONG comp_key (reinterpret_cast<ULONG> (completion_key));
#endif /* ACE_WIN64 */
// No locking is needed here as no state changes.
@@ -626,8 +626,7 @@ ACE_WIN32_Proactor::handle_events (unsigned long milli_seconds)
result_err = errno ;
this->application_specific_code (asynch_result,
- ACE_static_cast (size_t,
- bytes_transferred),
+ static_cast<size_t> (bytes_transferred),
(void *) completion_key,
result_err);
}
@@ -674,14 +673,13 @@ ACE_WIN32_Proactor::post_completion (ACE_WIN32_Asynch_Result *result)
{
// This cast is ok since the original API calls restricted the transfer
// counts to DWORD range.
- bytes_transferred = ACE_static_cast (DWORD,
- result->bytes_transferred ());
+ bytes_transferred = static_cast<DWORD> (result->bytes_transferred ());
completion_key = result->completion_key();
}
#if defined (ACE_WIN64)
- ULONG_PTR comp_key (ACE_reinterpret_cast (ULONG_PTR, completion_key));
+ ULONG_PTR comp_key (reinterpret_cast<ULONG_PTR> (completion_key));
#else
- ULONG comp_key (ACE_reinterpret_cast (ULONG, completion_key));
+ ULONG comp_key (reinterpret_cast<ULONG> (completion_key));
#endif /* ACE_WIN64 */
// Post a completion
@@ -743,13 +741,13 @@ ACE_WIN32_Proactor::close_dispatch_threads (int)
size_t
ACE_WIN32_Proactor::number_of_threads (void) const
{
- return ACE_static_cast (size_t, this->number_of_threads_);
+ return static_cast<size_t> (this->number_of_threads_);
}
void
ACE_WIN32_Proactor::number_of_threads (size_t threads)
{
- this->number_of_threads_ = ACE_static_cast (DWORD, threads);
+ this->number_of_threads_ = static_cast<DWORD> (threads);
}
ACE_WIN32_Asynch_Timer::ACE_WIN32_Asynch_Timer (ACE_Handler &handler,