summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-01-21 02:19:20 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-01-21 02:19:20 +0000
commit7061929d7bb9646b0d90dec0f72d418c5a866c4e (patch)
treec0bb0eb13dfd8efbb8228ba705798e4742d786d7 /examples
parent0079ef6190c9e047256a485eff2799e8cc10ef02 (diff)
downloadATCD-7061929d7bb9646b0d90dec0f72d418c5a866c4e.tar.gz
ChangeLogTag:Thu Jan 20 18:18:00 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'examples')
-rw-r--r--examples/APG/Config/HA_Status.cpp2
-rw-r--r--examples/APG/Logging/Callback-2.h2
-rw-r--r--examples/APG/Misc_IPC/UDP_Broadcast.cpp2
-rw-r--r--examples/APG/Misc_IPC/UDP_Unicast.cpp6
-rw-r--r--examples/APG/Naming/Name_Binding.h2
-rw-r--r--examples/APG/Proactor/HA_Proactive_Status.cpp6
-rw-r--r--examples/APG/Reactor/Client.cpp6
-rw-r--r--examples/APG/Reactor/HAStatus-AC.cpp6
-rw-r--r--examples/APG/Reactor/HAStatus.cpp6
-rw-r--r--examples/APG/Reactor/Timer_State_Data.cpp4
-rw-r--r--examples/APG/Shared_Memory/Hash_Map.cpp2
-rw-r--r--examples/APG/Shared_Memory/Malloc.cpp5
-rw-r--r--examples/APG/Shared_Memory/PI_Malloc.cpp5
-rw-r--r--examples/APG/Sockets/Iovec.cpp14
-rw-r--r--examples/APG/Svc_Config/HA_Status_Dynamic.cpp4
-rw-r--r--examples/APG/Svc_Config/HA_Status_Static.cpp4
-rw-r--r--examples/APG/ThreadPools/TP_Reactor.cpp4
-rw-r--r--examples/APG/Timers/Alarm.cpp2
-rw-r--r--examples/APG/Timers/CB.cpp2
-rw-r--r--examples/APG/Timers/PCB.cpp2
-rw-r--r--examples/APG/Timers/Task.cpp2
-rw-r--r--examples/Bounded_Packet_Relay/BPR_Drivers.cpp3
-rw-r--r--examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp19
-rw-r--r--examples/C++NPv1/Logging_Client.cpp3
-rw-r--r--examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp4
-rw-r--r--examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp4
-rw-r--r--examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp4
-rw-r--r--examples/C++NPv2/AC_Client_Logging_Daemon.cpp10
-rw-r--r--examples/C++NPv2/Client_Logging_Daemon.cpp8
-rw-r--r--examples/C++NPv2/Logging_Event_Handler.h2
-rw-r--r--examples/C++NPv2/Select_Reactor_Logging_Server.cpp4
-rw-r--r--examples/C++NPv2/Server_Shutdown.cpp2
-rw-r--r--examples/C++NPv2/Service_Reporter.cpp8
-rw-r--r--examples/C++NPv2/TPC_Logging_Server.cpp2
-rw-r--r--examples/C++NPv2/TP_Logging_Server.cpp5
-rw-r--r--examples/C++NPv2/TP_Reactor_Logging_Server.cpp4
-rw-r--r--examples/C++NPv2/WFMO_Reactor_Logging_Server.cpp2
-rw-r--r--examples/C++NPv2/display_logfile.cpp11
-rw-r--r--examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp2
-rw-r--r--examples/IPC_SAP/FILE_SAP/client.cpp2
-rw-r--r--examples/IPC_SAP/SOCK_SAP/C-inclient.cpp2
-rw-r--r--examples/IPC_SAP/SOCK_SAP/C-inserver.cpp5
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp4
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp5
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp5
-rw-r--r--examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp2
-rw-r--r--examples/Reactor/Misc/notification.cpp9
-rw-r--r--examples/Reactor/Multicast/Log_Wrapper.cpp2
-rw-r--r--examples/Reactor/Proactor/test_aiosig_ace.cpp2
-rw-r--r--examples/Reactor/WFMO_Reactor/APC.cpp3
-rw-r--r--examples/Reactor/WFMO_Reactor/Handle_Close.cpp4
-rw-r--r--examples/Reactor/WFMO_Reactor/Multithreading.cpp6
-rw-r--r--examples/Reactor/WFMO_Reactor/Removals.cpp2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i3
-rw-r--r--examples/Shared_Malloc/test_malloc.cpp3
-rw-r--r--examples/Shared_Malloc/test_persistence.cpp18
-rw-r--r--examples/Shared_Malloc/test_position_independent_malloc.cpp3
-rw-r--r--examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp2
-rw-r--r--examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp2
-rw-r--r--examples/System_V_IPC/SV_Message_Queues/TMQ_Client.cpp2
-rw-r--r--examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp2
-rw-r--r--examples/TMCast/Member/member.cpp3
-rw-r--r--examples/Threads/thread_manager.cpp2
-rw-r--r--examples/Threads/thread_specific.cpp5
-rw-r--r--examples/Timer_Queue/Thread_Timer_Queue_Test.cpp5
-rw-r--r--examples/Web_Crawler/Command_Processor.cpp3
-rw-r--r--examples/Web_Crawler/Iterators.cpp2
-rw-r--r--examples/Web_Crawler/Mem_Map_Stream.cpp15
-rw-r--r--examples/Web_Crawler/URL_Addr.cpp12
-rw-r--r--examples/Web_Crawler/URL_Visitor.cpp3
70 files changed, 139 insertions, 184 deletions
diff --git a/examples/APG/Config/HA_Status.cpp b/examples/APG/Config/HA_Status.cpp
index 68f723759c0..dacee9ea654 100644
--- a/examples/APG/Config/HA_Status.cpp
+++ b/examples/APG/Config/HA_Status.cpp
@@ -70,7 +70,7 @@ HA_Status::init (int argc, ACE_TCHAR *argv[])
((LM_ERROR,
ACE_TEXT ("HAStatus ListenPort does not exist\n")),
-1);
- this->listen_addr_.set (ACE_static_cast (u_short, status_port));
+ this->listen_addr_.set (static_cast<u_short> (status_port));
// Listing 2
return 0;
diff --git a/examples/APG/Logging/Callback-2.h b/examples/APG/Logging/Callback-2.h
index f2c124896b1..87463ce47fd 100644
--- a/examples/APG/Logging/Callback-2.h
+++ b/examples/APG/Logging/Callback-2.h
@@ -15,7 +15,7 @@ public:
cerr << "Log Message Received:" << endl;
unsigned long msg_severity = log_record.type ();
ACE_Log_Priority prio =
- ACE_static_cast (ACE_Log_Priority, msg_severity);
+ static_cast<ACE_Log_Priority> (msg_severity);
const ACE_TCHAR *prio_name =
ACE_Log_Record::priority_name (prio);
cerr << "\tType: "
diff --git a/examples/APG/Misc_IPC/UDP_Broadcast.cpp b/examples/APG/Misc_IPC/UDP_Broadcast.cpp
index 69e342b6f15..318be67b19c 100644
--- a/examples/APG/Misc_IPC/UDP_Broadcast.cpp
+++ b/examples/APG/Misc_IPC/UDP_Broadcast.cpp
@@ -14,7 +14,7 @@
int send_broadcast (u_short to_port)
{
const char *message = "this is the message!\n";
- ACE_INET_Addr my_addr (ACE_static_cast (u_short, 10101));
+ ACE_INET_Addr my_addr (static_cast<u_short> (10101));
ACE_SOCK_Dgram_Bcast udp (my_addr);
ssize_t sent = udp.send (message,
ACE_OS::strlen (message) + 1,
diff --git a/examples/APG/Misc_IPC/UDP_Unicast.cpp b/examples/APG/Misc_IPC/UDP_Unicast.cpp
index 909ff175978..ac3d4d00488 100644
--- a/examples/APG/Misc_IPC/UDP_Unicast.cpp
+++ b/examples/APG/Misc_IPC/UDP_Unicast.cpp
@@ -14,7 +14,7 @@
int send_unicast (const ACE_INET_Addr &to)
{
const char *message = "this is the message!\n";
- ACE_INET_Addr my_addr (ACE_static_cast (u_short, 10101));
+ ACE_INET_Addr my_addr (static_cast<u_short> (10101));
ACE_SOCK_Dgram udp (my_addr);
ssize_t sent = udp.send (message,
ACE_OS::strlen (message) + 1,
@@ -30,14 +30,14 @@ int send_unicast (const ACE_INET_Addr &to)
// Listing 2 code/ch09
void echo_dgram (void)
{
- ACE_INET_Addr my_addr (ACE_static_cast (u_short, 10102));
+ ACE_INET_Addr my_addr (static_cast<u_short> (10102));
ACE_INET_Addr your_addr;
ACE_SOCK_Dgram udp (my_addr);
char buff[BUFSIZ];
size_t buflen = sizeof (buff);
ssize_t recv_cnt = udp.recv (buff, buflen, your_addr);
if (recv_cnt > 0)
- udp.send (buff, ACE_static_cast (size_t, buflen), your_addr);
+ udp.send (buff, static_cast<size_t> (buflen), your_addr);
udp.close ();
return;
}
diff --git a/examples/APG/Naming/Name_Binding.h b/examples/APG/Naming/Name_Binding.h
index 943781d5af2..6c093a941f2 100644
--- a/examples/APG/Naming/Name_Binding.h
+++ b/examples/APG/Naming/Name_Binding.h
@@ -33,7 +33,7 @@ public:
{
delete this->name_;
delete this->value_;
- ACE_OS::free (ACE_const_cast (char*, this->type_));
+ ACE_OS::free (const_cast<char*> (this->type_));
this->type_ = 0;
}
diff --git a/examples/APG/Proactor/HA_Proactive_Status.cpp b/examples/APG/Proactor/HA_Proactive_Status.cpp
index 2fad562f12c..e64656398ba 100644
--- a/examples/APG/Proactor/HA_Proactive_Status.cpp
+++ b/examples/APG/Proactor/HA_Proactive_Status.cpp
@@ -106,11 +106,9 @@ HA_Proactive_Acceptor::validate_connection (
const ACE_INET_Addr& local)
{
struct in_addr *remote_addr =
- ACE_reinterpret_cast (struct in_addr*,
- remote.get_addr ());
+ reinterpret_cast<struct in_addr*> (remote.get_addr ());
struct in_addr *local_addr =
- ACE_reinterpret_cast (struct in_addr*,
- local.get_addr ());
+ reinterpret_cast<struct in_addr*> (local.get_addr ());
if (inet_netof (*local_addr) == inet_netof (*remote_addr))
return 0;
diff --git a/examples/APG/Reactor/Client.cpp b/examples/APG/Reactor/Client.cpp
index b32e2b7f9d8..520b17f7ef1 100644
--- a/examples/APG/Reactor/Client.cpp
+++ b/examples/APG/Reactor/Client.cpp
@@ -32,7 +32,7 @@ int Client::handle_input (ACE_HANDLE)
if (recv_cnt > 0)
{
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%.*C"),
- ACE_static_cast (int, recv_cnt),
+ static_cast<int> (recv_cnt),
buf));
return 0;
}
@@ -60,7 +60,7 @@ int Client::handle_timeout(const ACE_Time_Value &, const void *)
int nbytes = ACE_OS::sprintf
(mb->wr_ptr (), "Iteration %d\n", this->iterations_);
ACE_ASSERT (nbytes > 0);
- mb->wr_ptr (ACE_static_cast (size_t, nbytes));
+ mb->wr_ptr (static_cast<size_t> (nbytes));
this->putq (mb);
return 0;
}
@@ -80,7 +80,7 @@ int Client::handle_output (ACE_HANDLE)
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("send")));
else
- mb->rd_ptr (ACE_static_cast (size_t, send_cnt));
+ mb->rd_ptr (static_cast<size_t> (send_cnt));
if (mb->length () > 0)
{
this->ungetq (mb);
diff --git a/examples/APG/Reactor/HAStatus-AC.cpp b/examples/APG/Reactor/HAStatus-AC.cpp
index f872fc612ba..24861113f85 100644
--- a/examples/APG/Reactor/HAStatus-AC.cpp
+++ b/examples/APG/Reactor/HAStatus-AC.cpp
@@ -52,7 +52,7 @@ ClientService::handle_input (ACE_HANDLE)
send_cnt =
this->peer ().send (buffer,
- ACE_static_cast (size_t, recv_cnt));
+ static_cast<size_t> (recv_cnt));
if (send_cnt == recv_cnt)
return 0;
if (send_cnt == -1 && ACE_OS::last_error () != EWOULDBLOCK)
@@ -64,7 +64,7 @@ ClientService::handle_input (ACE_HANDLE)
send_cnt = 0;
ACE_Message_Block *mb;
size_t remaining =
- ACE_static_cast (size_t, (recv_cnt - send_cnt));
+ static_cast<size_t> ((recv_cnt - send_cnt));
ACE_NEW_RETURN (mb, ACE_Message_Block (remaining), -1);
mb->copy (&buffer[send_cnt], remaining);
int output_off = this->msg_queue ()->is_empty ();
@@ -99,7 +99,7 @@ ClientService::handle_output (ACE_HANDLE)
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("send")));
else
- mb->rd_ptr (ACE_static_cast (size_t, send_cnt));
+ mb->rd_ptr (static_cast<size_t> (send_cnt));
if (mb->length () > 0)
{
this->ungetq (mb);
diff --git a/examples/APG/Reactor/HAStatus.cpp b/examples/APG/Reactor/HAStatus.cpp
index 361c7806391..fb32aa61632 100644
--- a/examples/APG/Reactor/HAStatus.cpp
+++ b/examples/APG/Reactor/HAStatus.cpp
@@ -156,7 +156,7 @@ ClientService::handle_input (ACE_HANDLE)
}
send_cnt =
- this->sock_.send (buffer, ACE_static_cast (size_t, recv_cnt));
+ this->sock_.send (buffer, static_cast<size_t> (recv_cnt));
if (send_cnt == recv_cnt)
return 0;
if (send_cnt == -1 && ACE_OS::last_error () != EWOULDBLOCK)
@@ -168,7 +168,7 @@ ClientService::handle_input (ACE_HANDLE)
send_cnt = 0;
ACE_Message_Block *mb;
size_t remaining =
- ACE_static_cast (size_t, (recv_cnt - send_cnt));
+ static_cast<size_t> ((recv_cnt - send_cnt));
ACE_NEW_RETURN (mb, ACE_Message_Block (remaining), -1);
mb->copy (&buffer[send_cnt], remaining);
int output_off = this->output_queue_.is_empty ();
@@ -204,7 +204,7 @@ ClientService::handle_output (ACE_HANDLE)
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("send")));
else
- mb->rd_ptr (ACE_static_cast (size_t, send_cnt));
+ mb->rd_ptr (static_cast<size_t> (send_cnt));
if (mb->length () > 0)
{
this->output_queue_.enqueue_head (mb);
diff --git a/examples/APG/Reactor/Timer_State_Data.cpp b/examples/APG/Reactor/Timer_State_Data.cpp
index ff945553372..215381df394 100644
--- a/examples/APG/Reactor/Timer_State_Data.cpp
+++ b/examples/APG/Reactor/Timer_State_Data.cpp
@@ -64,9 +64,9 @@ public:
time_t epoch = ((timespec_t)current_time).tv_sec;
const TemperatureSensor *const_sensor =
- ACE_reinterpret_cast (const TemperatureSensor *, arg);
+ reinterpret_cast<const TemperatureSensor *> (arg);
TemperatureSensor *sensor =
- ACE_const_cast (TemperatureSensor *, const_sensor);
+ const_cast<TemperatureSensor *> (const_sensor);
int queryCount = sensor->querySensor ();
this->updateAverageTemperature (sensor);
diff --git a/examples/APG/Shared_Memory/Hash_Map.cpp b/examples/APG/Shared_Memory/Hash_Map.cpp
index f4a36e8a89c..a6a2cc48295 100644
--- a/examples/APG/Shared_Memory/Hash_Map.cpp
+++ b/examples/APG/Shared_Memory/Hash_Map.cpp
@@ -109,7 +109,7 @@ int addRecords(MAP *map, ALLOCATOR *shmem_allocator)
ACE_TRACE ("addRecords");
char buf[32];
- int mapLength = ACE_static_cast (int, map->current_size ());
+ int mapLength = static_cast<int> (map->current_size ());
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Map has %d entries; adding 20 more\n"),
mapLength));
diff --git a/examples/APG/Shared_Memory/Malloc.cpp b/examples/APG/Shared_Memory/Malloc.cpp
index 27c21f5ea92..1a15ec74763 100644
--- a/examples/APG/Shared_Memory/Malloc.cpp
+++ b/examples/APG/Shared_Memory/Malloc.cpp
@@ -25,8 +25,7 @@ public:
{
size_t len = ACE_OS::strlen (name) + 1;
this->name_ =
- ACE_reinterpret_cast (char *,
- g_allocator->malloc (len));
+ reinterpret_cast<char *> (g_allocator->malloc (len));
ACE_OS::strcpy (this->name_, name);
}
@@ -52,7 +51,7 @@ void showRecords ()
for (void *temp = 0; iter.next (temp) != 0; iter.advance ())
{
Record *record =
- ACE_reinterpret_cast (Record *, temp);
+ reinterpret_cast<Record *> (temp);
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Record name: %C|id1:%d|id2:%d\n"),
record->name (),
diff --git a/examples/APG/Shared_Memory/PI_Malloc.cpp b/examples/APG/Shared_Memory/PI_Malloc.cpp
index 80120a894da..60b4677482c 100644
--- a/examples/APG/Shared_Memory/PI_Malloc.cpp
+++ b/examples/APG/Shared_Memory/PI_Malloc.cpp
@@ -28,8 +28,7 @@ public:
{
size_t len = ACE_OS::strlen (name) + 1;
char *buf =
- ACE_reinterpret_cast (char *,
- g_allocator->malloc (len));
+ reinterpret_cast<char *> (g_allocator->malloc (len));
ACE_OS::strcpy (buf, name);
name_ = buf;
}
@@ -58,7 +57,7 @@ void showRecords (void)
for (void *temp = 0; iter.next (temp) != 0; iter.advance ())
{
Record *record =
- ACE_reinterpret_cast (Record *, temp);
+ reinterpret_cast<Record *> (temp);
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Record name: %C|id1:%d|id2:%d\n"),
record->name(), record->id1(), record->id2()));
diff --git a/examples/APG/Sockets/Iovec.cpp b/examples/APG/Sockets/Iovec.cpp
index 95217baa39a..fb27b6d562e 100644
--- a/examples/APG/Sockets/Iovec.cpp
+++ b/examples/APG/Sockets/Iovec.cpp
@@ -24,11 +24,11 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
// Listing 1 code/ch06
iovec send[4];
- send[0].iov_base = ACE_const_cast (char *, "up");
+ send[0].iov_base = const_cast<char *> ("up");
send[0].iov_len = 2;
- send[1].iov_base = ACE_const_cast (char *, "time");
+ send[1].iov_base = const_cast<char *> ("time");
send[1].iov_len = 4;
- send[2].iov_base = ACE_const_cast (char *, "\n");
+ send[2].iov_base = const_cast<char *> ("\n");
send[2].iov_len = 1;
peer.sendv (send, 3);
@@ -61,12 +61,12 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
for (int i = 0; i < 2 && bc > 0; ++i)
{
size_t wc = receive[i].iov_len;
- if (ACE_static_cast (size_t, bc) < wc)
- wc = ACE_static_cast (size_t, bc);
+ if (static_cast<size_t> (bc) < wc)
+ wc = static_cast<size_t> (bc);
write (1, receive[i].iov_base, wc);
bc -= receive[i].iov_len;
delete []
- (ACE_reinterpret_cast (char *, receive[i].iov_base));
+ (reinterpret_cast<char *> (receive[i].iov_base));
}
// Listing 4
@@ -75,7 +75,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
iovec response;
peer.recvv (&response);
write (1, response.iov_base, response.iov_len);
- delete [] ACE_reinterpret_cast (char *, response.iov_base);
+ delete [] reinterpret_cast<char *> (response.iov_base);
// Listing 5
peer.close ();
diff --git a/examples/APG/Svc_Config/HA_Status_Dynamic.cpp b/examples/APG/Svc_Config/HA_Status_Dynamic.cpp
index c80817d7efd..b2c15661a66 100644
--- a/examples/APG/Svc_Config/HA_Status_Dynamic.cpp
+++ b/examples/APG/Svc_Config/HA_Status_Dynamic.cpp
@@ -70,7 +70,7 @@ HA_Status::init (int argc, ACE_TCHAR *argv[])
ACE_TEXT ("HAStatus ListenPort ")
ACE_TEXT ("does not exist\n")),
-1);
- this->listen_addr_.set (ACE_static_cast (u_short, status_port));
+ this->listen_addr_.set (static_cast<u_short> (status_port));
if (this->acceptor_.open (this->listen_addr_) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -103,7 +103,7 @@ HA_Status::info (ACE_TCHAR **str, size_t len) const
*str = ACE::strnew (buf);
else
ACE_OS::strncpy (*str, buf, len);
- return ACE_static_cast (int, ACE_OS::strlen (*str));
+ return static_cast<int> (ACE_OS::strlen (*str));
}
// Listing 3
diff --git a/examples/APG/Svc_Config/HA_Status_Static.cpp b/examples/APG/Svc_Config/HA_Status_Static.cpp
index 5027ae34dd5..b97c74a11d9 100644
--- a/examples/APG/Svc_Config/HA_Status_Static.cpp
+++ b/examples/APG/Svc_Config/HA_Status_Static.cpp
@@ -69,7 +69,7 @@ HA_Status::init (int argc, ACE_TCHAR *argv[])
ACE_TEXT ("HAStatus ListenPort does ")
ACE_TEXT ("not exist\n")),
-1);
- this->listen_addr_.set (ACE_static_cast (u_short, status_port));
+ this->listen_addr_.set (static_cast<u_short> (status_port));
if (this->acceptor_.open (this->listen_addr_) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -101,7 +101,7 @@ HA_Status::info (ACE_TCHAR **str, size_t len) const
*str = ACE::strnew (buf);
else
ACE_OS::strncpy (*str, buf, len);
- return ACE_static_cast (int, ACE_OS::strlen (*str));
+ return static_cast<int> (ACE_OS::strlen (*str));
}
// Listing 3
diff --git a/examples/APG/ThreadPools/TP_Reactor.cpp b/examples/APG/ThreadPools/TP_Reactor.cpp
index 56998bb2a0d..ff9e11012db 100644
--- a/examples/APG/ThreadPools/TP_Reactor.cpp
+++ b/examples/APG/ThreadPools/TP_Reactor.cpp
@@ -60,7 +60,7 @@ Request_Handler::handle_input (ACE_HANDLE fd)
if (result > 0
&& this->peer ().recv_n (buffer, len * sizeof (ACE_TCHAR))
- == ACE_static_cast (ssize_t, len * sizeof (ACE_TCHAR)))
+ == static_cast<ssize_t> (len * sizeof (ACE_TCHAR)))
{
++this->nr_msgs_rcvd_;
@@ -165,7 +165,7 @@ class Client: public ACE_Task_Base
ACE_SOCK_Stream stream;
ACE_SOCK_Connector connect;
ACE_Time_Value delay (0, req_delay);
- size_t len = * ACE_reinterpret_cast (ACE_TCHAR *, arg);
+ size_t len = * reinterpret_cast<ACE_TCHAR *> (arg);
for (size_t i = 0 ; i < cli_conn_no; i++)
{
diff --git a/examples/APG/Timers/Alarm.cpp b/examples/APG/Timers/Alarm.cpp
index 29828531ac1..e66f1ed0465 100644
--- a/examples/APG/Timers/Alarm.cpp
+++ b/examples/APG/Timers/Alarm.cpp
@@ -20,7 +20,7 @@ public:
{
ACE_TRACE (ACE_TEXT ("CB::handle_timeout"));
- const int *val = ACE_static_cast (const int*, arg);
+ const int *val = static_cast<const int*> (arg);
ACE_ASSERT ((*val) == id_);
ACE_UNUSED_ARG (val);
diff --git a/examples/APG/Timers/CB.cpp b/examples/APG/Timers/CB.cpp
index 4754987660f..0a86ae7edeb 100644
--- a/examples/APG/Timers/CB.cpp
+++ b/examples/APG/Timers/CB.cpp
@@ -15,7 +15,7 @@ int CB::handle_timeout (const ACE_Time_Value &,
{
ACE_TRACE (ACE_TEXT ("CB::handle_timeout"));
- const int *val = ACE_static_cast (const int*, arg);
+ const int *val = static_cast<const int*> (arg);
ACE_ASSERT ((*val) == timerID_);
ACE_UNUSED_ARG (val);
diff --git a/examples/APG/Timers/PCB.cpp b/examples/APG/Timers/PCB.cpp
index 03392ca7ead..c13d060a1d3 100644
--- a/examples/APG/Timers/PCB.cpp
+++ b/examples/APG/Timers/PCB.cpp
@@ -13,7 +13,7 @@ int PCB::handleEvent (const void *arg)
{
ACE_TRACE (ACE_TEXT ("PCB::handle_timeout"));
- const int *val = ACE_static_cast (const int*, arg);
+ const int *val = static_cast<const int*> (arg);
ACE_ASSERT ((*val) == timerID_);
ACE_UNUSED_ARG (val);
diff --git a/examples/APG/Timers/Task.cpp b/examples/APG/Timers/Task.cpp
index d25a8197857..cf2a87bae2d 100644
--- a/examples/APG/Timers/Task.cpp
+++ b/examples/APG/Timers/Task.cpp
@@ -21,7 +21,7 @@ public:
{
ACE_TRACE (ACE_TEXT ("CB::handle_timeout"));
- const int *val = ACE_static_cast (const int*, arg);
+ const int *val = static_cast<const int*> (arg);
ACE_ASSERT((*val) == id_);
ACE_UNUSED_ARG (val);
diff --git a/examples/Bounded_Packet_Relay/BPR_Drivers.cpp b/examples/Bounded_Packet_Relay/BPR_Drivers.cpp
index 059235b6154..4fd8577b3df 100644
--- a/examples/Bounded_Packet_Relay/BPR_Drivers.cpp
+++ b/examples/Bounded_Packet_Relay/BPR_Drivers.cpp
@@ -448,8 +448,7 @@ Bounded_Packet_Relay::receive_input (void * arg)
return -1;
}
- ACE_Message_Block *message = ACE_static_cast (ACE_Message_Block *,
- arg);
+ ACE_Message_Block *message = static_cast<ACE_Message_Block *> (arg);
if (queue_.enqueue_tail (message) < 0)
{
if (is_active_)
diff --git a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp
index 8dafecace78..1e8bfc77d94 100644
--- a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp
+++ b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp
@@ -66,7 +66,7 @@ Text_Input_Device_Wrapper::modify_device_settings (void *logging)
packet_count_ = 0;
if (logging)
- logging_ = *ACE_static_cast (int *, logging);
+ logging_ = *static_cast<int *> (logging);
else
ACE_ERROR_RETURN ((LM_ERROR,
"Text_Input_Device_Wrapper::modify_device_settings: "
@@ -144,11 +144,10 @@ Text_Output_Device_Wrapper::write_output_message (void *message)
if (logging_ & Text_Output_Device_Wrapper::PRINT_MSGS_RCVD)
ACE_DEBUG ((LM_DEBUG, "output message %d:\n[%s]\n",
packet_count_,
- ACE_static_cast (ACE_Message_Block *, message)->
+ static_cast<ACE_Message_Block *> (message)->
rd_ptr ()));
- delete ACE_static_cast (ACE_Message_Block *,
- message);
+ delete static_cast<ACE_Message_Block *> (message);
return 0;
}
ACE_ERROR_RETURN ((LM_ERROR,
@@ -164,7 +163,7 @@ Text_Output_Device_Wrapper::modify_device_settings (void *logging)
packet_count_ = 0;
if (logging)
- logging_ = *ACE_static_cast (int *, logging);
+ logging_ = *static_cast<int *> (logging);
else
ACE_ERROR_RETURN ((LM_ERROR,
"Text_Output_Device_Wrapper::modify_device_settings: "
@@ -220,7 +219,7 @@ User_Input_Task::set_packet_count (void *argument)
{
if (argument)
{
- driver_.packet_count (*ACE_static_cast (int *, argument));
+ driver_.packet_count (*static_cast<int *> (argument));
return 0;
}
ACE_ERROR_RETURN ((LM_ERROR,
@@ -236,7 +235,7 @@ User_Input_Task::set_arrival_period (void *argument)
{
if (argument)
{
- driver_.arrival_period (*ACE_static_cast (int *, argument));
+ driver_.arrival_period (*static_cast<int *> (argument));
return 0;
}
ACE_ERROR_RETURN ((LM_ERROR,
@@ -252,7 +251,7 @@ User_Input_Task::set_send_period (void *argument)
{
if (argument)
{
- driver_.send_period (*ACE_static_cast (int *, argument));
+ driver_.send_period (*static_cast<int *> (argument));
return 0;
}
ACE_ERROR_RETURN ((LM_ERROR,
@@ -267,7 +266,7 @@ User_Input_Task::set_duration_limit (void *argument)
{
if (argument)
{
- driver_.duration_limit (*ACE_static_cast (int *, argument));
+ driver_.duration_limit (*static_cast<int *> (argument));
return 0;
}
ACE_ERROR_RETURN ((LM_ERROR,
@@ -283,7 +282,7 @@ User_Input_Task::set_logging_level (void *argument)
{
if (argument)
{
- driver_.logging_level (*ACE_static_cast (int *, argument));
+ driver_.logging_level (*static_cast<int *> (argument));
return 0;
}
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/examples/C++NPv1/Logging_Client.cpp b/examples/C++NPv1/Logging_Client.cpp
index fe6f65506dd..614b557c551 100644
--- a/examples/C++NPv1/Logging_Client.cpp
+++ b/examples/C++NPv1/Logging_Client.cpp
@@ -31,8 +31,7 @@ int operator<< (ACE_OutputCDR &cdr, const ACE_Log_Record &log_record)
// know that no members are modified here, we can safely const_cast
// the log_record parameter without violating the interface
// contract.
- ACE_Log_Record &nonconst_record = (ACE_const_cast (ACE_Log_Record&,
- log_record));
+ ACE_Log_Record &nonconst_record = (const_cast<ACE_Log_Record&> (log_record));
// Insert each field from <log_record> into the output CDR stream.
cdr << ACE_CDR::Long (log_record.type ());
cdr << ACE_CDR::Long (log_record.pid ());
diff --git a/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp b/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp
index b1cce5a481d..c184ff6dc67 100644
--- a/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp
+++ b/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp
@@ -151,10 +151,10 @@ Process_Per_Connection_Logging_Server::run_worker (int, char *argv[])
// only do reinterpret_cast on Windows.
#if defined (ACE_WIN32)
ACE_HANDLE client_handle =
- ACE_reinterpret_cast (ACE_HANDLE, client_handle_i);
+ reinterpret_cast<ACE_HANDLE> (client_handle_i);
#else
ACE_HANDLE client_handle =
- ACE_static_cast (ACE_HANDLE, client_handle_i);
+ static_cast<ACE_HANDLE> (client_handle_i);
#endif /* ACE_WIN32 */
ACE_SOCK_Stream client (client_handle);
diff --git a/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp b/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp
index 0be97237952..465c8ae8f96 100644
--- a/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp
+++ b/examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp
@@ -61,7 +61,7 @@ RT_Thread_Per_Connection_Logging_Server::handle_data (ACE_SOCK_Stream *client)
ACE_THR_FUNC_RETURN Thread_Per_Connection_Logging_Server::run_svc (void *arg)
{
- auto_ptr<Thread_Args> thread_args (ACE_static_cast (Thread_Args *, arg));
+ auto_ptr<Thread_Args> thread_args (static_cast<Thread_Args *> (arg));
thread_args->this_->handle_data (&thread_args->logging_peer_);
thread_args->logging_peer_.close ();
@@ -80,7 +80,7 @@ Thread_Per_Connection_Logging_Server::handle_connections ()
// Pointer to function entry point.
Thread_Per_Connection_Logging_Server::run_svc,
// <run_svc> parameter.
- ACE_static_cast (void *, thread_args.get ()),
+ static_cast<void *> (thread_args.get ()),
THR_DETACHED | THR_SCOPE_SYSTEM) == -1)
return -1;
thread_args.release (); // Spawned thread now owns memory
diff --git a/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp b/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp
index ec4389110f0..e2c37bb0ef2 100644
--- a/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp
+++ b/examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp
@@ -22,7 +22,7 @@ namespace {
ACE_THR_FUNC_RETURN Thread_Per_Connection_Logging_Server::run_svc (void *arg)
{
- auto_ptr<Thread_Args> thread_args (ACE_static_cast (Thread_Args *, arg));
+ auto_ptr<Thread_Args> thread_args (static_cast<Thread_Args *> (arg));
thread_args->this_->handle_data (&thread_args->logging_peer_);
thread_args->logging_peer_.close ();
@@ -41,7 +41,7 @@ Thread_Per_Connection_Logging_Server::handle_connections ()
// Pointer to function entry point.
Thread_Per_Connection_Logging_Server::run_svc,
// <run_svc> parameter.
- ACE_static_cast (void *, thread_args.get ()),
+ static_cast<void *> (thread_args.get ()),
THR_DETACHED | THR_SCOPE_SYSTEM) == -1)
return -1;
thread_args.release (); // Spawned thread now owns memory
diff --git a/examples/C++NPv2/AC_Client_Logging_Daemon.cpp b/examples/C++NPv2/AC_Client_Logging_Daemon.cpp
index 87ca4ca62ef..0231c841cbb 100644
--- a/examples/C++NPv2/AC_Client_Logging_Daemon.cpp
+++ b/examples/C++NPv2/AC_Client_Logging_Daemon.cpp
@@ -144,7 +144,7 @@ public:
int AC_Output_Handler::open (void *connector) {
connector_ =
- ACE_static_cast (AC_CLD_Connector *, connector);
+ static_cast<AC_CLD_Connector *> (connector);
int bufsiz = ACE_DEFAULT_MAX_SOCKET_BUFSIZ;
peer ().set_option (SOL_SOCKET, SO_SNDBUF,
&bufsiz, sizeof bufsiz);
@@ -335,7 +335,7 @@ int AC_CLD_Connector::connect_svc_handler
local_addr, reuse_addr, flags, perms) == -1) return -1;
SSL_clear (ssl_);
SSL_set_fd (ssl_,
- ACE_reinterpret_cast (int, svc_handler->get_handle ()));
+ reinterpret_cast<int> (svc_handler->get_handle ()));
SSL_set_verify (ssl_, SSL_VERIFY_PEER, 0);
@@ -393,12 +393,10 @@ int AC_Client_Logging_Daemon::init
for (int c; (c = get_opt ()) != -1;)
switch (c) {
case 'p': // Client logging daemon acceptor port number.
- cld_port = ACE_static_cast
- (u_short, ACE_OS::atoi (get_opt.opt_arg ()));
+ cld_port = static_cast<u_short> (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'r': // Server logging daemon acceptor port number.
- sld_port = ACE_static_cast
- (u_short, ACE_OS::atoi (get_opt.opt_arg ()));
+ sld_port = static_cast<u_short> (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 's': // Server logging daemon hostname.
ACE_OS::strsncpy
diff --git a/examples/C++NPv2/Client_Logging_Daemon.cpp b/examples/C++NPv2/Client_Logging_Daemon.cpp
index cfe4aefa14e..313ed08dc01 100644
--- a/examples/C++NPv2/Client_Logging_Daemon.cpp
+++ b/examples/C++NPv2/Client_Logging_Daemon.cpp
@@ -145,7 +145,7 @@ int CLD_Handler::open (CLD_Connector *connector) {
ACE_THR_FUNC_RETURN CLD_Handler::run_svc (void *arg) {
- CLD_Handler *handler = ACE_static_cast (CLD_Handler *, arg);
+ CLD_Handler *handler = static_cast<CLD_Handler *> (arg);
return handler->forward ();
}
@@ -347,12 +347,10 @@ int Client_Logging_Daemon::init (int argc, ACE_TCHAR *argv[]) {
for (int c; (c = get_opt ()) != -1;)
switch (c) {
case 'p': // Client logging daemon acceptor port number.
- cld_port = ACE_static_cast
- (u_short, ACE_OS::atoi (get_opt.opt_arg ()));
+ cld_port = static_cast<u_short> (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'r': // Server logging daemon acceptor port number.
- sld_port = ACE_static_cast
- (u_short, ACE_OS::atoi (get_opt.opt_arg ()));
+ sld_port = static_cast<u_short> (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 's': // Server logging daemon hostname.
ACE_OS::strsncpy
diff --git a/examples/C++NPv2/Logging_Event_Handler.h b/examples/C++NPv2/Logging_Event_Handler.h
index 614649daba8..f1a71364be5 100644
--- a/examples/C++NPv2/Logging_Event_Handler.h
+++ b/examples/C++NPv2/Logging_Event_Handler.h
@@ -47,7 +47,7 @@ public:
// Need a non-const reference to call peer(), but that's
// safe since we call a const method using it.
Logging_Handler& h =
- ACE_const_cast (Logging_Handler&, logging_handler_);
+ const_cast<Logging_Handler&> (logging_handler_);
return h.peer ().get_handle ();
};
diff --git a/examples/C++NPv2/Select_Reactor_Logging_Server.cpp b/examples/C++NPv2/Select_Reactor_Logging_Server.cpp
index c84188e07de..13db2c90387 100644
--- a/examples/C++NPv2/Select_Reactor_Logging_Server.cpp
+++ b/examples/C++NPv2/Select_Reactor_Logging_Server.cpp
@@ -46,7 +46,7 @@ private:
static ACE_THR_FUNC_RETURN event_loop (void *arg) {
- ACE_Reactor *reactor = ACE_static_cast (ACE_Reactor *, arg);
+ ACE_Reactor *reactor = static_cast<ACE_Reactor *> (arg);
reactor->owner (ACE_OS::thr_self ());
reactor->run_reactor_event_loop ();
@@ -55,7 +55,7 @@ static ACE_THR_FUNC_RETURN event_loop (void *arg) {
static ACE_THR_FUNC_RETURN controller (void *arg) {
- ACE_Reactor *reactor = ACE_static_cast (ACE_Reactor *, arg);
+ ACE_Reactor *reactor = static_cast<ACE_Reactor *> (arg);
Quit_Handler *quit_handler = 0;
ACE_NEW_RETURN (quit_handler, Quit_Handler (reactor), 0);
diff --git a/examples/C++NPv2/Server_Shutdown.cpp b/examples/C++NPv2/Server_Shutdown.cpp
index 944d296af25..0618eb31395 100644
--- a/examples/C++NPv2/Server_Shutdown.cpp
+++ b/examples/C++NPv2/Server_Shutdown.cpp
@@ -44,7 +44,7 @@ private:
static ACE_THR_FUNC_RETURN controller (void *arg) {
- ACE_Reactor *reactor = ACE_static_cast (ACE_Reactor *, arg);
+ ACE_Reactor *reactor = static_cast<ACE_Reactor *> (arg);
Quit_Handler *quit_handler = 0;
ACE_NEW_RETURN (quit_handler, Quit_Handler (reactor), 0);
diff --git a/examples/C++NPv2/Service_Reporter.cpp b/examples/C++NPv2/Service_Reporter.cpp
index a4dad9a7398..ad9cd05d26c 100644
--- a/examples/C++NPv2/Service_Reporter.cpp
+++ b/examples/C++NPv2/Service_Reporter.cpp
@@ -50,18 +50,18 @@ int Service_Reporter::handle_input (ACE_HANDLE) {
iterator.next (st) != 0;
iterator.advance ()) {
iovec iov[3];
- iov[0].iov_base = ACE_const_cast (ACE_TCHAR *, st->name ());
+ iov[0].iov_base = const_cast<ACE_TCHAR *> (st->name ());
iov[0].iov_len =
ACE_OS::strlen (st->name ()) * sizeof (ACE_TCHAR);
const ACE_TCHAR *state = st->active () ?
ACE_TEXT (" (active) ") : ACE_TEXT (" (paused) ");
- iov[1].iov_base = ACE_const_cast (ACE_TCHAR *, state);
+ iov[1].iov_base = const_cast<ACE_TCHAR *> (state);
iov[1].iov_len =
ACE_OS::strlen (state) * sizeof (ACE_TCHAR);
ACE_TCHAR *report = 0; // Ask info() to allocate buffer
int len = st->type ()->info (&report, 0);
- iov[2].iov_base = ACE_static_cast (ACE_TCHAR *, report);
- iov[2].iov_len = ACE_static_cast (size_t, len);
+ iov[2].iov_base = static_cast<ACE_TCHAR *> (report);
+ iov[2].iov_len = static_cast<size_t> (len);
iov[2].iov_len *= sizeof (ACE_TCHAR);
peer_stream.sendv_n (iov, 3);
ACE::strdelete (report);
diff --git a/examples/C++NPv2/TPC_Logging_Server.cpp b/examples/C++NPv2/TPC_Logging_Server.cpp
index f990a87151a..739240fb34c 100644
--- a/examples/C++NPv2/TPC_Logging_Server.cpp
+++ b/examples/C++NPv2/TPC_Logging_Server.cpp
@@ -82,7 +82,7 @@ int TPC_Logging_Acceptor::accept_svc_handler
if (PARENT::accept_svc_handler (sh) == -1) return -1;
SSL_clear (ssl_); // Reset for new SSL connection.
SSL_set_fd
- (ssl_, ACE_reinterpret_cast (int, sh->get_handle ()));
+ (ssl_, reinterpret_cast<int> (sh->get_handle ()));
SSL_set_verify
(ssl_,
diff --git a/examples/C++NPv2/TP_Logging_Server.cpp b/examples/C++NPv2/TP_Logging_Server.cpp
index e62c7d9e892..b591ef425b7 100644
--- a/examples/C++NPv2/TP_Logging_Server.cpp
+++ b/examples/C++NPv2/TP_Logging_Server.cpp
@@ -15,7 +15,7 @@ int TP_Logging_Handler::handle_input (ACE_HANDLE) {
ACE_Message_Block *log_blk = 0;
ACE_NEW_RETURN
(log_blk, ACE_Message_Block
- (ACE_reinterpret_cast (char *, this)), -1);
+ (reinterpret_cast<char *> (this)), -1);
log_blk->cont (mblk);
ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, lock_, -1);
if (TP_LOGGING_TASK::instance ()->put (log_blk) == -1)
@@ -50,8 +50,7 @@ TP_Logging_Handler::handle_close (ACE_HANDLE handle,
int TP_Logging_Task::svc () {
for (ACE_Message_Block *log_blk; getq (log_blk) != -1; ) {
- TP_Logging_Handler *tp_handler = ACE_reinterpret_cast
- (TP_Logging_Handler *, log_blk->rd_ptr ());
+ TP_Logging_Handler *tp_handler = reinterpret_cast<TP_Logging_Handler *> (log_blk->rd_ptr ());
Logging_Handler logging_handler (tp_handler->log_file ());
logging_handler.write_log_record (log_blk->cont ());
diff --git a/examples/C++NPv2/TP_Reactor_Logging_Server.cpp b/examples/C++NPv2/TP_Reactor_Logging_Server.cpp
index 402d64e5025..3c2d73fdd0e 100644
--- a/examples/C++NPv2/TP_Reactor_Logging_Server.cpp
+++ b/examples/C++NPv2/TP_Reactor_Logging_Server.cpp
@@ -47,7 +47,7 @@ private:
static ACE_THR_FUNC_RETURN event_loop (void *arg) {
- ACE_Reactor *reactor = ACE_static_cast (ACE_Reactor *, arg);
+ ACE_Reactor *reactor = static_cast<ACE_Reactor *> (arg);
reactor->owner (ACE_OS::thr_self ());
reactor->run_reactor_event_loop ();
@@ -56,7 +56,7 @@ static ACE_THR_FUNC_RETURN event_loop (void *arg) {
static ACE_THR_FUNC_RETURN controller (void *arg) {
- ACE_Reactor *reactor = ACE_static_cast (ACE_Reactor *, arg);
+ ACE_Reactor *reactor = static_cast<ACE_Reactor *> (arg);
Quit_Handler *quit_handler = 0;
ACE_NEW_RETURN (quit_handler, Quit_Handler (reactor), 0);
diff --git a/examples/C++NPv2/WFMO_Reactor_Logging_Server.cpp b/examples/C++NPv2/WFMO_Reactor_Logging_Server.cpp
index 505c7d474fc..2be5102ad52 100644
--- a/examples/C++NPv2/WFMO_Reactor_Logging_Server.cpp
+++ b/examples/C++NPv2/WFMO_Reactor_Logging_Server.cpp
@@ -107,7 +107,7 @@ protected:
static ACE_THR_FUNC_RETURN event_loop (void *arg) {
- ACE_Reactor *reactor = ACE_static_cast (ACE_Reactor *, arg);
+ ACE_Reactor *reactor = static_cast<ACE_Reactor *> (arg);
reactor->owner (ACE_OS::thr_self ());
reactor->run_reactor_event_loop ();
diff --git a/examples/C++NPv2/display_logfile.cpp b/examples/C++NPv2/display_logfile.cpp
index e99304a561c..4796ceccd91 100644
--- a/examples/C++NPv2/display_logfile.cpp
+++ b/examples/C++NPv2/display_logfile.cpp
@@ -66,7 +66,7 @@ public:
mblk.space ());
if (bytes_read <= 0)
break;
- mblk.wr_ptr (ACE_static_cast (size_t, bytes_read));
+ mblk.wr_ptr (static_cast<size_t> (bytes_read));
// We have a bunch of data from the log file. The data is
// arranged like so:
@@ -144,22 +144,19 @@ public:
// Extract the type
ACE_CDR::Long *lp;
- lp = ACE_reinterpret_cast
- (ACE_CDR::Long*, temp->wr_ptr ());
+ lp = reinterpret_cast<ACE_CDR::Long*> (temp->wr_ptr ());
cdr >> *lp;
temp->wr_ptr (sizeof (ACE_CDR::Long));
temp = temp->cont ();
// Extract the pid
- lp = ACE_reinterpret_cast
- (ACE_CDR::Long*, temp->wr_ptr ());
+ lp = reinterpret_cast<ACE_CDR::Long*> (temp->wr_ptr ());
cdr >> *lp;
temp->wr_ptr (sizeof (ACE_CDR::Long));
temp = temp->cont ();
// Extract the timestamp (2 Longs)
- lp = ACE_reinterpret_cast
- (ACE_CDR::Long*, temp->wr_ptr ());
+ lp = reinterpret_cast<ACE_CDR::Long*> (temp->wr_ptr ());
cdr >> *lp; ++lp; cdr >> *lp;
temp->wr_ptr (2 * sizeof (ACE_CDR::Long));
temp = temp->cont ();
diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp
index 745b744129c..d6911908658 100644
--- a/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp
+++ b/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp
@@ -31,7 +31,7 @@ do_child (ACE_FIFO_Recv &fifo_reader)
return -1;
char *argv[2];
- argv[0] = ACE_const_cast (char *, EXEC_COMMAND_ARG);
+ argv[0] = const_cast<char *> (EXEC_COMMAND_ARG);
argv[1] = 0;
if (ACE_OS::execvp (EXEC_NAME, argv) == -1)
diff --git a/examples/IPC_SAP/FILE_SAP/client.cpp b/examples/IPC_SAP/FILE_SAP/client.cpp
index 531ef6a62c4..f26302f3b57 100644
--- a/examples/IPC_SAP/FILE_SAP/client.cpp
+++ b/examples/IPC_SAP/FILE_SAP/client.cpp
@@ -52,7 +52,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
else
ACE_OS::printf ("fileinfo : mode = %o\nno of links = %lu\nsize = %lu\n",
(u_int) fileinfo.mode_ & 0777,
- ACE_static_cast(u_long ,fileinfo.nlink_),
+ static_cast<u_long > (fileinfo.nlink_),
(u_long) fileinfo.size_);
off_t fpos = cli_file.tell ();
diff --git a/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp
index 724491fdb0a..e4cf8997857 100644
--- a/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp
@@ -60,7 +60,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
// Establish connection with remote server.
if (ACE_OS::connect (s_handle,
- ACE_reinterpret_cast(sockaddr *, &saddr),
+ reinterpret_cast<sockaddr *> (&saddr),
sizeof saddr) == -1)
ACE_OS::perror (ACE_TEXT("connect")), ACE_OS::exit (1);
diff --git a/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp
index 3273a306cdc..0a6915cc463 100644
--- a/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp
@@ -50,7 +50,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
/* Associate address with endpoint */
if (ACE_OS::bind (s_handle,
- ACE_reinterpret_cast(struct sockaddr *, &saddr),
+ reinterpret_cast<struct sockaddr *> (&saddr),
sizeof saddr) == -1)
ACE_OS::perror (ACE_TEXT("bind")), ACE_OS::exit (1);
@@ -72,8 +72,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
do
n_handle =
ACE_OS::accept (s_handle,
- ACE_reinterpret_cast(struct sockaddr *,
- &cli_addr),
+ reinterpret_cast<struct sockaddr *> (&cli_addr),
&cli_addr_len);
while (n_handle == ACE_INVALID_HANDLE && errno == EINTR);
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
index 0f112652030..f681defd2f9 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
@@ -275,7 +275,7 @@ Options::oneway_client_test (void *)
cli_stream.close ();
delete [] request;
- return ACE_reinterpret_cast (void *, result);
+ return reinterpret_cast<void *> (result);
}
// Static function entry point to the twoway client service.
@@ -366,7 +366,7 @@ Options::twoway_client_test (void *)
cli_stream.close ();
delete [] request;
- return ACE_reinterpret_cast (void *, result);
+ return reinterpret_cast<void *> (result);
}
ACE_THR_FUNC
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp
index 71b568fd9cc..b978bb5f989 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp
@@ -25,14 +25,13 @@ run_server (ACE_THR_FUNC server,
// Spawn a new thread and run the new connection in that thread of
// control using the <server> function as the entry point.
if (ACE_Thread_Manager::instance ()->spawn (server,
- ACE_reinterpret_cast(void *,
- handle),
+ reinterpret_cast<void *> (handle),
THR_DETACHED) == -1)
ACE_ERROR ((LM_ERROR,
"(%P|%t) %p\n",
"spawn"));
#else
- (*server) (ACE_reinterpret_cast(void *, handle));
+ (*server) (reinterpret_cast<void *> (handle));
#endif /* ACE_HAS_THREADS */
}
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp
index 5d446b444c5..cddfe787d92 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp
@@ -131,15 +131,14 @@ run_event_loop (const ACE_TCHAR rendezvous[])
#if defined (ACE_HAS_THREADS)
if (ACE_Thread_Manager::instance ()->spawn ((ACE_THR_FUNC) server,
- ACE_reinterpret_cast (void *,
- new_stream.get_handle ()),
+ reinterpret_cast<void *> (new_stream.get_handle ()),
THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("spawn")),
1);
#else
- server (ACE_reinterpret_cast (void *, new_stream.get_handle ()));
+ server (reinterpret_cast<void *> (new_stream.get_handle ()));
#endif /* ACE_HAS_THREADS */
}
diff --git a/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp b/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp
index 551627e3bc6..b629b9f0dd8 100644
--- a/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp
@@ -37,7 +37,7 @@ handle_client (ACE_LSOCK_Stream &stream)
)
ACE_DEBUG ((LM_DEBUG, "%*s", n, buf));
- ACE_OS::sprintf (buf, "%d", ACE_static_cast (int, ACE_OS::getpid ()));
+ ACE_OS::sprintf (buf, "%d", static_cast<int> (ACE_OS::getpid ()));
ACE_DEBUG ((LM_DEBUG, "(%s, %d) ----------------------------------------\n", buf, ACE_OS::strlen (buf)));
diff --git a/examples/Reactor/Misc/notification.cpp b/examples/Reactor/Misc/notification.cpp
index 05b6b05eb35..34c1829b561 100644
--- a/examples/Reactor/Misc/notification.cpp
+++ b/examples/Reactor/Misc/notification.cpp
@@ -157,9 +157,8 @@ Thread_Handler::Thread_Handler (int delay,
Thread_Handler (i + 1,
this->iterations_));
- if (ACE_Thread::spawn (ACE_reinterpret_cast (ACE_THR_FUNC,
- &Thread_Handler::svc_run),
- ACE_reinterpret_cast (void *, th),
+ if (ACE_Thread::spawn (reinterpret_cast<ACE_THR_FUNC> (&Thread_Handler::svc_run),
+ reinterpret_cast<void *> (th),
THR_NEW_LWP | THR_DETACHED) != 0)
ACE_ERROR ((LM_ERROR,
"%p\n",
@@ -338,12 +337,12 @@ void *
Thread_Handler::svc_run (void *eh)
{
Thread_Handler *this_handler =
- ACE_reinterpret_cast (Thread_Handler *, eh);
+ reinterpret_cast<Thread_Handler *> (eh);
if (this_handler->svc () == 0)
return 0;
else
- return ACE_reinterpret_cast (void *, -1);
+ return reinterpret_cast<void *> (-1);
}
int
diff --git a/examples/Reactor/Multicast/Log_Wrapper.cpp b/examples/Reactor/Multicast/Log_Wrapper.cpp
index cac49a34c64..055b57b9975 100644
--- a/examples/Reactor/Multicast/Log_Wrapper.cpp
+++ b/examples/Reactor/Multicast/Log_Wrapper.cpp
@@ -68,7 +68,7 @@ Log_Wrapper::log_message (Log_Priority type, char *message)
this->log_msg_.sequence_number = htonl(sequence_number_);
iovec iovp[2];
- iovp[0].iov_base = ACE_reinterpret_cast (char*, &log_msg_);
+ iovp[0].iov_base = reinterpret_cast<char*> (&log_msg_);
iovp[0].iov_len = sizeof (log_msg_);
iovp[1].iov_base = message;
iovp[1].iov_len = log_msg_.msg_length;
diff --git a/examples/Reactor/Proactor/test_aiosig_ace.cpp b/examples/Reactor/Proactor/test_aiosig_ace.cpp
index 685df93f073..34c1b9b5ab2 100644
--- a/examples/Reactor/Proactor/test_aiosig_ace.cpp
+++ b/examples/Reactor/Proactor/test_aiosig_ace.cpp
@@ -174,7 +174,7 @@ issue_aio_calls (void)
aiocb3.aio_sigevent.sigev_signo = SIGRTMIN;
aiocb3.aio_sigevent.sigev_value.sival_ptr = (void *) &aiocb3;
sigval value;
- value.sival_ptr = ACE_reinterpret_cast (void *, &aiocb3);
+ value.sival_ptr = reinterpret_cast<void *> (&aiocb3);
// Queue this one for completion right now.
if (sigqueue (ACE_OS::getpid (), SIGRTMIN, value) == -1)
// Queueing failed.
diff --git a/examples/Reactor/WFMO_Reactor/APC.cpp b/examples/Reactor/WFMO_Reactor/APC.cpp
index 589f191a395..bf42fd1edfa 100644
--- a/examples/Reactor/WFMO_Reactor/APC.cpp
+++ b/examples/Reactor/WFMO_Reactor/APC.cpp
@@ -56,8 +56,7 @@ apc_callback (DWORD)
void
queue_apc (void)
{
- DWORD result = ::QueueUserAPC (ACE_reinterpret_cast (PAPCFUNC,
- &apc_callback),
+ DWORD result = ::QueueUserAPC (reinterpret_cast<PAPCFUNC> (&apc_callback),
// pointer to APC function
::GetCurrentThread (), // handle to the thread
0); // argument for the APC function
diff --git a/examples/Reactor/WFMO_Reactor/Handle_Close.cpp b/examples/Reactor/WFMO_Reactor/Handle_Close.cpp
index d4f4fa3cf1d..9eb6d7c727a 100644
--- a/examples/Reactor/WFMO_Reactor/Handle_Close.cpp
+++ b/examples/Reactor/WFMO_Reactor/Handle_Close.cpp
@@ -180,7 +180,7 @@ public:
ACE_Event_Handler::EXCEPT_MASK;
ACE_ASSERT (old_masks ==
- ACE_static_cast (ACE_Reactor_Mask, result));
+ static_cast<ACE_Reactor_Mask> (result));
ACE_UNUSED_ARG (old_masks);
// Get new masks
@@ -195,7 +195,7 @@ public:
ACE_Event_Handler::EXCEPT_MASK;
ACE_ASSERT (current_masks ==
- ACE_static_cast (ACE_Reactor_Mask, result));
+ static_cast<ACE_Reactor_Mask> (result));
ACE_UNUSED_ARG (current_masks);
// Remove for writing
diff --git a/examples/Reactor/WFMO_Reactor/Multithreading.cpp b/examples/Reactor/WFMO_Reactor/Multithreading.cpp
index db0687cff28..8e6d6dfa6f1 100644
--- a/examples/Reactor/WFMO_Reactor/Multithreading.cpp
+++ b/examples/Reactor/WFMO_Reactor/Multithreading.cpp
@@ -35,9 +35,7 @@
ACE_RCSID(WFMO_Reactor, Multithreading, "$Id$")
static int concurrent_threads = 1;
-static int number_of_handles = ACE_static_cast (
- int,
- ACE_Reactor::instance ()->size ());
+static int number_of_handles = static_cast<int> (ACE_Reactor::instance ()->size ());
static int number_of_handles_to_signal = 1;
static int interval = 2;
static int iterations = 10;
@@ -143,7 +141,7 @@ Task_Handler::Task_Handler (size_t number_of_handles,
// Make us an active object.
if (this->activate (THR_NEW_LWP,
- ACE_static_cast (int, concurrent_threads)) == -1)
+ static_cast<int> (concurrent_threads)) == -1)
ACE_ERROR ((LM_ERROR, "%p\t cannot activate task\n",
"activate"));
}
diff --git a/examples/Reactor/WFMO_Reactor/Removals.cpp b/examples/Reactor/WFMO_Reactor/Removals.cpp
index 1505dd53452..260b9e897ee 100644
--- a/examples/Reactor/WFMO_Reactor/Removals.cpp
+++ b/examples/Reactor/WFMO_Reactor/Removals.cpp
@@ -88,7 +88,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *[])
int close_down = argc > 1 ? 1 : 0;
for (size_t i = 1; i <= ACE_Reactor::instance ()->size (); i++)
- new Event_Handler (ACE_static_cast (int, i), close_down);
+ new Event_Handler (static_cast<int> (i), close_down);
int result = 0;
ACE_Time_Value time (1);
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
index 8d7c30686f6..346a22e773c 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
@@ -50,8 +50,7 @@ Handle_Timeout::init (int argc, ACE_TCHAR *argv[])
}
if (ACE_Reactor::instance ()->schedule_timer (this,
- ACE_reinterpret_cast (void *,
- arg),
+ reinterpret_cast<void *> (arg),
delta,
interval) == -1)
return -1;
diff --git a/examples/Shared_Malloc/test_malloc.cpp b/examples/Shared_Malloc/test_malloc.cpp
index 162ae921c3a..c0531029b95 100644
--- a/examples/Shared_Malloc/test_malloc.cpp
+++ b/examples/Shared_Malloc/test_malloc.cpp
@@ -18,8 +18,7 @@ static int
gen_size (void)
{
#if defined (ACE_HAS_THREADS)
- ACE_RANDR_TYPE seed = ACE_static_cast (ACE_RANDR_TYPE,
- ACE_reinterpret_cast (unsigned long, &seed));
+ ACE_RANDR_TYPE seed = static_cast<ACE_RANDR_TYPE> (reinterpret_cast<unsigned long> (&seed));
return (ACE_OS::rand_r (seed) % Options::instance ()->max_msg_size ()) + 1;
#else
return (ACE_OS::rand () % Options::instance ()->max_msg_size ()) + 1;
diff --git a/examples/Shared_Malloc/test_persistence.cpp b/examples/Shared_Malloc/test_persistence.cpp
index 8c2f5f61e19..9177d22745d 100644
--- a/examples/Shared_Malloc/test_persistence.cpp
+++ b/examples/Shared_Malloc/test_persistence.cpp
@@ -36,8 +36,7 @@ public:
Employee (const char *name, u_long id) : id_ (id)
{
size_t len = ACE_OS::strlen (name) + 1;
- this->name_ = ACE_reinterpret_cast (char *,
- shmem_allocator->malloc (len));
+ this->name_ = reinterpret_cast<char *> (shmem_allocator->malloc (len));
ACE_OS::strcpy (this->name_, name);
}
@@ -51,8 +50,7 @@ public:
shmem_allocator->free (this->name_);
size_t len = ACE_OS::strlen (name) + 1;
- this->name_ = ACE_reinterpret_cast (char *,
- shmem_allocator->malloc (len));
+ this->name_ = reinterpret_cast<char *> (shmem_allocator->malloc (len));
ACE_OS::strcpy (this->name_, name);
}
@@ -205,8 +203,7 @@ GUI_Handler::find_employee (const char *name)
if (shmem_allocator->find (name,
temp) == 0)
{
- Employee *employee = ACE_reinterpret_cast (Employee *,
- temp);
+ Employee *employee = reinterpret_cast<Employee *> (temp);
ACE_DEBUG ((LM_DEBUG,
"The following employee was found.......\n\n"));
@@ -235,8 +232,7 @@ GUI_Handler::list_employees (void)
iterator.next (temp) != 0;
iterator.advance ())
{
- Employee *employee = ACE_reinterpret_cast (Employee *,
- temp);
+ Employee *employee = reinterpret_cast<Employee *> (temp);
ACE_DEBUG ((LM_DEBUG,
"Employee name: %s\nEmployee id: %d\n",
employee->name (),
@@ -253,8 +249,7 @@ GUI_Handler::list_employees (void)
iterator.next (temp) != 0;
iterator.advance ())
{
- Employee *employee = ACE_reinterpret_cast (Employee *,
- temp);
+ Employee *employee = reinterpret_cast<Employee *> (temp);
ACE_DEBUG ((LM_DEBUG,
"Employee name: %s\nEmployee id: %d\n",
employee->name (),
@@ -272,8 +267,7 @@ GUI_Handler::delete_employee (const char *name)
if (shmem_allocator->unbind (name,
temp) == 0)
{
- Employee *employee = ACE_reinterpret_cast (Employee *,
- temp);
+ Employee *employee = reinterpret_cast<Employee *> (temp);
ACE_DEBUG ((LM_DEBUG,
"The following employee was found and deleted.......\n\n"));
diff --git a/examples/Shared_Malloc/test_position_independent_malloc.cpp b/examples/Shared_Malloc/test_position_independent_malloc.cpp
index dc756bf6847..9d9dc308a08 100644
--- a/examples/Shared_Malloc/test_position_independent_malloc.cpp
+++ b/examples/Shared_Malloc/test_position_independent_malloc.cpp
@@ -127,8 +127,7 @@ parse_args (int argc, ACE_TCHAR *argv[])
{
case 'a':
// Override the default base address.
- base_addr = ACE_reinterpret_cast (void *,
- ACE_OS::atoi (get_opt.opt_arg ()));
+ base_addr = reinterpret_cast<void *> (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'T':
#if defined (ACE_HAS_TRACE)
diff --git a/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp b/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp
index 84f37561e9d..9f0578f09b1 100644
--- a/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp
+++ b/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp
@@ -21,7 +21,7 @@ main (int, char *[])
ACE_SV_Message_Queue msgque (SRV_KEY);
Message_Block send_msg (SRV_ID,
pid,
- ACE_OS::cuserid (ACE_static_cast (char *, 0)),
+ ACE_OS::cuserid (static_cast<char *> (0)),
"did you get this?");
Message_Block recv_msg (pid);
diff --git a/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp b/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp
index 19c35ff1252..57c7502cabd 100644
--- a/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp
+++ b/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp
@@ -33,7 +33,7 @@ main (int, char *[])
Message_Block recv_msg (SRV_ID);
Message_Block send_msg (0,
pid,
- ACE_OS::cuserid (ACE_static_cast (char *, 0)),
+ ACE_OS::cuserid (static_cast<char *> (0)),
"I received your message.");
// Register a signal handler.
diff --git a/examples/System_V_IPC/SV_Message_Queues/TMQ_Client.cpp b/examples/System_V_IPC/SV_Message_Queues/TMQ_Client.cpp
index 3382a45c449..055f93223c3 100644
--- a/examples/System_V_IPC/SV_Message_Queues/TMQ_Client.cpp
+++ b/examples/System_V_IPC/SV_Message_Queues/TMQ_Client.cpp
@@ -20,7 +20,7 @@ ACE_TMAIN (int, ACE_TCHAR *[])
ACE_Typed_SV_Message_Queue<Message_Data> msgque (key_t (SRV_KEY));
Message_Data msg_data (pid,
- ACE_OS::cuserid (ACE_static_cast (char *, 0)),
+ ACE_OS::cuserid (static_cast<char *> (0)),
"did you get this?");
ACE_Typed_SV_Message<Message_Data> send_msg (msg_data,
diff --git a/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp b/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp
index e1a22cda9c8..9c7f9256aef 100644
--- a/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp
+++ b/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp
@@ -31,7 +31,7 @@ handler (int)
int
main (int, char *[])
{
- char *username = ACE_OS::cuserid (ACE_static_cast (char *, 0));
+ char *username = ACE_OS::cuserid (static_cast<char *> (0));
Message_Data msg_data ((int) ACE_OS::getpid (), username, "I received your message.");
ACE_Typed_SV_Message<Message_Data> send_msg (msg_data, 0, msg_data.length ());
ACE_Typed_SV_Message<Message_Data> recv_msg (SRV_ID);
diff --git a/examples/TMCast/Member/member.cpp b/examples/TMCast/Member/member.cpp
index 991f42d024f..67db2fc089a 100644
--- a/examples/TMCast/Member/member.cpp
+++ b/examples/TMCast/Member/member.cpp
@@ -53,8 +53,7 @@ main (int argc, char* argv[])
ACE_UINT64 tmpl = 1000000U;
unsigned long t =
- ACE_static_cast (unsigned long,
- ((tmpl * ACE_OS::rand ()) / RAND_MAX));
+ static_cast<unsigned long> (((tmpl * ACE_OS::rand ()) / RAND_MAX));
// ACE_DEBUG ((LM_DEBUG, "sleeping for %u\n", t));
diff --git a/examples/Threads/thread_manager.cpp b/examples/Threads/thread_manager.cpp
index 6bbcbee6300..e6f12f6c939 100644
--- a/examples/Threads/thread_manager.cpp
+++ b/examples/Threads/thread_manager.cpp
@@ -66,7 +66,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_Thread_Manager *thr_mgr = ACE_Thread_Manager::instance ();
int grp_id = thr_mgr->spawn_n (n_threads, ACE_THR_FUNC (worker),
- ACE_reinterpret_cast (void *, n_iterations),
+ reinterpret_cast<void *> (n_iterations),
THR_NEW_LWP | THR_DETACHED);
// Wait for 1 second and then suspend every thread in the group.
diff --git a/examples/Threads/thread_specific.cpp b/examples/Threads/thread_specific.cpp
index e26571ad61b..5fdd9a5471c 100644
--- a/examples/Threads/thread_specific.cpp
+++ b/examples/Threads/thread_specific.cpp
@@ -36,7 +36,7 @@ cleanup (void *ptr)
"(%t) in cleanup, ptr = %x\n",
ptr));
- delete ACE_reinterpret_cast (char *, ptr);
+ delete reinterpret_cast<char *> (ptr);
}
// This worker function is the entry point for each thread.
@@ -203,8 +203,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
#if defined (ACE_HAS_THREADS)
if (ACE_Thread_Manager::instance ()->spawn_n (threads,
ACE_THR_FUNC (&worker),
- ACE_reinterpret_cast(void *,
- count),
+ reinterpret_cast<void *> (count),
THR_BOUND | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
diff --git a/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp b/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp
index 3329e983323..ceafaef5fe9 100644
--- a/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp
+++ b/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp
@@ -141,7 +141,7 @@ Input_Task::svc (void)
int
Input_Task::add_timer (void *argument)
{
- u_long useconds = *ACE_reinterpret_cast (int *, argument);
+ u_long useconds = *reinterpret_cast<int *> (argument);
ACE_Time_Value interval (useconds / usecs_,
useconds % usecs_);
ACE_Time_Value expire_at = ACE_OS::gettimeofday () + interval;
@@ -174,8 +174,7 @@ Input_Task::add_timer (void *argument)
int
Input_Task::cancel_timer (void *argument)
{
- return this->queue_->cancel (*ACE_reinterpret_cast (int *,
- argument));
+ return this->queue_->cancel (*reinterpret_cast<int *> (argument));
}
// Lists the timers in the queue. Ignores the argument. This method
diff --git a/examples/Web_Crawler/Command_Processor.cpp b/examples/Web_Crawler/Command_Processor.cpp
index bd164f83b7b..c23310be017 100644
--- a/examples/Web_Crawler/Command_Processor.cpp
+++ b/examples/Web_Crawler/Command_Processor.cpp
@@ -89,8 +89,7 @@ Command_Processor::execute (void)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n", "dequeue_head"),
-1);
- URL_Command *url_command = ACE_dynamic_cast (URL_Command *,
- command);
+ URL_Command *url_command = dynamic_cast<URL_Command *> (command);
Auto_Destroyer<URL_Command> url_command_ptr (url_command);
if (url_command_ptr->execute () != 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/examples/Web_Crawler/Iterators.cpp b/examples/Web_Crawler/Iterators.cpp
index 2f85647fa7c..98b4f999622 100644
--- a/examples/Web_Crawler/Iterators.cpp
+++ b/examples/Web_Crawler/Iterators.cpp
@@ -46,7 +46,7 @@ HTML_Body_Iterator::next (ACE_CString &url)
if ( href_index > 0)
{
// Get back to buffer start location.
- this->url_.stream ().seek (-1 * ACE_static_cast (off_t, len),
+ this->url_.stream ().seek (-1 * static_cast<off_t> (len),
SEEK_CUR);
int start_index = buffer.find ('\"',
diff --git a/examples/Web_Crawler/Mem_Map_Stream.cpp b/examples/Web_Crawler/Mem_Map_Stream.cpp
index 7626f378ce8..dda1d465a71 100644
--- a/examples/Web_Crawler/Mem_Map_Stream.cpp
+++ b/examples/Web_Crawler/Mem_Map_Stream.cpp
@@ -38,8 +38,7 @@ int
Mem_Map_Stream::rewind (void)
{
this->recv_pos_ =
- ACE_reinterpret_cast (char *,
- this->mem_map_.addr ());
+ reinterpret_cast<char *> (this->mem_map_.addr ());
this->get_pos_ = this->recv_pos_;
this->end_of_mapping_plus1_ =
this->recv_pos_ + this->mem_map_.size ();
@@ -102,8 +101,7 @@ Mem_Map_Stream::seek (off_t offset, int whence)
{
case SEEK_SET:
this->get_pos_ =
- ACE_reinterpret_cast (char *,
- this->mem_map_.addr ())
+ reinterpret_cast<char *> (this->mem_map_.addr ())
+ offset;
break;
@@ -125,8 +123,7 @@ Mem_Map_Stream::seek (off_t offset, int whence)
return (off_t) -1;
this->recv_pos_ = this->get_pos_;
- return this->recv_pos_ - ACE_reinterpret_cast (char *,
- this->mem_map_.addr ());
+ return this->recv_pos_ - reinterpret_cast<char *> (this->mem_map_.addr ());
}
Mem_Map_Stream::Svc_Handler *
@@ -224,14 +221,12 @@ Mem_Map_Stream::grow_file_and_remap (void)
// MAP_FAILED is used as a "first time in" flag.
if (this->recv_pos_ == MAP_FAILED)
{
- this->recv_pos_ = ACE_reinterpret_cast (char *,
- this->mem_map_.addr ());
+ this->recv_pos_ = reinterpret_cast<char *> (this->mem_map_.addr ());
this->get_pos_ = this->recv_pos_;
}
this->end_of_mapping_plus1_ =
- ACE_reinterpret_cast (char *,
- this->mem_map_.addr ())
+ reinterpret_cast<char *> (this->mem_map_.addr ())
+ this->mem_map_.size ();
return 0;
diff --git a/examples/Web_Crawler/URL_Addr.cpp b/examples/Web_Crawler/URL_Addr.cpp
index a49dfd2ac96..5a630e387fb 100644
--- a/examples/Web_Crawler/URL_Addr.cpp
+++ b/examples/Web_Crawler/URL_Addr.cpp
@@ -145,11 +145,9 @@ ACE_URL_Addr::ACE_URL_Addr (const ACE_URL_Addr &addr)
int
ACE_URL_Addr::set (const ACE_URL_Addr &addr)
{
- ACE_OS::free (ACE_reinterpret_cast (void *,
- const_cast<ACE_TCHAR *>
+ ACE_OS::free (reinterpret_cast<void *> (const_cast<ACE_TCHAR *>
(this->path_name_)));
- ACE_OS::free (ACE_reinterpret_cast (void *,
- const_cast<ACE_TCHAR *>
+ ACE_OS::free (reinterpret_cast<void *> (const_cast<ACE_TCHAR *>
(this->addr_string_)));
if (this->ACE_INET_Addr::set (addr) == -1)
return -1;
@@ -220,11 +218,9 @@ ACE_URL_Addr::get_path_name (void) const
ACE_URL_Addr::~ACE_URL_Addr (void)
{
- ACE_OS::free (ACE_reinterpret_cast (void *,
- const_cast<ACE_TCHAR *>
+ ACE_OS::free (reinterpret_cast<void *> (const_cast<ACE_TCHAR *>
(this->path_name_)));
- ACE_OS::free (ACE_reinterpret_cast (void *,
- const_cast<ACE_TCHAR *>
+ ACE_OS::free (reinterpret_cast<void *> (const_cast<ACE_TCHAR *>
(this->addr_string_)));
this->path_name_ = 0;
}
diff --git a/examples/Web_Crawler/URL_Visitor.cpp b/examples/Web_Crawler/URL_Visitor.cpp
index 5e25613e38e..2ad46d42eac 100644
--- a/examples/Web_Crawler/URL_Visitor.cpp
+++ b/examples/Web_Crawler/URL_Visitor.cpp
@@ -165,8 +165,7 @@ HTML_Body_Validation_Strategy::execute (void)
HTTP_URL *http_url;
ACE_NEW_RETURN (http_url,
HTTP_URL (**url_addr_ptr,
- ACE_dynamic_cast (HTTP_URL *,
- &this->url_)),
+ dynamic_cast<HTTP_URL *> (&this->url_)),
0);
URL_Command *url_command;
ACE_NEW_RETURN (url_command,