diff options
Diffstat (limited to 'TAO/examples')
41 files changed, 121 insertions, 169 deletions
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)); |