diff options
author | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-01-28 15:36:15 +0000 |
---|---|---|
committer | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-01-28 15:36:15 +0000 |
commit | 8e2623740409f370574b2550fdaafd6ac2b74712 (patch) | |
tree | fd46d9924e4977b94da089e571649ee17cc7e8df /TAO | |
parent | 61fdef70a89a372bbaf37b42cbe8de73a37e0ffe (diff) | |
download | ATCD-8e2623740409f370574b2550fdaafd6ac2b74712.tar.gz |
ChangeLogTag: Fri Jan 28 07:18:10 2005 J.T. Conklin <jtc@acorntoolworks.com>
Diffstat (limited to 'TAO')
73 files changed, 320 insertions, 322 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index c4b12399b22..de7c22206b1 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,81 @@ +Fri Jan 28 07:18:10 2005 J.T. Conklin <jtc@acorntoolworks.com> + + * examples/AMH/Sink_Server/AMH_Servant.cpp: + * examples/AMI/FL_Callback/Progress_i.cpp: + * examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp: + * examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp: + * examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp: + * examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp: + * examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp: + * examples/Event_Comm/Event_Comm_i.cpp: + * examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/EDF_SchedulingC.cpp: + * examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp: + * examples/Load_Balancing_persistent/Load_Balancer_i.cpp: + * examples/Logging/Logger_i.cpp: + * examples/Logging/Logging_Service_i.cpp: + * examples/Logging/Logging_Test_i.cpp: + * examples/OBV/Typed_Events/Client_i.cpp: + * examples/OBV/Typed_Events/Event_Types_impl.cpp: + * examples/OBV/Typed_Events/Server_i.cpp: + * examples/POA/DSI/Database_i.cpp: + * examples/POA/DSI/server.cpp: + * examples/POA/Generic_Servant/client.cpp: + * examples/POA/Loader/Servant_Activator.cpp: + * examples/POA/Loader/Servant_Locator.cpp: + * examples/POA/Loader/Server_Manager.cpp: + * examples/POA/On_Demand_Activation/server.cpp: + * examples/POA/On_Demand_Loading/Servant_Locator.cpp: + * examples/POA/On_Demand_Loading/Servant_Manager.cpp: + * examples/POA/On_Demand_Loading/Server_Manager.cpp: + * examples/Persistent_Grid/Grid_i.cpp: + * examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp: + * examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp: + * examples/RTCORBA/Activity/Task_Stats.cpp: + * examples/RTScheduling/FP_SchedulingC.cpp: + * examples/RTScheduling/MIF_SchedulingC.cpp: + * examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp: + * examples/Simple/Simple_util.cpp: + * examples/Simple/time/Time_Client_i.cpp: + * examples/Simulator/Event_Supplier/DOVE_Supplier.cpp: + * examples/Simulator/Event_Supplier/DualEC_Sup.cpp: + * performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp: + * performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp: + * performance-tests/Cubit/TAO/MT_Cubit/server.cpp: + * performance-tests/POA/Object_Creation_And_Registration/registration.cpp: + * performance-tests/RTCorba/Thread_Pool/client.cpp: + * tests/AMH_Exceptions/server.cpp: + * tests/AMH_Oneway/server.cpp: + * tests/CDR/allocator.cpp: + * tests/CDR/growth.cpp: + * tests/CDR/octet_sequence.cpp: + * tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp: + * tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp: + * tests/CodeSets/simple/client.cpp: + * tests/Codec/client.cpp: + * tests/Collocation_Opportunities/Collocation_Opportunities.cpp: + * tests/FL_Cube/client.cpp: + * tests/NestedUpcall/MT_Client_Test/client.cpp: + * tests/NestedUpcall/Simple/server.cpp: + * tests/OctetSeq/OctetSeq.cpp: + * tests/OctetSeq/client.cpp: + * tests/OctetSeq/test_i.cpp: + * tests/Policies/Manipulation.cpp: + * tests/Portable_Interceptors/Benchmark/interceptors.cpp: + * tests/Portable_Interceptors/Bug_1559/interceptors.cpp: + * tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp: + * tests/Portable_Interceptors/Service_Context_Manipulation/interceptors.cpp: + * tests/RTCORBA/RTMutex/server.cpp: + * tests/RTScheduling/DT_Spawn/test.cpp: + * tests/Xt_Stopwatch/client.cpp: + * tests/Xt_Stopwatch/timer.cpp: + * utils/catior/catior.cpp: + + Converted ACE_{static,dynamic,reinterpret,const}_cast macros + calls to their standard C++ counterparts. + Thu Jan 27 20:01:21 2005 Balachandran Natarajan <bala@dre.vanderbilt.edu> * tao/Messaging/Asynch_Reply_Dispatcher.cpp: @@ -40,10 +118,10 @@ Wed Jan 26 17:20:05 2005 Huang-Ming Huang <hh1@cse.wustul.edu> * orbsvcs/orbsvcs/FtRtEvent/EventChanel/IOGR_Maker.cpp * orbsvcs/orbsvcs/FtRtEvent/EventChanel/Replication_Service.cpp * orbsvcs/orbsvcs/FtRtEvent/EventChanel/FtEventServiceInterceptor - - Fixed incorrect object_group_ref_version problem. Thanks to + + Fixed incorrect object_group_ref_version problem. Thanks to Thia Chang Chao <tchangch@dso.org.sg> for reporting the problem. - + Tue Jan 25 14:15:05 2005 J.T. Conklin <jtc@acorntoolworks.com> * tao/Makefile.am: diff --git a/TAO/examples/AMH/Sink_Server/AMH_Servant.cpp b/TAO/examples/AMH/Sink_Server/AMH_Servant.cpp index 02fc48a62c4..736fff1ce2f 100644 --- a/TAO/examples/AMH/Sink_Server/AMH_Servant.cpp +++ b/TAO/examples/AMH/Sink_Server/AMH_Servant.cpp @@ -102,7 +102,7 @@ AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, delete handler; // send a no-op to the client - _tao_rh->test_method (ACE_static_cast (Test::Timestamp, 0)); + _tao_rh->test_method (static_cast<Test::Timestamp> (0)); // just in case we add code later on after this if stmt return; diff --git a/TAO/examples/AMI/FL_Callback/Progress_i.cpp b/TAO/examples/AMI/FL_Callback/Progress_i.cpp index 2712dc47ff5..91e6c571118 100644 --- a/TAO/examples/AMI/FL_Callback/Progress_i.cpp +++ b/TAO/examples/AMI/FL_Callback/Progress_i.cpp @@ -102,11 +102,11 @@ Progress_Window::sent_request (CORBA::Long id) if (id < 0 || id >= this->n_peers_) return; Fl_Slider *obj = - ACE_dynamic_cast (Fl_Slider*,this->request_progress_[id]); + dynamic_cast<Fl_Slider*> (this->request_progress_[id]); obj->value (obj->value () + 1); obj->redraw (); - int i = ACE_static_cast(int,obj->value ()); + int i = static_cast<int> (obj->value ()); if (i % 100 == 0) ACE_DEBUG ((LM_DEBUG, "Progress (%t) - recv reply %d\n", i)); } @@ -117,11 +117,11 @@ Progress_Window::recv_reply (CORBA::Long id) if (id < 0 || id >= this->n_peers_) return; Fl_Slider *obj = - ACE_dynamic_cast (Fl_Slider*,this->reply_progress_[id]); + dynamic_cast<Fl_Slider*> (this->reply_progress_[id]); obj->value (obj->value () + 1); obj->redraw (); - int i = ACE_static_cast(int,obj->value ()); + int i = static_cast<int> (obj->value ()); if (i % 100 == 0) ACE_DEBUG ((LM_DEBUG, "Progress (%t) - recv reply %d\n", i)); } @@ -141,7 +141,7 @@ void Progress_Window::start_callback (Fl_Widget* /* widget */, void *data) { - Progress_Window *self = ACE_static_cast (Progress_Window*, data); + Progress_Window *self = static_cast<Progress_Window*> (data); self->start (); } diff --git a/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp b/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp index 60a0519cbd0..c5ae00a4544 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp @@ -47,7 +47,7 @@ Content_Iterator_i::next_chunk (CORBA::ULong offset, ACE_TEXT ("%p\n"), ACE_TEXT ("Error during lseek")), 0); - else if (offset != ACE_static_cast (CORBA::ULong, real_offset)) + else if (offset != static_cast<CORBA::ULong> (real_offset)) { // Didn't get the desired offset. diff --git a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp index d91be62615e..6c7fe5c1e3a 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp @@ -110,18 +110,17 @@ Iterator_Factory_i::content_type (const char *filename, // Handle the case where multiple periods exists in the filename, // e.g.: foo.bar.ps char *extension = 0; - for (char * tmp = ACE_const_cast (char *, filename); + for (char * tmp = const_cast<char *> (filename); tmp != 0 && tmp != tmp + len; ) { - tmp = ACE_const_cast (char *, - ACE_OS::strchr (tmp, '.')); + tmp = const_cast<char *> (ACE_OS::strchr (tmp, '.')); if (tmp != 0) extension = ++tmp; // Skip over the '.' } if (extension == 0) - extension = ACE_const_cast (char *, filename); // No extension! + extension = const_cast<char *> (filename); // No extension! if (ACE_OS::strcasecmp (extension, "htm") == 0 || ACE_OS::strcasecmp (extension, "html") == 0) diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp index 7ace45deb14..29e506d0c41 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp @@ -119,19 +119,18 @@ Push_Iterator_Factory_i::content_type (const char *filename, // Handle the case where multiple periods exists in the filename, // e.g.: foo.bar.ps char * extension = 0; - for (char * tmp = ACE_const_cast (char *, filename); + for (char * tmp = const_cast<char *> (filename); tmp != 0 && tmp != tmp + len; ) { - tmp = ACE_const_cast (char *, - ACE_OS::strchr (tmp, '.')); + tmp = const_cast<char *> (ACE_OS::strchr (tmp, '.')); if (tmp != 0) extension = ++tmp; // Skip over the '.' } if (extension == 0) - extension = ACE_const_cast (char *, filename); // No extension! + extension = const_cast<char *> (filename); // No extension! if (ACE_OS::strcasecmp (extension, "htm") == 0 || ACE_OS::strcasecmp (extension, "html") == 0) diff --git a/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp b/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp index 5fef64be5a2..669ead91a3b 100644 --- a/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp +++ b/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp @@ -57,7 +57,7 @@ Content_Iterator_i::next_chunk (CORBA::ULong offset, ACE_TEXT ("Error during lseek")), 0); } - else if (offset != ACE_static_cast (CORBA::ULong, real_offset)) + else if (offset != static_cast<CORBA::ULong> (real_offset)) { // Didn't get the desired offset. diff --git a/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp b/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp index 1560bed9d78..d7cebf1b26f 100644 --- a/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp +++ b/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp @@ -121,19 +121,18 @@ Iterator_Factory_i::content_type (const char *filename, // Handle the case where multiple periods exists in the filename, // e.g.: foo.bar.ps char * extension = 0; - for (char * tmp = ACE_const_cast (char *, filename); + for (char * tmp = const_cast<char *> (filename); tmp != 0 && tmp != tmp + len; ) { - tmp = ACE_const_cast (char *, - ACE_OS::strchr (tmp, '.')); + tmp = const_cast<char *> (ACE_OS::strchr (tmp, '.')); if (tmp != 0) extension = ++tmp; // Skip over the '.' } if (extension == 0) - extension = ACE_const_cast (char *, filename); // No extension! + extension = const_cast<char *> (filename); // No extension! if (ACE_OS::strcasecmp (extension, "htm") == 0 || ACE_OS::strcasecmp (extension, "html") == 0) diff --git a/TAO/examples/Event_Comm/Event_Comm_i.cpp b/TAO/examples/Event_Comm/Event_Comm_i.cpp index 49db2ba7bda..033d1f0d8ae 100644 --- a/TAO/examples/Event_Comm/Event_Comm_i.cpp +++ b/TAO/examples/Event_Comm/Event_Comm_i.cpp @@ -350,7 +350,7 @@ Notifier_i::push (const Event_Comm::Event &event ACE_ASSERT (consumer_ref != 0); #if defined (ACE_HAS_REGEX) - char *regexp = ACE_const_cast (char *, me->int_id_->regexp ()); + char *regexp = const_cast<char *> (me->int_id_->regexp ()); ACE_ASSERT (regexp); const char *criteria = me->int_id_->criteria (); diff --git a/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp index 782346a1b7e..2b6f34dfc15 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp @@ -323,9 +323,9 @@ EDF_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr ri sc_qos_as_any <<= sc_qos; sc.context_data = - ACE_reinterpret_cast(IOP::ServiceContext:: - _tao_seq_CORBA_Octet_ &, - *codec_->encode (sc_qos_as_any)); + ACE_reinterpret_cast<IOP::ServiceContext::_tao_seq_CORBA_Octet_ &> ( + *codec_->encode (sc_qos_as_any) + ); #ifdef KOKYU_DSRT_LOGGING ACE_DEBUG ((LM_DEBUG, diff --git a/TAO/examples/Kokyu_dsrt_schedulers/EDF_SchedulingC.cpp b/TAO/examples/Kokyu_dsrt_schedulers/EDF_SchedulingC.cpp index b9640a4c8c7..fa3a5e71254 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/EDF_SchedulingC.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/EDF_SchedulingC.cpp @@ -155,7 +155,7 @@ EDF_Scheduling::SchedulingParameter::_tao_any_destructor ( ) { SchedulingParameter *_tao_tmp_pointer = - ACE_static_cast (SchedulingParameter *, _tao_void_pointer); + static_cast<SchedulingParameter *> (_tao_void_pointer); delete _tao_tmp_pointer; } @@ -215,7 +215,7 @@ void EDF_Scheduling::SchedulingParameterPolicy::_tao_any_destructor (void *_tao_void_pointer) { SchedulingParameterPolicy *_tao_tmp_pointer = - ACE_static_cast (SchedulingParameterPolicy *, _tao_void_pointer); + static_cast<SchedulingParameterPolicy *> (_tao_void_pointer); CORBA::release (_tao_tmp_pointer); } @@ -391,7 +391,7 @@ void EDF_Scheduling::Scheduler::_tao_any_destructor (void *_tao_void_pointer) { Scheduler *_tao_tmp_pointer = - ACE_static_cast (Scheduler *, _tao_void_pointer); + static_cast<Scheduler *> (_tao_void_pointer); CORBA::release (_tao_tmp_pointer); } @@ -540,9 +540,7 @@ CORBA::Boolean operator>>= ( EDF_Scheduling::SchedulingParameter *&_tao_elem ) { - return _tao_any >>= ACE_const_cast ( - const EDF_Scheduling::SchedulingParameter *&, - _tao_elem + return _tao_any >>= const_cast<const EDF_Scheduling::SchedulingParameter *&> (_tao_elem ); } diff --git a/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp index be451cd3e18..92039e6c7b1 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp @@ -334,8 +334,7 @@ Fixed_Priority_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_p sc_qos_as_any <<= sc_qos; sc.context_data = - ACE_reinterpret_cast (CORBA::OctetSeq &, - *codec_->encode (sc_qos_as_any)); + reinterpret_cast<CORBA::OctetSeq &> (*codec_->encode (sc_qos_as_any)); #ifdef KOKYU_DSRT_LOGGING ACE_DEBUG ((LM_DEBUG, @@ -514,8 +513,7 @@ Fixed_Priority_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr CORBA::Any sc_qos_as_any; sc_qos_as_any <<= sc_qos; - sc.context_data = ACE_reinterpret_cast(CORBA::OctetSeq &, - *codec_->encode (sc_qos_as_any)); + sc.context_data = reinterpret_cast<CORBA::OctetSeq &> (*codec_->encode (sc_qos_as_any)); // Add this context to the service context list. ri->add_reply_service_context (sc, 1 ACE_ENV_ARG_PARAMETER); diff --git a/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp index dbc2f6262f0..c29054aa439 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp @@ -317,8 +317,7 @@ MIF_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr ri sc_qos_as_any <<= sc_qos; sc.context_data = - ACE_reinterpret_cast(CORBA::OctetSeq &, - *codec_->encode (sc_qos_as_any)); + reinterpret_cast<CORBA::OctetSeq &> (*codec_->encode (sc_qos_as_any)); #ifdef KOKYU_DSRT_LOGGING ACE_DEBUG ((LM_DEBUG, @@ -493,8 +492,7 @@ MIF_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr ri CORBA::Any sc_qos_as_any; sc_qos_as_any <<= sc_qos; - sc.context_data = ACE_reinterpret_cast(CORBA::OctetSeq &, - *codec_->encode (sc_qos_as_any)); + sc.context_data = reinterpret_cast<CORBA::OctetSeq &> (*codec_->encode (sc_qos_as_any)); // Add this context to the service context list. ri->add_reply_service_context (sc, 1 ACE_ENV_ARG_PARAMETER); diff --git a/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp index c93fe444a89..c70de4a578b 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp @@ -332,8 +332,7 @@ MUF_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr ri sc_qos_as_any <<= sc_qos; sc.context_data = - ACE_reinterpret_cast(CORBA::OctetSeq &, - *codec_->encode (sc_qos_as_any)); + reinterpret_cast<CORBA::OctetSeq &> (*codec_->encode (sc_qos_as_any)); #ifdef KOKYU_DSRT_LOGGING ACE_DEBUG ((LM_DEBUG, @@ -540,8 +539,7 @@ MUF_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr ri CORBA::Any sc_qos_as_any; sc_qos_as_any <<= sc_qos; - sc.context_data = ACE_reinterpret_cast(CORBA::OctetSeq &, - *codec_->encode (sc_qos_as_any)); + sc.context_data = reinterpret_cast<CORBA::OctetSeq &> (*codec_->encode (sc_qos_as_any)); // Add this context to the service context list. ri->add_reply_service_context (sc, 1 ACE_ENV_ARG_PARAMETER); diff --git a/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp b/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp index 3bc9e1c72c4..fb44c1ec6f0 100755 --- a/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp +++ b/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp @@ -93,12 +93,12 @@ Object_Group_Factory_i::unbind_round_robin (const char * id char *int_id = 0; // Throw an exception if not found in the HASH MAP - if (this->rr_groups_->find (ACE_const_cast (char *, id), + if (this->rr_groups_->find (const_cast<char *> (id), this->mem_pool_) < 0) ACE_THROW (Load_Balancer::no_such_group ()); // Unbind the entry - this->rr_groups_->unbind (ACE_const_cast (char *, id), + this->rr_groups_->unbind (const_cast<char *> (id), int_id, this->mem_pool_); @@ -166,12 +166,12 @@ Object_Group_Factory_i::unbind_random (const char * id char *int_id = 0; // Throw an exception if not found in the HASH MAP - if (this->random_groups_->find (ACE_const_cast (char *, id), + if (this->random_groups_->find (const_cast<char *> (id), this->mem_pool_) < 0) ACE_THROW (Load_Balancer::no_such_group ()); // Unbind the entry - this->random_groups_->unbind (ACE_const_cast (char *, id), + this->random_groups_->unbind (const_cast<char *> (id), int_id, this->mem_pool_); @@ -208,14 +208,14 @@ Object_Group_Factory_i::make_group (int random, if (random) { - if (this->random_groups_->find (ACE_const_cast (char *,id), + if (this->random_groups_->find (const_cast<char *> (id), this->mem_pool_) == 0) ACE_THROW_RETURN (Load_Balancer::duplicate_group (), Load_Balancer::Object_Group::_nil ()); } else { - if (this->rr_groups_->find (ACE_const_cast (char *,id), + if (this->rr_groups_->find (const_cast<char *> (id), this->mem_pool_) == 0) ACE_THROW_RETURN (Load_Balancer::duplicate_group (), Load_Balancer::Object_Group::_nil ()); @@ -364,10 +364,10 @@ Object_Group_Factory_i::resolve (const char * id char *ior = 0; - if (rr_groups_->find (ACE_const_cast (char *, id), + if (rr_groups_->find (const_cast<char *> (id), ior, this->mem_pool_) == -1 - && random_groups_->find (ACE_const_cast (char *, id), + && random_groups_->find (const_cast<char *> (id), ior, this->mem_pool_) == -1) ACE_THROW_RETURN (Load_Balancer::no_such_group (), @@ -631,8 +631,7 @@ Object_Group_i::bind (const Load_Balancer::Member & member } // Check whether the element already exists.. - if (this->members_->find (ACE_const_cast (char *, - (const char *) member.id), + if (this->members_->find (const_cast<char *> ((const char *) member.id), this->allocator_) == 0) ACE_THROW (Load_Balancer::duplicate_member ()); @@ -718,12 +717,12 @@ Object_Group_i::unbind (const char * id } } // Check to make sure we have it. - if (this->members_->find (ACE_const_cast (char *, id), + if (this->members_->find (const_cast<char *> (id), this->allocator_) == -1) ACE_THROW (Load_Balancer::no_such_member ()); // Remove all entries for this member. - this->members_->unbind (ACE_const_cast(char *, id), + this->members_->unbind (const_cast<char *> (id), this->allocator_); if (this->member_id_list_ == 0) @@ -760,8 +759,7 @@ Object_Group_i::resolve_with_id (const char * id CORBA::String_var ior; - if (this->members_->find (ACE_const_cast (char *, - id), + if (this->members_->find (const_cast<char *> (id), ior.out (), this->allocator_) == -1) ACE_THROW_RETURN (Load_Balancer::no_such_member (), 0); @@ -969,12 +967,12 @@ RR_Object_Group::unbind (const char *id } // Check to make sure we have it. - if (this->members_->find (ACE_const_cast (char *,id), + if (this->members_->find (const_cast<char *> (id), this->allocator_) == -1) ACE_THROW (Load_Balancer::no_such_member ()); // Remove all entries for this member. - this->members_->unbind (ACE_const_cast (char *, id), + this->members_->unbind (const_cast<char *> (id), this->allocator_); // As we remove the id from the <member_id_list>, we note the diff --git a/TAO/examples/Logging/Logger_i.cpp b/TAO/examples/Logging/Logger_i.cpp index 6881006c3f1..0c9b24e87fe 100644 --- a/TAO/examples/Logging/Logger_i.cpp +++ b/TAO/examples/Logging/Logger_i.cpp @@ -85,10 +85,9 @@ Logger_i::priority_conversion (Logger::Log_Priority priority) return LM_MAX; else { - int pval = ACE_static_cast (int, priority); + int pval = static_cast<int> (priority); - return ACE_static_cast (ACE_Log_Priority, - 1 << pval); + return static_cast<ACE_Log_Priority> (1 << pval); // (1 << pval) == 2^pval. <ACE_Log_Priority> are powers of 2. } } @@ -169,9 +168,8 @@ Logger_i::logv (const Logger::Log_Record &log_rec, // The constructor for <ACE_INET_Addr> requires a port number, which // is not relevant in this context, so we give it 0. - ACE_INET_Addr addy (ACE_static_cast (u_short, 0), - ACE_static_cast (ACE_UINT32, - addr)); + ACE_INET_Addr addy (static_cast<u_short> (0), + static_cast<ACE_UINT32> (addr)); // Create a buffer and fill it with the host name of the logger ACE_TCHAR namebuf[MAXHOSTNAMELEN + 1]; diff --git a/TAO/examples/Logging/Logging_Service_i.cpp b/TAO/examples/Logging/Logging_Service_i.cpp index 36a50a7287a..0f1f549b9da 100644 --- a/TAO/examples/Logging/Logging_Service_i.cpp +++ b/TAO/examples/Logging/Logging_Service_i.cpp @@ -6,7 +6,7 @@ ACE_RCSID(Logging_Service, Logging_Service_i, "$Id$") Logger_Server::Logger_Server (void) - :service_name_ (ACE_const_cast (char *,"LoggingService")) + :service_name_ (const_cast<char *> ("LoggingService")) { // Do nothing } diff --git a/TAO/examples/Logging/Logging_Test_i.cpp b/TAO/examples/Logging/Logging_Test_i.cpp index d04a9f713e7..f82bba200c4 100644 --- a/TAO/examples/Logging/Logging_Test_i.cpp +++ b/TAO/examples/Logging/Logging_Test_i.cpp @@ -346,8 +346,7 @@ Logger_Client::init_record (Logger::Log_Record &newrec, ACE_OS::hostname (name, MAXHOSTNAMELEN); hostent *he = ACE_OS::gethostbyname (name); newrec.host_addr = - (ACE_reinterpret_cast (in_addr *, - he->h_addr_list[0])->s_addr); + (reinterpret_cast<in_addr *> (he->h_addr_list[0])->s_addr); } void diff --git a/TAO/examples/OBV/Typed_Events/Client_i.cpp b/TAO/examples/OBV/Typed_Events/Client_i.cpp index 9d977b2cb59..de35eb52028 100644 --- a/TAO/examples/OBV/Typed_Events/Client_i.cpp +++ b/TAO/examples/OBV/Typed_Events/Client_i.cpp @@ -40,8 +40,7 @@ Checkpoint_Client_i::run (const char *name, ACE_DEBUG ((LM_DEBUG, "Send some random events:\n")); CORBA::Float temperature = random_number (29, 34); - Temperature_var t_e (ACE_static_cast(Temperature*, - new Temperature_impl (temperature))); + Temperature_var t_e (static_cast<Temperature*> (new Temperature_impl (temperature))); t_e->origin_id_ (KITCHEN); t_e->do_print (); checkpoint->put_event (t_e ACE_ENV_ARG_PARAMETER); @@ -57,8 +56,7 @@ Checkpoint_Client_i::run (const char *name, Point point = { random_number (0,4), random_number (0,4), random_number (0,4) }; - Position_var p_e (ACE_static_cast(Position*, - new Position_impl (point))); + Position_var p_e (static_cast<Position*> (new Position_impl (point))); p_e->origin_id_ (JONAS); p_e->do_print (); checkpoint->put_event (p_e ACE_ENV_ARG_PARAMETER); @@ -68,8 +66,7 @@ Checkpoint_Client_i::run (const char *name, int urgent = (random_number (0,2) > 1) ? 1 : 0; const char *a_text = (random_number (0,2) > 1) ? "Coffee is cold." : "I want pasta."; - Log_Msg_var l_e (ACE_static_cast(Log_Msg*, - new Log_Msg_impl (urgent, a_text))); + Log_Msg_var l_e (static_cast<Log_Msg*> (new Log_Msg_impl (urgent, a_text))); l_e->origin_id_ (JONAS); l_e->do_print (); checkpoint->put_event (l_e ACE_ENV_ARG_PARAMETER); @@ -119,7 +116,7 @@ Checkpoint_Client_i::~Checkpoint_Client_i (void) CORBA::Float random_number (double min, double max) { double range = max - min; - return ACE_static_cast (CORBA::Float, (min + (range * ACE_OS::rand () / (RAND_MAX + 1.0)))); + return static_cast<CORBA::Float> ((min + (range * ACE_OS::rand () / (RAND_MAX + 1.0)))); } diff --git a/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp b/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp index 709d8c3f295..f6c06328d45 100644 --- a/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp +++ b/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp @@ -392,8 +392,7 @@ Temperature_Criterion_impl:: Temperature_Criterion_impl (CORBA::ULong origin_id, CORBA::Float temp) { this->origin_id_ (origin_id); - Temperature_var tmp (ACE_static_cast(Temperature*, - new Temperature_impl (temp))); + Temperature_var tmp (static_cast<Temperature*> (new Temperature_impl (temp))); this->meltingpoint (tmp.in ()); } @@ -567,7 +566,7 @@ Criterion_List_impl::store_criterion (Criterion *c { if (!my_list ()) { - Event_List_var ev(ACE_static_cast(Event_List*,new Event_List_impl)); + Event_List_var ev(static_cast<Event_List*> (new Event_List_impl)); my_list (ev); } diff --git a/TAO/examples/OBV/Typed_Events/Server_i.cpp b/TAO/examples/OBV/Typed_Events/Server_i.cpp index ab79f8576e0..0c610fb3b12 100644 --- a/TAO/examples/OBV/Typed_Events/Server_i.cpp +++ b/TAO/examples/OBV/Typed_Events/Server_i.cpp @@ -43,32 +43,26 @@ Checkpoint_i::orb (CORBA::ORB_ptr o) // The conditions which will raise an alarm follow. // The first parameter is the origin_id and the second the temperature. - Temperature_Criterion_var tc (ACE_static_cast(Temperature_Criterion*, - new Temperature_Criterion_impl (KITCHEN, 32))); + Temperature_Criterion_var tc (static_cast<Temperature_Criterion*> (new Temperature_Criterion_impl (KITCHEN, 32))); criterions->store_criterion (tc.in ()); - tc = ACE_static_cast(Temperature_Criterion*, - new Temperature_Criterion_impl (BATHROOM, 27)); + tc = static_cast<Temperature_Criterion*> (new Temperature_Criterion_impl (BATHROOM, 27)); criterions->store_criterion (tc.in ()); // Alarm if little Jonas is not in the child's room Point leftbottom = {1, 2, 3}; - Position_var leftbottom_v (ACE_static_cast(Position*, - new Position_impl (leftbottom))); + Position_var leftbottom_v (static_cast<Position*> (new Position_impl (leftbottom))); Point topright = {2, 3, 4}; - Position_var topright_v (ACE_static_cast(Position*, - new Position_impl (topright))); - Position_Criterion_var pc (ACE_static_cast(Position_Criterion*, - new Position_Criterion_impl (JONAS, + Position_var topright_v (static_cast<Position*> (new Position_impl (topright))); + Position_Criterion_var pc (static_cast<Position_Criterion*> (new Position_Criterion_impl (JONAS, leftbottom_v, topright_v))); criterions->store_criterion (pc.in ()); // Generic criterion matches every urgent massage - Log_Msg_Criterion_var lc (ACE_static_cast(Log_Msg_Criterion*, - new Log_Msg_Criterion_impl)); + Log_Msg_Criterion_var lc (static_cast<Log_Msg_Criterion*> (new Log_Msg_Criterion_impl)); // Null id flags to handle every Log_Msg lc->origin_id_ (0); criterions->store_criterion (lc.in ()); diff --git a/TAO/examples/POA/DSI/Database_i.cpp b/TAO/examples/POA/DSI/Database_i.cpp index 3fe0a108336..d26da17347e 100644 --- a/TAO/examples/POA/DSI/Database_i.cpp +++ b/TAO/examples/POA/DSI/Database_i.cpp @@ -243,8 +243,7 @@ DatabaseImpl::Agent::find_entry (const char *key, if (DATABASE::instance ()->find (key, temp) == 0) { Employee *employee = - ACE_reinterpret_cast (Employee *, - temp); + reinterpret_cast<Employee *> (temp); ACE_DEBUG ((LM_DEBUG, "Employee with key = %s found: name = %s and id = %d\n", key, @@ -296,8 +295,7 @@ DatabaseImpl::Agent::destroy_entry (const char *key, if (DATABASE::instance ()->unbind (key, temp) == 0) { Employee *employee = - ACE_reinterpret_cast (Employee *, - temp); + reinterpret_cast<Employee *> (temp); ACE_DEBUG ((LM_DEBUG, "Employee with key = %s will be removed from the database: " "name = %s and id = %d \n", diff --git a/TAO/examples/POA/DSI/server.cpp b/TAO/examples/POA/DSI/server.cpp index 407adc032a3..56254659fef 100644 --- a/TAO/examples/POA/DSI/server.cpp +++ b/TAO/examples/POA/DSI/server.cpp @@ -65,7 +65,7 @@ write_iors_to_file (const char *first_ior) "%s", first_ior); if (result < 0 || - ACE_static_cast (size_t, result) != ACE_OS::strlen (first_ior)) + static_cast<size_t> (result) != ACE_OS::strlen (first_ior)) ACE_ERROR_RETURN ((LM_ERROR, "ACE_OS::fprintf failed while writing %s to %s\n", first_ior, diff --git a/TAO/examples/POA/Generic_Servant/client.cpp b/TAO/examples/POA/Generic_Servant/client.cpp index 1959aaac34e..901c06ce028 100644 --- a/TAO/examples/POA/Generic_Servant/client.cpp +++ b/TAO/examples/POA/Generic_Servant/client.cpp @@ -40,7 +40,7 @@ parse_args (int argc, char **argv) break; case 'T': - timeout = ACE_static_cast (CORBA::ULong, ::atoi (get_opts.opt_arg ())); + timeout = static_cast<CORBA::ULong> (::atoi (get_opts.opt_arg ())); break; case 'x': diff --git a/TAO/examples/POA/Loader/Servant_Activator.cpp b/TAO/examples/POA/Loader/Servant_Activator.cpp index eef07a7ec2e..72bf969c798 100644 --- a/TAO/examples/POA/Loader/Servant_Activator.cpp +++ b/TAO/examples/POA/Loader/Servant_Activator.cpp @@ -47,17 +47,17 @@ ServantActivator::ServantActivator (CORBA::ORB_ptr orb, // Cannot go from void* to function pointer directly. Cast the void* // to long first. void *symbol = this->dll_.symbol (factory_function); - long function = ACE_reinterpret_cast (long, symbol); + long function = reinterpret_cast<long> (symbol); servant_supplier_ = - ACE_reinterpret_cast (SERVANT_FACTORY, function); + reinterpret_cast<SERVANT_FACTORY> (function); // Obtain the symbol for the function which will destroy the // servant. symbol = this->dll_.symbol (garbage_collection_function); - function = ACE_reinterpret_cast (long, symbol); + function = reinterpret_cast<long> (symbol); servant_garbage_collector_ = - ACE_reinterpret_cast (SERVANT_GARBAGE_COLLECTOR, function); + reinterpret_cast<SERVANT_GARBAGE_COLLECTOR> (function); } // This method associates an servant with the ObjectID. diff --git a/TAO/examples/POA/Loader/Servant_Locator.cpp b/TAO/examples/POA/Loader/Servant_Locator.cpp index 30abe0e702c..3850c8743ce 100644 --- a/TAO/examples/POA/Loader/Servant_Locator.cpp +++ b/TAO/examples/POA/Loader/Servant_Locator.cpp @@ -49,18 +49,18 @@ ServantLocator::ServantLocator (CORBA::ORB_ptr orb, // to long first. // void *symbol = this->dll_.symbol (factory_function); - long function = ACE_reinterpret_cast (long, symbol); + long function = reinterpret_cast<long> (symbol); servant_supplier_ = - ACE_reinterpret_cast (SERVANT_FACTORY, function); + reinterpret_cast<SERVANT_FACTORY> (function); // Obtain the symbol for the function which will destroy the // servant. symbol = this->dll_.symbol (garbage_collection_function); - function = ACE_reinterpret_cast (long, symbol); + function = reinterpret_cast<long> (symbol); servant_garbage_collector_ = - ACE_reinterpret_cast (SERVANT_GARBAGE_COLLECTOR, function); + reinterpret_cast<SERVANT_GARBAGE_COLLECTOR> (function); } // This method associates an servant with the ObjectID. @@ -106,8 +106,7 @@ ServantLocator::postinvoke (const PortableServer::ObjectId &oid, { // Check the passed servant with the cookie. PortableServer::Servant my_servant = - ACE_reinterpret_cast (PortableServer::Servant, - cookie); + reinterpret_cast<PortableServer::Servant> (cookie); ACE_ASSERT (servant == my_servant); diff --git a/TAO/examples/POA/Loader/Server_Manager.cpp b/TAO/examples/POA/Loader/Server_Manager.cpp index 295234488f7..051ef1b2124 100644 --- a/TAO/examples/POA/Loader/Server_Manager.cpp +++ b/TAO/examples/POA/Loader/Server_Manager.cpp @@ -82,7 +82,7 @@ Server_i::write_iors_to_file (const char *first_ior, "%s", first_ior); if (result <= 0 - || ACE_static_cast (size_t,result) != ACE_OS::strlen (first_ior)) + || static_cast<size_t> (result) != ACE_OS::strlen (first_ior)) ACE_ERROR_RETURN ((LM_ERROR, "ACE_OS::fprintf failed while writing %s to %s\n", first_ior, @@ -93,7 +93,7 @@ Server_i::write_iors_to_file (const char *first_ior, "%s", second_ior); if (result <= 0 - || ACE_static_cast (size_t,result) != ACE_OS::strlen (second_ior)) + || static_cast<size_t> (result) != ACE_OS::strlen (second_ior)) ACE_ERROR_RETURN ((LM_ERROR, "ACE_OS::fprintf failed while writing %s to %s\n", second_ior, diff --git a/TAO/examples/POA/On_Demand_Activation/server.cpp b/TAO/examples/POA/On_Demand_Activation/server.cpp index 5f23837b0ca..c5aa44a172f 100644 --- a/TAO/examples/POA/On_Demand_Activation/server.cpp +++ b/TAO/examples/POA/On_Demand_Activation/server.cpp @@ -75,7 +75,7 @@ write_iors_to_file (const char *first_ior, "%s", first_ior); if (result <= 0 - || ACE_static_cast(size_t,result) != ACE_OS::strlen (first_ior)) + || static_cast<size_t> (result) != ACE_OS::strlen (first_ior)) ACE_ERROR_RETURN ((LM_ERROR, "ACE_OS::fprintf failed while writing %s to %s\n", first_ior, @@ -86,7 +86,7 @@ write_iors_to_file (const char *first_ior, "%s", second_ior); if (result <= 0 - || ACE_static_cast(size_t,result) != ACE_OS::strlen (second_ior)) + || static_cast<size_t> (result) != ACE_OS::strlen (second_ior)) ACE_ERROR_RETURN ((LM_ERROR, "ACE_OS::fprintf failed while writing %s to %s\n", second_ior, diff --git a/TAO/examples/POA/On_Demand_Loading/Servant_Locator.cpp b/TAO/examples/POA/On_Demand_Loading/Servant_Locator.cpp index be4a1893bea..9e83dfa84b3 100644 --- a/TAO/examples/POA/On_Demand_Loading/Servant_Locator.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Servant_Locator.cpp @@ -81,8 +81,7 @@ ServantLocator_i::postinvoke (const PortableServer::ObjectId &oid, // Check the passed servant with the cookie. PortableServer::Servant my_servant = - ACE_reinterpret_cast (PortableServer::Servant, - cookie); + reinterpret_cast<PortableServer::Servant> (cookie); ACE_ASSERT (servant == my_servant); diff --git a/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp b/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp index cf52475b7fd..b62f8507cb8 100644 --- a/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp @@ -81,10 +81,10 @@ ServantManager_i::obtain_servant (const char *str, // Cannot go from void* to function pointer directly. Cast the void* // to long first. void *symbol = dll->symbol (create_symbol_.c_str ()); - long function = ACE_reinterpret_cast (long, symbol); + long function = reinterpret_cast<long> (symbol); SERVANT_FACTORY servant_creator = - ACE_reinterpret_cast (SERVANT_FACTORY, function); + reinterpret_cast<SERVANT_FACTORY> (function); // Checking whether it is possible to create the servant. if (servant_creator == 0) diff --git a/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp b/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp index c81c7b1bf1f..c1d6f600d34 100644 --- a/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp @@ -86,7 +86,7 @@ Server_i::write_iors_to_file (const char *first_ior, "%s", first_ior); if (result <= 0 - || ACE_static_cast (size_t,result) != ACE_OS::strlen (first_ior)) + || static_cast<size_t> (result) != ACE_OS::strlen (first_ior)) ACE_ERROR_RETURN ((LM_ERROR, "ACE_OS::fprintf failed while writing %s to %s\n", first_ior, @@ -97,7 +97,7 @@ Server_i::write_iors_to_file (const char *first_ior, "%s", second_ior); if (result <= 0 - || ACE_static_cast (size_t,result) != ACE_OS::strlen (second_ior)) + || static_cast<size_t> (result) != ACE_OS::strlen (second_ior)) ACE_ERROR_RETURN ((LM_ERROR, "ACE_OS::fprintf failed while writing %s to %s\n", second_ior, diff --git a/TAO/examples/Persistent_Grid/Grid_i.cpp b/TAO/examples/Persistent_Grid/Grid_i.cpp index 404b70192fb..fcec899cc6e 100644 --- a/TAO/examples/Persistent_Grid/Grid_i.cpp +++ b/TAO/examples/Persistent_Grid/Grid_i.cpp @@ -28,8 +28,7 @@ Grid_i::Grid_i (CORBA::Short x, { // Allocate memory for the matrix. ACE_ALLOCATOR (array_, - ACE_static_cast (CORBA::Long **, - mem_pool->malloc (y * sizeof (CORBA::Long *)))); + static_cast<CORBA::Long **> (mem_pool->malloc (y * sizeof (CORBA::Long *)))); //array_ = (CORBA::Long **) mem_pool->malloc (y * sizeof (CORBA::Long *)); if (array_ != 0) @@ -37,8 +36,7 @@ Grid_i::Grid_i (CORBA::Short x, for (int ctr = 0; ctr < y; ctr++) { ACE_ALLOCATOR (array_[ctr], - ACE_static_cast (CORBA::Long *, - mem_pool->malloc (x * + static_cast<CORBA::Long *> (mem_pool->malloc (x * sizeof (CORBA::Long )))); //array_[ctr] = (CORBA::Long *)mem_pool->malloc (x * diff --git a/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp b/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp index c5f2e57cda8..882b5078c5d 100644 --- a/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp +++ b/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp @@ -35,7 +35,7 @@ UDP_Client_i::svc (void) ACE_TCHAR pid[256]; ACE_OS::sprintf (pid, "%u", - ACE_static_cast (u_int, ACE_OS::getpid ())); + static_cast<u_int> (ACE_OS::getpid ())); client_name += "_"; client_name += pid; diff --git a/TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp b/TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp index dc60b8aeebd..77db4ccca0e 100644 --- a/TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp +++ b/TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp @@ -38,7 +38,7 @@ UDP_PerformanceClient::svc () ACE_TCHAR pid[256]; ACE_OS::sprintf (pid, "%u", - ACE_static_cast (u_int, ACE_OS::getpid ())); + static_cast<u_int> (ACE_OS::getpid ())); client_name += "_"; client_name += pid; diff --git a/TAO/examples/RTCORBA/Activity/Task_Stats.cpp b/TAO/examples/RTCORBA/Activity/Task_Stats.cpp index d07ec83e0ba..864cd5b8465 100644 --- a/TAO/examples/RTCORBA/Activity/Task_Stats.cpp +++ b/TAO/examples/RTCORBA/Activity/Task_Stats.cpp @@ -111,8 +111,7 @@ Task_Stats::dump_latency_stats (ACE_TCHAR *out_msg, ACE_UINT32 sf) ACE_UINT64 avg = this->sum_ / this->samples_count_; ACE_UINT64 dev = #if defined ACE_LACKS_LONGLONG_T - ACE_static_cast (ACE_U_LongLong, - this->sum2_ / this->samples_count_) + static_cast<ACE_U_LongLong> (this->sum2_ / this->samples_count_) - avg * ACE_U64_TO_U32(avg); #else /* ! ACE_LACKS_LONGLONG_T */ this->sum2_ / this->samples_count_ - avg * avg; diff --git a/TAO/examples/RTScheduling/FP_SchedulingC.cpp b/TAO/examples/RTScheduling/FP_SchedulingC.cpp index 81167d4d619..7b9f98d7a82 100644 --- a/TAO/examples/RTScheduling/FP_SchedulingC.cpp +++ b/TAO/examples/RTScheduling/FP_SchedulingC.cpp @@ -102,7 +102,7 @@ void FP_Scheduling::SegmentSchedulingParameterPolicy::_tao_any_destructor (void *_tao_void_pointer) { SegmentSchedulingParameterPolicy *_tao_tmp_pointer = - ACE_static_cast (SegmentSchedulingParameterPolicy *, _tao_void_pointer); + static_cast<SegmentSchedulingParameterPolicy *> (_tao_void_pointer); CORBA::release (_tao_tmp_pointer); } @@ -277,7 +277,7 @@ void FP_Scheduling::FP_Scheduler::_tao_any_destructor (void *_tao_void_pointer) { FP_Scheduler *_tao_tmp_pointer = - ACE_static_cast (FP_Scheduler *, _tao_void_pointer); + static_cast<FP_Scheduler *> (_tao_void_pointer); CORBA::release (_tao_tmp_pointer); } diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp index 41e1a2bea06..16d15ab8021 100644 --- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp +++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp @@ -220,7 +220,7 @@ MIF_Scheduler::update_scheduling_segment (const RTScheduling::Current::IdType &/ DT* run_dt; ACE_Message_Block* msg; ready_que_.dequeue_head (msg); - run_dt = ACE_dynamic_cast (DT*, msg); + run_dt = dynamic_cast<DT*> (msg); if ((desired_priority == 100) || run_dt->msg_priority () >= (unsigned int)desired_priority) { ready_que_.enqueue_prio (new_dt); @@ -258,7 +258,7 @@ MIF_Scheduler::end_scheduling_segment (const RTScheduling::Current::IdType &guid DT* run_dt; ACE_Message_Block* msg; ready_que_.dequeue_head (msg); - run_dt = ACE_dynamic_cast (DT*, msg); + run_dt = dynamic_cast<DT*> (msg); lock_.acquire (); run_dt->resume (); lock_.release (); @@ -353,7 +353,7 @@ MIF_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_ DT* run_dt; ACE_Message_Block* msg; ready_que_.dequeue_head (msg); - run_dt = ACE_dynamic_cast (DT*, msg); + run_dt = dynamic_cast<DT*> (msg); run_dt->resume (); } lock_.release (); @@ -459,7 +459,7 @@ MIF_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr DT* run_dt; ACE_Message_Block* msg; ready_que_.dequeue_head (msg); - run_dt = ACE_dynamic_cast (DT*, msg); + run_dt = dynamic_cast<DT*> (msg); lock_.acquire (); run_dt->resume (); lock_.release (); @@ -477,7 +477,7 @@ MIF_Scheduler::send_exception (PortableInterceptor::ServerRequestInfo_ptr DT* run_dt; ACE_Message_Block* msg; ready_que_.dequeue_head (msg); - run_dt = ACE_dynamic_cast (DT*, msg); + run_dt = dynamic_cast<DT*> (msg); lock_.acquire (); run_dt->resume (); lock_.release (); @@ -511,7 +511,7 @@ MIF_Scheduler::send_other (PortableInterceptor::ServerRequestInfo_ptr DT* run_dt; ACE_Message_Block* msg; ready_que_.dequeue_head (msg); - run_dt = ACE_dynamic_cast (DT*, msg); + run_dt = dynamic_cast<DT*> (msg); lock_.acquire (); run_dt->resume (); lock_.release (); diff --git a/TAO/examples/RTScheduling/MIF_SchedulingC.cpp b/TAO/examples/RTScheduling/MIF_SchedulingC.cpp index 2e9d20ec627..cd7973138fe 100644 --- a/TAO/examples/RTScheduling/MIF_SchedulingC.cpp +++ b/TAO/examples/RTScheduling/MIF_SchedulingC.cpp @@ -102,7 +102,7 @@ void MIF_Scheduling::SegmentSchedulingParameterPolicy::_tao_any_destructor (void *_tao_void_pointer) { SegmentSchedulingParameterPolicy *_tao_tmp_pointer = - ACE_static_cast (SegmentSchedulingParameterPolicy *, _tao_void_pointer); + static_cast<SegmentSchedulingParameterPolicy *> (_tao_void_pointer); CORBA::release (_tao_tmp_pointer); } @@ -277,7 +277,7 @@ void MIF_Scheduling::MIF_Scheduler::_tao_any_destructor (void *_tao_void_pointer) { MIF_Scheduler *_tao_tmp_pointer = - ACE_static_cast (MIF_Scheduler *, _tao_void_pointer); + static_cast<MIF_Scheduler *> (_tao_void_pointer); CORBA::release (_tao_tmp_pointer); } diff --git a/TAO/examples/Simple/Simple_util.cpp b/TAO/examples/Simple/Simple_util.cpp index e4aea7df2bc..ebbedd84389 100644 --- a/TAO/examples/Simple/Simple_util.cpp +++ b/TAO/examples/Simple/Simple_util.cpp @@ -414,7 +414,7 @@ Client<INTERFACE_OBJECT, Var>::init (const char *name, // No IOR specified. Use the Naming Service ACE_DEBUG((LM_DEBUG, "Using the Naming Service \n")); - this->name_ = ACE_const_cast (char *, name); + this->name_ = const_cast<char *> (name); int retv = this->obtain_initial_references (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (retv ==-1) diff --git a/TAO/examples/Simple/time/Time_Client_i.cpp b/TAO/examples/Simple/time/Time_Client_i.cpp index 4eb31acd0d3..48d0425974b 100644 --- a/TAO/examples/Simple/time/Time_Client_i.cpp +++ b/TAO/examples/Simple/time/Time_Client_i.cpp @@ -50,7 +50,7 @@ Time_Client_i::run (const char *name, // Use ACE_OS::ctime_r(), ctime() doesn't seem to work properly // under 64-bit solaris. ACE_TCHAR ascii_timedate[64] = ""; - ACE_OS::ctime_r (ACE_reinterpret_cast (const time_t *, &timedate), + ACE_OS::ctime_r (reinterpret_cast<const time_t *> (&timedate), ascii_timedate, 64); ACE_DEBUG ((LM_DEBUG, diff --git a/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp b/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp index dbe6c2a9ebf..2f16dd37bb5 100644 --- a/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp +++ b/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp @@ -421,18 +421,15 @@ DOVE_Supplier::connect_Supplier () this->current_connection_params_->scheduler_var_-> set (this->current_connection_params_->rt_info_, - ACE_static_cast (RtecScheduler::Criticality_t, - this->current_connection_params_->pod_rt_info_.criticality), + static_cast<RtecScheduler::Criticality_t> (this->current_connection_params_->pod_rt_info_.criticality), this->current_connection_params_->pod_rt_info_.worst_case_execution_time, this->current_connection_params_->pod_rt_info_.typical_execution_time, this->current_connection_params_->pod_rt_info_.cached_execution_time, this->current_connection_params_->pod_rt_info_.period, - ACE_static_cast (RtecScheduler::Importance_t, - this->current_connection_params_->pod_rt_info_.importance), + static_cast<RtecScheduler::Importance_t> (this->current_connection_params_->pod_rt_info_.importance), this->current_connection_params_->pod_rt_info_.quantum, this->current_connection_params_->pod_rt_info_.threads, - ACE_static_cast (RtecScheduler::Info_Type_t, - this->current_connection_params_->pod_rt_info_.info_type) + static_cast<RtecScheduler::Info_Type_t> (this->current_connection_params_->pod_rt_info_.info_type) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp b/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp index d3f8aae7059..e95c8c82581 100644 --- a/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp +++ b/TAO/examples/Simulator/Event_Supplier/DualEC_Sup.cpp @@ -321,7 +321,7 @@ ACE_THR_FUNC_RETURN DualEC_Supplier::run_nav_thread (void *arg) { DualEC_Supplier * sup = - ACE_static_cast (DualEC_Supplier *, arg); + static_cast<DualEC_Supplier *> (arg); ACE_TRY_NEW_ENV { @@ -403,7 +403,7 @@ ACE_THR_FUNC_RETURN DualEC_Supplier::run_weap_thread (void *arg) { DualEC_Supplier * sup = - ACE_static_cast (DualEC_Supplier *, arg); + static_cast<DualEC_Supplier *> (arg); ACE_TRY_NEW_ENV { @@ -528,18 +528,15 @@ DualEC_Supplier::create_schedulers (void) this->sched_hi_-> set (this->sched_hi_rt_info_hi_, - ACE_static_cast (RtecScheduler::Criticality_t, - this->rt_info_dummy_hi_.criticality), + static_cast<RtecScheduler::Criticality_t> (this->rt_info_dummy_hi_.criticality), this->rt_info_dummy_hi_.worst_case_execution_time, this->rt_info_dummy_hi_.typical_execution_time, this->rt_info_dummy_hi_.cached_execution_time, this->rt_info_dummy_hi_.period, - ACE_static_cast (RtecScheduler::Importance_t, - this->rt_info_dummy_hi_.importance), + static_cast<RtecScheduler::Importance_t> (this->rt_info_dummy_hi_.importance), this->rt_info_dummy_hi_.quantum, this->rt_info_dummy_hi_.threads, - ACE_static_cast (RtecScheduler::Info_Type_t, - this->rt_info_dummy_hi_.info_type) + static_cast<RtecScheduler::Info_Type_t> (this->rt_info_dummy_hi_.info_type) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -553,18 +550,15 @@ DualEC_Supplier::create_schedulers (void) this->sched_hi_-> set (this->sched_hi_rt_info_lo_, - ACE_static_cast (RtecScheduler::Criticality_t, - this->rt_info_dummy_lo_.criticality), + static_cast<RtecScheduler::Criticality_t> (this->rt_info_dummy_lo_.criticality), this->rt_info_dummy_lo_.worst_case_execution_time, this->rt_info_dummy_lo_.typical_execution_time, this->rt_info_dummy_lo_.cached_execution_time, this->rt_info_dummy_lo_.period, - ACE_static_cast (RtecScheduler::Importance_t, - this->rt_info_dummy_lo_.importance), + static_cast<RtecScheduler::Importance_t> (this->rt_info_dummy_lo_.importance), this->rt_info_dummy_lo_.quantum, this->rt_info_dummy_lo_.threads, - ACE_static_cast (RtecScheduler::Info_Type_t, - this->rt_info_dummy_lo_.info_type) + static_cast<RtecScheduler::Info_Type_t> (this->rt_info_dummy_lo_.info_type) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -578,18 +572,15 @@ DualEC_Supplier::create_schedulers (void) this->sched_lo_-> set (this->sched_hi_rt_info_hi_, - ACE_static_cast (RtecScheduler::Criticality_t, - this->rt_info_dummy_hi_.criticality), + static_cast<RtecScheduler::Criticality_t> (this->rt_info_dummy_hi_.criticality), this->rt_info_dummy_hi_.worst_case_execution_time, this->rt_info_dummy_hi_.typical_execution_time, this->rt_info_dummy_hi_.cached_execution_time, this->rt_info_dummy_hi_.period, - ACE_static_cast (RtecScheduler::Importance_t, - this->rt_info_dummy_hi_.importance), + static_cast<RtecScheduler::Importance_t> (this->rt_info_dummy_hi_.importance), this->rt_info_dummy_hi_.quantum, this->rt_info_dummy_hi_.threads, - ACE_static_cast (RtecScheduler::Info_Type_t, - this->rt_info_dummy_hi_.info_type) + static_cast<RtecScheduler::Info_Type_t> (this->rt_info_dummy_hi_.info_type) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -603,18 +594,15 @@ DualEC_Supplier::create_schedulers (void) this->sched_lo_-> set (this->sched_hi_rt_info_lo_, - ACE_static_cast (RtecScheduler::Criticality_t, - this->rt_info_dummy_lo_.criticality), + static_cast<RtecScheduler::Criticality_t> (this->rt_info_dummy_lo_.criticality), this->rt_info_dummy_lo_.worst_case_execution_time, this->rt_info_dummy_lo_.typical_execution_time, this->rt_info_dummy_lo_.cached_execution_time, this->rt_info_dummy_lo_.period, - ACE_static_cast (RtecScheduler::Importance_t, - this->rt_info_dummy_lo_.importance), + static_cast<RtecScheduler::Importance_t> (this->rt_info_dummy_lo_.importance), this->rt_info_dummy_lo_.quantum, this->rt_info_dummy_lo_.threads, - ACE_static_cast (RtecScheduler::Info_Type_t, - this->rt_info_dummy_lo_.info_type) + static_cast<RtecScheduler::Info_Type_t> (this->rt_info_dummy_lo_.info_type) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -1061,7 +1049,7 @@ DualEC_Supplier::get_options (int argc, char *argv []) if (temp >= 0) { this->nav_pause_ = - ACE_Time_Value(0, ACE_static_cast (long, temp)); + ACE_Time_Value(0, static_cast<long> (temp)); ACE_DEBUG ((LM_DEBUG, "Navigation pause: %d usec\n", temp)); @@ -1079,7 +1067,7 @@ DualEC_Supplier::get_options (int argc, char *argv []) if (temp >= 0) { this->weap_pause_ = - ACE_Time_Value(0, ACE_static_cast (long, temp)); + ACE_Time_Value(0, static_cast<long> (temp)); ACE_DEBUG ((LM_DEBUG, "Weapons pause: %d usec\n", temp)); diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp index 6edf35c7424..389f51d958d 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp @@ -111,7 +111,7 @@ main (int argc, char **argv) "\n \t IDL_Cubit: Collocation test \n\n")); ACE_Thread_Manager tm; - tm.spawn (ACE_reinterpret_cast (ACE_THR_FUNC, &svr_worker), + tm.spawn (reinterpret_cast<ACE_THR_FUNC> (&svr_worker), &thread_barrier); thread_barrier.server_init_.wait (); ACE_OS::sleep (1); diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp index 0f79cc7403b..876035b66dc 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp @@ -19,7 +19,7 @@ ACE_round (ACE_timer_t t) #if defined (ACE_LACKS_FLOATING_POINT) return t; #else - return ACE_static_cast (ACE_UINT32, t); + return static_cast<ACE_UINT32> (t); #endif } @@ -339,8 +339,7 @@ Client::get_low_priority_latency (void) ACE_timer_t Client::get_latency (u_int thread_id) { - return ACE_static_cast (ACE_timer_t, - this->ts_->latency_ [thread_id]); + return static_cast<ACE_timer_t> (this->ts_->latency_ [thread_id]); } // Returns the jitter in usecs. diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp index a82e1be5dee..90424b14d83 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp @@ -183,8 +183,8 @@ Server::activate_high_servant (void) char *high_second_argv[] = {orbendpoint, - ACE_const_cast (char *, "-ORBSndSock 32768 "), - ACE_const_cast (char *, "-ORBRcvSock 32768 "), + const_cast<char *> ("-ORBSndSock 32768 "), + const_cast<char *> ("-ORBRcvSock 32768 "), 0}; ACE_NEW_RETURN (this->high_argv_, ACE_ARGV (this->argv_, high_second_argv), @@ -227,7 +227,7 @@ Server::activate_high_servant (void) int Server::activate_low_servants (void) { - if (ACE_static_cast (int, this->num_low_priority_) > 0) + if (static_cast<int> (this->num_low_priority_) > 0) { ACE_DEBUG ((LM_DEBUG, "Creating %d servants starting at priority %d\n", @@ -271,8 +271,8 @@ Server::activate_low_servants (void) { char *low_second_argv[] = {random_endpoint, - ACE_const_cast (char *, "-ORBSndSock 32768 "), - ACE_const_cast (char *, "-ORBRcvSock 32768 "), + const_cast<char *> ("-ORBSndSock 32768 "), + const_cast<char *> ("-ORBRcvSock 32768 "), 0}; ACE_NEW_RETURN (this->low_argv_, ACE_ARGV (this->argv_, diff --git a/TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp b/TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp index a0c3544bc95..c3a276474ba 100644 --- a/TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp +++ b/TAO/performance-tests/POA/Object_Creation_And_Registration/registration.cpp @@ -87,7 +87,7 @@ parse_args (int argc, char **argv) switch (c) { case 'i': - iterations = ACE_static_cast (u_long, ACE_OS::atoi (get_opts.opt_arg ())); + iterations = static_cast<u_long> (ACE_OS::atoi (get_opts.opt_arg ())); break; case 'r': diff --git a/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp b/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp index 04599b0790f..3981c21c94e 100644 --- a/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp +++ b/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp @@ -216,8 +216,7 @@ to_seconds (ACE_UINT64 hrtime, #if defined ACE_LACKS_LONGLONG_T hrtime / sf; #else /* ! ACE_LACKS_LONGLONG_T */ - ACE_static_cast (double, - ACE_UINT64_DBLCAST_ADAPTER (hrtime / sf)); + static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER (hrtime / sf)); #endif /* ! ACE_LACKS_LONGLONG_T */ seconds /= ACE_HR_SCALE_CONVERSION; diff --git a/TAO/tests/AMH_Exceptions/server.cpp b/TAO/tests/AMH_Exceptions/server.cpp index 5bf4fd81ca4..f3721e68cb0 100644 --- a/TAO/tests/AMH_Exceptions/server.cpp +++ b/TAO/tests/AMH_Exceptions/server.cpp @@ -103,7 +103,7 @@ ST_AMH_Server::ST_AMH_Server (int* argc, char **argv) : argc_ (argc) , argv_ (argv) { - this->ior_output_file_ = ACE_const_cast (char*, "test.ior"); + this->ior_output_file_ = const_cast<char*> ("test.ior"); } ST_AMH_Server::~ST_AMH_Server () diff --git a/TAO/tests/AMH_Oneway/server.cpp b/TAO/tests/AMH_Oneway/server.cpp index 8ee95f578b2..98b960f76f7 100644 --- a/TAO/tests/AMH_Oneway/server.cpp +++ b/TAO/tests/AMH_Oneway/server.cpp @@ -122,7 +122,7 @@ ST_AMH_Server::ST_AMH_Server (int* argc, char **argv) : argc_ (argc) , argv_ (argv) { - this->ior_output_file_ = ACE_const_cast (char*, "test.ior"); + this->ior_output_file_ = const_cast<char*> ("test.ior"); } ST_AMH_Server::~ST_AMH_Server () diff --git a/TAO/tests/CDR/allocator.cpp b/TAO/tests/CDR/allocator.cpp index 1ad97a311b6..34821280c6b 100644 --- a/TAO/tests/CDR/allocator.cpp +++ b/TAO/tests/CDR/allocator.cpp @@ -185,7 +185,7 @@ main (int argc, char *argv[]) ACE_Time_Value tv; cdr_encoding.elapsed_time_incr (tv); ACE_hrtime_t usecs = tv.sec (); - usecs *= ACE_static_cast (ACE_UINT32, ACE_ONE_SECOND_IN_USECS); + usecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS); usecs += tv.usec (); double average = ACE_U64_TO_U32(usecs) / repeat; diff --git a/TAO/tests/CDR/growth.cpp b/TAO/tests/CDR/growth.cpp index 0ddc7e78f86..9ddf3ea3d8e 100644 --- a/TAO/tests/CDR/growth.cpp +++ b/TAO/tests/CDR/growth.cpp @@ -147,13 +147,13 @@ main (int argc, char *argv[]) ACE_Time_Value wtv; writing.elapsed_time_incr (wtv); ACE_hrtime_t wusecs = wtv.sec (); - wusecs *= ACE_static_cast (ACE_UINT32, ACE_ONE_SECOND_IN_USECS); + wusecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS); wusecs += wtv.usec (); ACE_Time_Value rtv; reading.elapsed_time_incr (rtv); ACE_hrtime_t rusecs = rtv.sec (); - rusecs *= ACE_static_cast (ACE_UINT32, ACE_ONE_SECOND_IN_USECS); + rusecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS); rusecs += rtv.usec (); double write_average = ACE_U64_TO_U32(wusecs) / m; diff --git a/TAO/tests/CDR/octet_sequence.cpp b/TAO/tests/CDR/octet_sequence.cpp index 905bee48f55..fd8a8026ab5 100644 --- a/TAO/tests/CDR/octet_sequence.cpp +++ b/TAO/tests/CDR/octet_sequence.cpp @@ -66,7 +66,7 @@ int main(int, char*[]) cdr.write_octet_array_mb(m1); dump("expect 3,3,3"); // that's what I expected, anyway ACE_DEBUG ((LM_INFO, "total cdr length is %u\n", - ACE_static_cast (u_int, cdr.total_length()))); + static_cast<u_int> (cdr.total_length()))); } dump("expect 2,2,2"); // that's what I expected, anyway diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp index 32962cfb721..4c9d5479957 100644 --- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp +++ b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Char_IBM1047_ISO8859_Translator.cpp @@ -40,7 +40,7 @@ ACE_CDR::Boolean IBM1047_ISO8859::read_char (ACE_InputCDR &in, ACE_CDR::Char &x) { - if (this->read_1 (in, ACE_reinterpret_cast (ACE_CDR::Octet*, &x))) + if (this->read_1 (in, reinterpret_cast<ACE_CDR::Octet*> (&x))) { x = to_IBM1047[(int) x]; return 1; @@ -100,8 +100,7 @@ IBM1047_ISO8859::write_char (ACE_OutputCDR& out, ACE_CDR::Char x) { return this->write_1 (out, - ACE_reinterpret_cast (const ACE_CDR::Octet*, - &from_IBM1047[(int) x])); + reinterpret_cast<const ACE_CDR::Octet*> (&from_IBM1047[(int) x])); } ACE_CDR::Boolean diff --git a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp b/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp index 40677ac0275..bbd19acada2 100644 --- a/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp +++ b/TAO/tests/CodeSets/libs/UCS4_UTF16/WUCS4_UTF16.cpp @@ -83,14 +83,13 @@ ACE_UTF16_T load_raw_wchar (const char * buffer, size_t & pos, int do_byte_swap) { // need a two byte object to load the UTF16 2 byte codepoint - ACE_UTF16_T utf16_char = * ACE_reinterpret_cast (ACE_UTF16_T const *, - &buffer[pos*ACE_UTF16_CODEPOINT_SIZE]); + ACE_UTF16_T utf16_char = * reinterpret_cast<ACE_UTF16_T const *> (&buffer[pos*ACE_UTF16_CODEPOINT_SIZE]); #if ! defined (ACE_DISABLE_SWAP_ON_READ) if (do_byte_swap) { ACE_CDR::swap_2 ( &buffer[pos*ACE_UTF16_CODEPOINT_SIZE], - ACE_reinterpret_cast(char *,&utf16_char)); + reinterpret_cast<char *> (&utf16_char)); } #endif pos ++; @@ -103,8 +102,7 @@ static ACE_CDR::WChar convert_surrogate_pair (ACE_UTF16_T high, ACE_UTF16_T low) { - return ACE_static_cast (ACE_CDR::WChar, - ((high - ACE_UTF16_SURROGATE_HIGH_BEGIN) << ACE_UTF16_SURROGATE_HIGH_SHIFT) + return static_cast<ACE_CDR::WChar> (((high - ACE_UTF16_SURROGATE_HIGH_BEGIN) << ACE_UTF16_SURROGATE_HIGH_SHIFT) + (low - ACE_UTF16_SURROGATE_LOW_BEGIN) + ACE_UTF16_SURROGATE_OFFSET ); @@ -121,7 +119,7 @@ load_wchar (const char * buffer, size_t & pos, size_t length, int do_byte_swap) ACE_CDR::WChar rc = ACE_UNICODE_SUBSTITUTE_CHARACTER; if (pos < length) { - rc = ACE_static_cast (ACE_CDR::WChar, load_raw_wchar (buffer, pos, do_byte_swap)); + rc = static_cast<ACE_CDR::WChar> (load_raw_wchar (buffer, pos, do_byte_swap)); // Is this a UTF16 surrogate? // note assumpton that SURROGATE_HIGH_END == SURROGATE_LOW_BEGIN if (rc >= ACE_UTF16_SURROGATE_HIGH_BEGIN && rc < ACE_UTF16_SURROGATE_LOW_END) @@ -137,7 +135,7 @@ load_wchar (const char * buffer, size_t & pos, size_t length, int do_byte_swap) && low < ACE_UTF16_SURROGATE_LOW_END) { rc = convert_surrogate_pair ( - ACE_static_cast (ACE_UTF16_T, rc), low); + static_cast<ACE_UTF16_T> (rc), low); } else { @@ -162,7 +160,7 @@ static //ACE_INLINE size_t encode_utf16 (ACE_UTF16_T * buffer, ACE_CDR::WChar value) { - buffer[0] = ACE_static_cast (ACE_UTF16_T, value); + buffer[0] = static_cast<ACE_UTF16_T> (value); size_t length = 1; if (value >= ACE_UTF16_SURROGATE_HIGH_BEGIN) { @@ -178,8 +176,7 @@ size_t encode_utf16 (ACE_UTF16_T * buffer, ACE_CDR::WChar value) } else { - ACE_CDR::WChar offset = ACE_static_cast (ACE_CDR::WChar, - value - ACE_UTF16_SURROGATE_OFFSET); + ACE_CDR::WChar offset = static_cast<ACE_CDR::WChar> (value - ACE_UTF16_SURROGATE_OFFSET); buffer[0] = (offset >> ACE_UTF16_SURROGATE_HIGH_SHIFT) + ACE_UTF16_SURROGATE_HIGH_BEGIN; buffer[1] = (offset & ACE_UTF16_SURROGATE_LOW_MASK) @@ -229,8 +226,8 @@ WUCS4_UTF16::~WUCS4_UTF16 (void) ACE_CDR::Boolean WUCS4_UTF16::read_wchar (ACE_InputCDR &cdr, ACE_CDR::WChar &x) { - if (ACE_static_cast (ACE_CDR::Short, this->major_version(cdr)) == 1 - && ACE_static_cast (ACE_CDR::Short, this->minor_version(cdr)) > 1) + if (static_cast<ACE_CDR::Short> (this->major_version(cdr)) == 1 + && static_cast<ACE_CDR::Short> (this->minor_version(cdr)) > 1) { ACE_CDR::Octet len; if (! this->read_1 (cdr, &len)) @@ -284,7 +281,7 @@ WUCS4_UTF16::read_wchar (ACE_InputCDR &cdr, ACE_CDR::WChar &x) } else { - x = ACE_static_cast(ACE_CDR::WChar, sx); + x = static_cast<ACE_CDR::WChar> (sx); } cdr.reset_byte_order (old_bo); @@ -296,7 +293,7 @@ WUCS4_UTF16::read_wchar (ACE_InputCDR &cdr, ACE_CDR::WChar &x) { return 0; } - x = ACE_static_cast(ACE_CDR::WChar, sx); + x = static_cast<ACE_CDR::WChar> (sx); } return 1; } @@ -314,8 +311,8 @@ WUCS4_UTF16::read_wstring (ACE_InputCDR &cdr, // the memory is allocated. if (len > 0 && len <= cdr.length()) { - if (ACE_static_cast (ACE_CDR::Short, this->major_version(cdr)) == 1 - && ACE_static_cast (ACE_CDR::Short, this->minor_version(cdr)) > 1) + if (static_cast<ACE_CDR::Short> (this->major_version(cdr)) == 1 + && static_cast<ACE_CDR::Short> (this->minor_version(cdr)) > 1) { len /= ACE_UTF16_CODEPOINT_SIZE; @@ -404,8 +401,8 @@ WUCS4_UTF16::read_wchar_array (ACE_InputCDR & cdr, if (length == 0) return 1; - if (ACE_static_cast (ACE_CDR::Short, this->major_version(cdr)) == 1 - && ACE_static_cast (ACE_CDR::Short, this->minor_version(cdr)) > 1) + if (static_cast<ACE_CDR::Short> (this->major_version(cdr)) == 1 + && static_cast<ACE_CDR::Short> (this->minor_version(cdr)) > 1) { for (size_t i = 0; i < length; i++) if (!this->read_wchar(cdr,x[i])) @@ -421,12 +418,12 @@ WUCS4_UTF16::write_wchar (ACE_OutputCDR &cdr, ACE_CDR::WChar x) { int encode_len = 1; - if (ACE_static_cast (ACE_CDR::Short, this->minor_version(cdr)) == 0) + if (static_cast<ACE_CDR::Short> (this->minor_version(cdr)) == 0) { // wchar is not allowed with GIOP 1.0 errno = EINVAL; return 0; } - else if (ACE_static_cast (ACE_CDR::Short, this->minor_version(cdr)) == 1) + else if (static_cast<ACE_CDR::Short> (this->minor_version(cdr)) == 1) encode_len = 0; return write_wchar_i(cdr,x,1,encode_len); @@ -450,22 +447,21 @@ WUCS4_UTF16::write_wchar_i (ACE_OutputCDR &cdr, { len = 2; buffer[0] = ACE_UNICODE_BOM_CORRECT; - buffer[1] = ACE_static_cast(ACE_CDR::Short,x); + buffer[1] = static_cast<ACE_CDR::Short> (x); } else { len = 1; if (cdr.byte_order()) - ACE_CDR::swap_2 (ACE_reinterpret_cast (const char *,&x), - ACE_reinterpret_cast (char *,buffer)); + ACE_CDR::swap_2 (reinterpret_cast<const char *> (&x), + reinterpret_cast<char *> (buffer)); else - buffer[0] = ACE_static_cast(ACE_CDR::Short,x); + buffer[0] = static_cast<ACE_CDR::Short> (x); } if (encode_len) { - unsigned char tcsize = ACE_static_cast (unsigned char, - len * ACE_UTF16_CODEPOINT_SIZE); + unsigned char tcsize = static_cast<unsigned char> (len * ACE_UTF16_CODEPOINT_SIZE); if (this->write_1 (cdr, &tcsize)) return this->write_array(cdr, &buffer, tcsize, 1, 1); else @@ -483,8 +479,8 @@ WUCS4_UTF16::write_wstring (ACE_OutputCDR & cdr, ACE_CDR::ULong len, const ACE_CDR::WChar *x) { - if (ACE_static_cast (ACE_CDR::Short, this->major_version(cdr)) == 1 - && ACE_static_cast (ACE_CDR::Short, this->minor_version(cdr)) > 1) + if (static_cast<ACE_CDR::Short> (this->major_version(cdr)) == 1 + && static_cast<ACE_CDR::Short> (this->minor_version(cdr)) > 1) { // count characters that will require surrogates to // determine transmission length @@ -529,12 +525,12 @@ WUCS4_UTF16::write_wchar_array (ACE_OutputCDR & cdr, #endif int encode_len = 1; - if (ACE_static_cast (ACE_CDR::Short, this->minor_version(cdr)) == 0) + if (static_cast<ACE_CDR::Short> (this->minor_version(cdr)) == 0) { // wchar is not allowed with GIOP 1.0 errno = EINVAL; return 0; } - else if (ACE_static_cast (ACE_CDR::Short, this->minor_version(cdr)) == 1) + else if (static_cast<ACE_CDR::Short> (this->minor_version(cdr)) == 1) encode_len = 0; for (size_t i = 0; i < length; i++) @@ -559,7 +555,7 @@ WUCS4_UTF16::write_measured_wchar_array (ACE_OutputCDR & cdr, return 0; } - ACE_UTF16_T *sb = ACE_reinterpret_cast(ACE_UTF16_T *, buf); + ACE_UTF16_T *sb = reinterpret_cast<ACE_UTF16_T *> (buf); size_t sbpos = 0; for (size_t i = 0; i < length; i++) @@ -574,7 +570,7 @@ WUCS4_UTF16::write_measured_wchar_array (ACE_OutputCDR & cdr, // and we don't want to allocate a new array for (size_t i = 0; i < sbpos; i++) { - char * pchar = ACE_static_cast (char *, &sb[i]); + char * pchar = static_cast<char *> (&sb[i]); // ACE_CDR::swap_2 (pchar, pchar); // can't use swap_2 because inplace swaps are not safe // and work-arounds like copying to another buffer lose diff --git a/TAO/tests/CodeSets/simple/client.cpp b/TAO/tests/CodeSets/simple/client.cpp index b11c570033d..faff97c1cd1 100644 --- a/TAO/tests/CodeSets/simple/client.cpp +++ b/TAO/tests/CodeSets/simple/client.cpp @@ -39,8 +39,8 @@ make_wstring (const char *str) "make_wstring: str = %s\n",str)); for (int i = 0; i < len; i++) { - char *t = ACE_const_cast (char *, str); - wstr[i] = ACE_static_cast (wchar_t, *(t + i)); + char *t = const_cast<char *> (str); + wstr[i] = static_cast<wchar_t> (*(t + i)); ACE_DEBUG ((LM_DEBUG, "wstr[%d] = %d\n", i, (short)wstr[i])); } diff --git a/TAO/tests/Codec/client.cpp b/TAO/tests/Codec/client.cpp index a5048d39e31..d9e0019a156 100644 --- a/TAO/tests/Codec/client.cpp +++ b/TAO/tests/Codec/client.cpp @@ -123,7 +123,7 @@ main (int argc, char *argv[]) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - if ((ACE_reinterpret_cast (ptrdiff_t, encoded_data->get_buffer ()) + if ((reinterpret_cast<ptrdiff_t> (encoded_data->get_buffer ()) % ACE_CDR::MAX_ALIGNMENT) == 0) ACE_DEBUG ((LM_DEBUG, "\nData for decoding are already aligned" @@ -160,7 +160,7 @@ main (int argc, char *argv[]) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - if ((ACE_reinterpret_cast (ptrdiff_t, encoded_data->get_buffer ()) + if ((reinterpret_cast<ptrdiff_t> (encoded_data->get_buffer ()) % ACE_CDR::MAX_ALIGNMENT) == 0) ACE_DEBUG ((LM_WARNING, "\n" diff --git a/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp b/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp index cca7e1b13be..8fe3545b9e4 100644 --- a/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp +++ b/TAO/tests/Collocation_Opportunities/Collocation_Opportunities.cpp @@ -69,8 +69,7 @@ test_i::method (ACE_ENV_SINGLE_ARG_DECL) else { TAO_POA_Current &tao_poa_current = - ACE_dynamic_cast (TAO_POA_Current &, - *(this->poa_current_.in ())); + dynamic_cast<TAO_POA_Current &> (*(this->poa_current_.in ())); TAO_POA_Current_Impl &tao_poa_current_implementation = *tao_poa_current.implementation (); diff --git a/TAO/tests/FL_Cube/client.cpp b/TAO/tests/FL_Cube/client.cpp index bb4a9dee3c5..3d6b5a7abdf 100644 --- a/TAO/tests/FL_Cube/client.cpp +++ b/TAO/tests/FL_Cube/client.cpp @@ -122,14 +122,14 @@ Client::show (void) void Client::x_cb (Fl_Widget*, void* cookie) { - Client *self = ACE_static_cast(Client*,cookie); + Client *self = static_cast<Client*> (cookie); self->x_changed (); } void Client::y_cb (Fl_Widget*, void* cookie) { - Client *self = ACE_static_cast(Client*,cookie); + Client *self = static_cast<Client*> (cookie); self->y_changed (); } diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp index 5edb6d5ab70..ca435d5b72b 100644 --- a/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp +++ b/TAO/tests/NestedUpcall/MT_Client_Test/client.cpp @@ -206,7 +206,7 @@ MT_Client::init (int argc, char **argv, ACE_TRY { char buf[64]; - ACE_OS::sprintf (buf, "thread_%lx", ACE_reinterpret_cast (long, this)); + ACE_OS::sprintf (buf, "thread_%lx", reinterpret_cast<long> (this)); this->orb_var_ = CORBA::ORB_init (this->argc_, diff --git a/TAO/tests/NestedUpcall/Simple/server.cpp b/TAO/tests/NestedUpcall/Simple/server.cpp index 59b29310415..f9f3763ca91 100644 --- a/TAO/tests/NestedUpcall/Simple/server.cpp +++ b/TAO/tests/NestedUpcall/Simple/server.cpp @@ -63,7 +63,7 @@ write_ior_to_file (const char *ior) "%s", ior); if (result < 0 || - ACE_static_cast (size_t, result) != ACE_OS::strlen (ior)) + static_cast<size_t> (result) != ACE_OS::strlen (ior)) ACE_ERROR_RETURN ((LM_ERROR, "ACE_OS::fprintf failed while writing %s to %s\n", ior, diff --git a/TAO/tests/OctetSeq/OctetSeq.cpp b/TAO/tests/OctetSeq/OctetSeq.cpp index 4fd3d478071..07b2083d7b1 100644 --- a/TAO/tests/OctetSeq/OctetSeq.cpp +++ b/TAO/tests/OctetSeq/OctetSeq.cpp @@ -128,13 +128,13 @@ run (char* buf, size_t bufsize, ACE_Time_Value wtv; writing.elapsed_time_incr (wtv); ACE_hrtime_t wusecs = wtv.sec (); - wusecs *= ACE_static_cast (ACE_UINT32, ACE_ONE_SECOND_IN_USECS); + wusecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS); wusecs += wtv.usec (); ACE_Time_Value rtv; reading.elapsed_time_incr (rtv); ACE_hrtime_t rusecs = rtv.sec (); - rusecs *= ACE_static_cast (ACE_UINT32, ACE_ONE_SECOND_IN_USECS); + rusecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS); rusecs += rtv.usec (); double write_average = ACE_U64_TO_U32(wusecs) / m; diff --git a/TAO/tests/OctetSeq/client.cpp b/TAO/tests/OctetSeq/client.cpp index b7ca3e5baf4..65497c0347a 100644 --- a/TAO/tests/OctetSeq/client.cpp +++ b/TAO/tests/OctetSeq/client.cpp @@ -133,8 +133,7 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; CORBA::ULong crc_local = - ACE::crc32 (ACE_reinterpret_cast (const char*, - elements[idx].get_buffer ()), + ACE::crc32 (reinterpret_cast<const char*> (elements[idx].get_buffer ()), elements[idx].length ()); if (crc_local != crc_remote) diff --git a/TAO/tests/OctetSeq/test_i.cpp b/TAO/tests/OctetSeq/test_i.cpp index f1ccab1babe..d053c3353eb 100644 --- a/TAO/tests/OctetSeq/test_i.cpp +++ b/TAO/tests/OctetSeq/test_i.cpp @@ -68,8 +68,7 @@ Database_i::get_crc (Test::Index i if (i >= this->max_range_) ACE_THROW_RETURN (Test::OutOfRange (0, this->max_range_), 0); - return ACE::crc32 (ACE_reinterpret_cast (const char*, - this->elements_[i].get_buffer ()), + return ACE::crc32 (reinterpret_cast<const char*> (this->elements_[i].get_buffer ()), this->elements_[i].length ()); } diff --git a/TAO/tests/Policies/Manipulation.cpp b/TAO/tests/Policies/Manipulation.cpp index ac76f622273..c6bfc107291 100644 --- a/TAO/tests/Policies/Manipulation.cpp +++ b/TAO/tests/Policies/Manipulation.cpp @@ -304,10 +304,10 @@ Manipulation::svc (void) { #ifndef ACE_LACKS_LONGLONG_T ACE_RANDR_TYPE seed = - ACE_static_cast (ACE_RANDR_TYPE, ACE_OS::gethrtime ()); + static_cast<ACE_RANDR_TYPE> (ACE_OS::gethrtime ()); #else ACE_RANDR_TYPE seed = - ACE_static_cast (ACE_RANDR_TYPE, ACE_OS::gethrtime().lo()); + static_cast<ACE_RANDR_TYPE> (ACE_OS::gethrtime().lo()); #endif CORBA::Object_var object = this->orb_->resolve_initial_references ("ORBPolicyManager" diff --git a/TAO/tests/Portable_Interceptors/Benchmark/interceptors.cpp b/TAO/tests/Portable_Interceptors/Benchmark/interceptors.cpp index 79972dd7760..c13ec151450 100644 --- a/TAO/tests/Portable_Interceptors/Benchmark/interceptors.cpp +++ b/TAO/tests/Portable_Interceptors/Benchmark/interceptors.cpp @@ -66,7 +66,7 @@ Vault_Client_Request_Interceptor::send_request ( CORBA::Octet *buf = 0; ACE_NEW (buf, CORBA::Octet [string_len]); - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buf), passwd); + ACE_OS::strcpy (reinterpret_cast<char *> (buf), passwd); sc.context_data.replace (string_len, string_len, buf, 1); @@ -199,8 +199,7 @@ Vault_Server_Request_Interceptor::receive_request ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); if (ACE_OS::strcmp (buf, "root123") != 0) ACE_THROW (CORBA::NO_PERMISSION ()); @@ -317,7 +316,7 @@ Vault_Client_Request_Context_Interceptor::send_request ( CORBA::NO_MEMORY ()); ACE_CHECK; - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buf), passwd); + ACE_OS::strcpy (reinterpret_cast<char *> (buf), passwd); sc.context_data.replace (string_len, string_len, buf, 1); @@ -420,8 +419,7 @@ Vault_Server_Request_Context_Interceptor::receive_request ( ri->get_request_service_context (id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf = ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ()); if (ACE_OS::strcmp (buf, "root123") !=0) ACE_THROW (CORBA::NO_PERMISSION ()); diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/interceptors.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/interceptors.cpp index 094f541345d..31573b915ec 100644 --- a/TAO/tests/Portable_Interceptors/Bug_1559/interceptors.cpp +++ b/TAO/tests/Portable_Interceptors/Bug_1559/interceptors.cpp @@ -120,7 +120,7 @@ Echo_Client_Request_Interceptor::send_request ( CORBA::ULong string_len = ACE_OS::strlen (request_msg) + 1; CORBA::Octet *buf = CORBA::OctetSeq::allocbuf (string_len); - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buf), request_msg); + ACE_OS::strcpy (reinterpret_cast<char *> (buf), request_msg); sc.context_data.replace (string_len, string_len, buf, 1); @@ -134,7 +134,7 @@ Echo_Client_Request_Interceptor::send_request ( ACE_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { @@ -162,7 +162,7 @@ Echo_Client_Request_Interceptor::send_request ( CORBA::ULong string_len = ACE_OS::strlen (forward_msg) + 1; CORBA::Octet *buf = CORBA::OctetSeq::allocbuf (string_len); - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buf), forward_msg); + ACE_OS::strcpy (reinterpret_cast<char *> (buf), forward_msg); sc.context_data.replace (string_len, string_len, buf, 1); // Add this context to the service context list. @@ -175,7 +175,7 @@ Echo_Client_Request_Interceptor::send_request ( ACE_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, forward_msg) != 0) { @@ -240,7 +240,7 @@ Echo_Client_Request_Interceptor::receive_reply ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, " Received reply service context: %s\n", buf)); @@ -258,7 +258,7 @@ Echo_Client_Request_Interceptor::receive_reply ( ACE_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, forward_msg) != 0) { @@ -309,7 +309,7 @@ Echo_Client_Request_Interceptor::receive_other ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); if (ACE_OS::strcmp (buf, request_msg) != 0) { @@ -362,7 +362,7 @@ Echo_Client_Request_Interceptor::receive_exception ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, " Received reply service context: %s\n", buf)); @@ -380,7 +380,7 @@ Echo_Client_Request_Interceptor::receive_exception ( ACE_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, forward_msg) != 0) { @@ -467,7 +467,7 @@ Echo_Server_Request_Interceptor::receive_request_service_contexts ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, " Received service context: %s\n", buf)); @@ -486,7 +486,7 @@ Echo_Server_Request_Interceptor::receive_request_service_contexts ( CORBA::ULong string_len = ACE_OS::strlen (reply_msg) + 1; CORBA::Octet *buff = CORBA::OctetSeq::allocbuf (string_len); - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buff), reply_msg); + ACE_OS::strcpy (reinterpret_cast<char *> (buff), reply_msg); scc.context_data.replace (string_len, string_len, buff, 1); @@ -535,8 +535,7 @@ Echo_Server_Request_Interceptor::send_reply ( ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf = ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, " Reply service context: %s\n", buf)); @@ -554,8 +553,7 @@ Echo_Server_Request_Interceptor::send_reply ( ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf2 = ACE_reinterpret_cast (const char *, - sc2->context_data.get_buffer ()); + const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, forward_msg) != 0) { @@ -589,8 +587,7 @@ Echo_Server_Request_Interceptor::send_exception ( ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf = ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, " Reply service context: %s\n", buf)); @@ -608,8 +605,7 @@ Echo_Server_Request_Interceptor::send_exception ( ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf2 = ACE_reinterpret_cast (const char *, - sc2->context_data.get_buffer ()); + const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, forward_msg) != 0) { @@ -642,8 +638,7 @@ Echo_Server_Request_Interceptor::send_other ( ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf = ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ()); if (ACE_OS::strcmp (buf, request_msg) != 0) { diff --git a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp index 89258c68b70..e475811792b 100644 --- a/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp +++ b/TAO/tests/Portable_Interceptors/Collocated/Service_Context_Manipulation/interceptors.cpp @@ -89,7 +89,7 @@ Echo_Client_Request_Interceptor::send_request ( CORBA::ULong string_len = ACE_OS::strlen (request_msg) + 1; CORBA::Octet *buf = CORBA::OctetSeq::allocbuf (string_len); - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buf), request_msg); + ACE_OS::strcpy (reinterpret_cast<char *> (buf), request_msg); sc.context_data.replace (string_len, string_len, buf, 1); @@ -103,7 +103,7 @@ Echo_Client_Request_Interceptor::send_request ( ACE_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); ACE_UNUSED_ARG (buf2); @@ -165,8 +165,7 @@ Echo_Client_Request_Interceptor::receive_reply ( ACE_TRY_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, "Received reply service context: %s\n", buf)); @@ -185,8 +184,7 @@ Echo_Client_Request_Interceptor::receive_reply ( ACE_TRY_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, - sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { @@ -262,8 +260,7 @@ Echo_Client_Request_Interceptor::receive_exception ( ACE_TRY_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, "Received reply service context: %s\n", buf)); @@ -282,8 +279,7 @@ Echo_Client_Request_Interceptor::receive_exception ( ACE_TRY_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, - sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { @@ -353,7 +349,7 @@ Echo_Server_Request_Interceptor::receive_request_service_contexts ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, " Received service context: %s\n", buf)); @@ -374,7 +370,7 @@ Echo_Server_Request_Interceptor::receive_request_service_contexts ( CORBA::ULong string_len = ACE_OS::strlen (reply_msg) + 1; CORBA::Octet *buff = CORBA::OctetSeq::allocbuf (string_len); - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buff), reply_msg); + ACE_OS::strcpy (reinterpret_cast<char *> (buff), reply_msg); scc.context_data.replace (string_len, string_len, buff, 1); @@ -414,8 +410,7 @@ Echo_Server_Request_Interceptor::send_reply ( ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf = ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, " Reply service context: %s\n", buf)); @@ -433,8 +428,7 @@ Echo_Server_Request_Interceptor::send_reply ( ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf2 = ACE_reinterpret_cast (const char *, - sc2->context_data.get_buffer ()); + const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { @@ -468,8 +462,7 @@ Echo_Server_Request_Interceptor::send_exception ( ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf = ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ()); ACE_DEBUG ((LM_DEBUG, " Reply service context: %s\n", buf)); @@ -487,8 +480,7 @@ Echo_Server_Request_Interceptor::send_exception ( ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf2 = ACE_reinterpret_cast (const char *, - sc2->context_data.get_buffer ()); + const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/interceptors.cpp b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/interceptors.cpp index 138d1ff9a69..1c2a792d0f7 100644 --- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/interceptors.cpp +++ b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/interceptors.cpp @@ -93,7 +93,7 @@ Echo_Client_Request_Interceptor::send_request ( CORBA::ULong string_len = ACE_OS::strlen (request_msg) + 1; CORBA::Octet *buf = CORBA::OctetSeq::allocbuf (string_len); - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buf), request_msg); + ACE_OS::strcpy (reinterpret_cast<char *> (buf), request_msg); sc.context_data.replace (string_len, string_len, buf, 1); @@ -107,7 +107,7 @@ Echo_Client_Request_Interceptor::send_request ( ACE_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { @@ -167,7 +167,7 @@ Echo_Client_Request_Interceptor::receive_reply ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); #if 0 ACE_DEBUG ((LM_DEBUG, " Received reply service context: %s\n", @@ -187,7 +187,7 @@ Echo_Client_Request_Interceptor::receive_reply ( ACE_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { @@ -254,7 +254,7 @@ Echo_Client_Request_Interceptor::receive_exception ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); #if 0 ACE_DEBUG ((LM_DEBUG, @@ -275,7 +275,7 @@ Echo_Client_Request_Interceptor::receive_exception ( ACE_CHECK; const char *buf2 = - ACE_reinterpret_cast (const char *, sc2->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { @@ -338,7 +338,7 @@ Echo_Server_Request_Interceptor::receive_request_service_contexts ( ACE_CHECK; const char *buf = - ACE_reinterpret_cast (const char *, sc->context_data.get_buffer ()); + reinterpret_cast<const char *> (sc->context_data.get_buffer ()); #if 0 ACE_DEBUG ((LM_DEBUG, " Received service context: %s\n", @@ -361,7 +361,7 @@ Echo_Server_Request_Interceptor::receive_request_service_contexts ( CORBA::ULong string_len = ACE_OS::strlen (reply_msg) + 1; CORBA::Octet *buff = CORBA::OctetSeq::allocbuf (string_len); - ACE_OS::strcpy (ACE_reinterpret_cast (char *, buff), reply_msg); + ACE_OS::strcpy (reinterpret_cast<char *> (buff), reply_msg); scc.context_data.replace (string_len, string_len, buff, 1); @@ -403,8 +403,7 @@ Echo_Server_Request_Interceptor::send_reply ( ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf = ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ()); #if 0 ACE_DEBUG ((LM_DEBUG, @@ -425,8 +424,7 @@ Echo_Server_Request_Interceptor::send_reply ( ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf2 = ACE_reinterpret_cast (const char *, - sc2->context_data.get_buffer ()); + const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { @@ -462,8 +460,7 @@ Echo_Server_Request_Interceptor::send_exception ( ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf = ACE_reinterpret_cast (const char *, - sc->context_data.get_buffer ()); + const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ()); #if 0 ACE_DEBUG ((LM_DEBUG, @@ -484,8 +481,7 @@ Echo_Server_Request_Interceptor::send_exception ( ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER); ACE_CHECK; - const char *buf2 = ACE_reinterpret_cast (const char *, - sc2->context_data.get_buffer ()); + const char *buf2 = reinterpret_cast<const char *> (sc2->context_data.get_buffer ()); if (ACE_OS::strcmp (buf2, request_msg) != 0) { diff --git a/TAO/tests/RTCORBA/RTMutex/server.cpp b/TAO/tests/RTCORBA/RTMutex/server.cpp index a232f56b1af..ede4ee6c071 100644 --- a/TAO/tests/RTCORBA/RTMutex/server.cpp +++ b/TAO/tests/RTCORBA/RTMutex/server.cpp @@ -148,8 +148,8 @@ test_named_mutex_simple (RTCORBA::RTORB_ptr rt_orb) -1); // test the pointers... - if (ACE_reinterpret_cast (void *, larry_mutex1.in ()) - != ACE_reinterpret_cast (void *, larry_mutex2.in ())) + if (reinterpret_cast<void *> (larry_mutex1.in ()) + != reinterpret_cast<void *> (larry_mutex2.in ())) ACE_ERROR_RETURN ((LM_ERROR, "ERROR: Should have gotten the same mutex, but didn't\n"), -1); @@ -169,8 +169,8 @@ test_named_mutex_simple (RTCORBA::RTORB_ptr rt_orb) ACE_TRY_CHECK; // test the pointers... - if (ACE_reinterpret_cast (void *,larry_mutex1.in ()) - != ACE_reinterpret_cast (void *,larry_mutex3.in ())) + if (reinterpret_cast<void *> (larry_mutex1.in ()) + != reinterpret_cast<void *> (larry_mutex3.in ())) ACE_ERROR_RETURN ((LM_ERROR, "ERROR: Should have gotten the same mutex, but didn't\n"), -1); @@ -254,7 +254,7 @@ struct Mutex_Test_Data static void * mutex_test_thread (void *args) { - Mutex_Test_Data *data = ACE_reinterpret_cast (Mutex_Test_Data *, args); + Mutex_Test_Data *data = reinterpret_cast<Mutex_Test_Data *> (args); RTCORBA::Mutex_ptr mutex = data->mutex; int *shared_var = data->shared_var; @@ -377,7 +377,7 @@ static void * mutex_test_try_lock_thread (void *args) { // test out try_lock() failure cases - Mutex_Test_Data *data = ACE_reinterpret_cast (Mutex_Test_Data *, args); + Mutex_Test_Data *data = reinterpret_cast<Mutex_Test_Data *> (args); RTCORBA::Mutex_ptr mutex = data->mutex; CORBA::Boolean result; diff --git a/TAO/tests/RTScheduling/DT_Spawn/test.cpp b/TAO/tests/RTScheduling/DT_Spawn/test.cpp index 49f47127549..5c28403df92 100644 --- a/TAO/tests/RTScheduling/DT_Spawn/test.cpp +++ b/TAO/tests/RTScheduling/DT_Spawn/test.cpp @@ -57,7 +57,7 @@ main (int argc, char* argv []) ACE_CString data ("Harry Potter"); current->spawn (&thread_action, - ACE_const_cast (char *, data.c_str ()), + const_cast<char *> (data.c_str ()), name, sched_param, implicit_sched_param, diff --git a/TAO/tests/Xt_Stopwatch/client.cpp b/TAO/tests/Xt_Stopwatch/client.cpp index 5ef015f0e6a..713ddb68f84 100644 --- a/TAO/tests/Xt_Stopwatch/client.cpp +++ b/TAO/tests/Xt_Stopwatch/client.cpp @@ -108,7 +108,7 @@ Client::parse_args (int argc, void Client::add_callback (Control &ctrl) { - XtPointer client_data = ACE_static_cast (XtPointer, this); + XtPointer client_data = static_cast<XtPointer> (this); // Register callbacks, specifying the object's instance pointer as // client data. @@ -128,8 +128,7 @@ Client::start_callback (Widget /*widget*/, XtPointer client_data, XtPointer) { - Client *self = ACE_static_cast (Client *, - client_data); + Client *self = static_cast<Client *> (client_data); self->start_hook (); } @@ -138,8 +137,7 @@ Client::stop_callback (Widget /*widget*/, XtPointer client_data, XtPointer ) { - Client *self = ACE_static_cast (Client *, - client_data); + Client *self = static_cast<Client *> (client_data); self->stop_hook (); } diff --git a/TAO/tests/Xt_Stopwatch/timer.cpp b/TAO/tests/Xt_Stopwatch/timer.cpp index e9dca4c405e..ce807616e3e 100644 --- a/TAO/tests/Xt_Stopwatch/timer.cpp +++ b/TAO/tests/Xt_Stopwatch/timer.cpp @@ -54,8 +54,7 @@ Timer_imp::tick_callback (XtPointer client_data, XtIntervalId * ) { // Get the object pointer and call the corresponding tick function - Timer_imp *obj = ACE_static_cast (Timer_imp *, - client_data); + Timer_imp *obj = static_cast<Timer_imp *> (client_data); obj->tick (); } diff --git a/TAO/utils/catior/catior.cpp b/TAO/utils/catior/catior.cpp index 12c7fbecb36..4352d5a75f6 100644 --- a/TAO/utils/catior/catior.cpp +++ b/TAO/utils/catior/catior.cpp @@ -196,7 +196,7 @@ catior (char* str mb.rd_ptr (1); mb.wr_ptr (2 * len - 1); - TAO_InputCDR stream (&mb, ACE_static_cast(int,byteOrder)); + TAO_InputCDR stream (&mb, static_cast<int> (byteOrder)); if (byteOrder == 1) ACE_DEBUG ((LM_DEBUG, @@ -723,7 +723,7 @@ cat_tag_policies (TAO_InputCDR& stream) { int byteOrder = policies[iter].pvalue[0]; TAO_InputCDR stream3 (pmbuf, policies[iter].pvalue.length(), - ACE_static_cast(int,byteOrder)); + static_cast<int> (byteOrder)); if (policies[iter].ptype == RTCORBA::PRIORITY_MODEL_POLICY_TYPE) { ACE_DEBUG ((LM_DEBUG, |