diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-03-08 20:59:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 20:59:06 +0100 |
commit | 199259c5d2d5f4a6550382a683f5d54ac482fcd1 (patch) | |
tree | 6792423092c40e0e26f9b6ed932706b4a18fcfc7 | |
parent | a2239fcbf8a7eabce628ca0841dc1eaa69a68b3d (diff) | |
parent | 0ef8b2250c1dfad5ad5361de7e92a289ead06733 (diff) | |
download | ATCD-199259c5d2d5f4a6550382a683f5d54ac482fcd1.tar.gz |
Merge pull request #1444 from jwillemsen/jwi-stdstring
Use std string operation instead of ACE_OS
95 files changed, 274 insertions, 289 deletions
diff --git a/ACE/ASNMP/tests/test_config.h b/ACE/ASNMP/tests/test_config.h index ea23390b9c9..39601b60064 100644 --- a/ACE/ASNMP/tests/test_config.h +++ b/ACE/ASNMP/tests/test_config.h @@ -59,7 +59,7 @@ #define ACE_NEW_THREAD \ do {\ ACE_LOG_MSG->msg_ostream (ace_file_stream.output_file ()); \ - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER ); \ + ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER); \ ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); \ } while (0) @@ -133,7 +133,7 @@ ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append) return -1; ACE_LOG_MSG->msg_ostream (ace_file_stream.output_file ()); - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER ); + ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); return 0; diff --git a/ACE/Kokyu/Kokyu_defs.inl b/ACE/Kokyu/Kokyu_defs.inl index a6639c429ec..b775ae93936 100644 --- a/ACE/Kokyu/Kokyu_defs.inl +++ b/ACE/Kokyu/Kokyu_defs.inl @@ -80,5 +80,5 @@ bool operator != (const Kokyu::ConfigInfo& lhs, { return (lhs.preemption_priority_ != rhs.preemption_priority_ || lhs.thread_priority_ != rhs.thread_priority_ || - lhs.dispatching_type_ != rhs.dispatching_type_ ); + lhs.dispatching_type_ != rhs.dispatching_type_); } diff --git a/ACE/ace/ATM_Acceptor.h b/ACE/ace/ATM_Acceptor.h index 788b63c4e81..b2eaf7becc8 100644 --- a/ACE/ace/ATM_Acceptor.h +++ b/ACE/ace/ATM_Acceptor.h @@ -90,7 +90,7 @@ public: ACE_ATM_QoS qos = ACE_ATM_QoS()); /// Get the local address currently listening on - int get_local_addr( ACE_ATM_Addr &local_addr ); + int get_local_addr(ACE_ATM_Addr &local_addr); // = Meta-type info typedef ACE_ATM_Addr PEER_ADDR; diff --git a/ACE/ace/ATM_Connector.cpp b/ACE/ace/ATM_Connector.cpp index 42dd0f7a725..3c866fbdc40 100644 --- a/ACE/ace/ATM_Connector.cpp +++ b/ACE/ace/ATM_Connector.cpp @@ -67,7 +67,7 @@ ACE_ATM_Connector::connect (ACE_ATM_Stream &new_stream, int result = ACE_OS::connect( s, ( struct sockaddr *)saddr, sizeof( struct sockaddr_atm ), - qos_params ); + qos_params); if ( result != 0 ) ACE_OS::printf( "ATM_Connector(connect): connection failed, %d\n", diff --git a/ACE/ace/ATM_Connector.inl b/ACE/ace/ATM_Connector.inl index e35f4085466..3980c234b2c 100644 --- a/ACE/ace/ATM_Connector.inl +++ b/ACE/ace/ATM_Connector.inl @@ -72,7 +72,7 @@ ACE_ATM_Connector::add_leaf (ACE_ATM_Stream ¤t_stream, #elif defined (ACE_HAS_FORE_ATM_WS2) struct sockaddr_atm *saddr = (struct sockaddr_atm *)remote_sap.get_addr(); ACE_QoS cqos = qos.get_qos(); - int addr_len = sizeof( struct sockaddr_atm ); + int addr_len = sizeof( struct sockaddr_atm); ACE_QoS_Params qos_params(0, 0, @@ -80,7 +80,7 @@ ACE_ATM_Connector::add_leaf (ACE_ATM_Stream ¤t_stream, 0, (JL_SENDER_ONLY)); - ACE_OS::printf( "ATM_Connector::add_leaf: connecting...\n" ); + ACE_OS::printf( "ATM_Connector::add_leaf: connecting...\n"); ACE_HANDLE result = ACE_OS::join_leaf(current_stream.get_handle(), (struct sockaddr *)saddr, diff --git a/ACE/ace/ATM_Params.h b/ACE/ace/ATM_Params.h index 0981a528e08..32ff0a99e36 100644 --- a/ACE/ace/ATM_Params.h +++ b/ACE/ace/ATM_Params.h @@ -89,70 +89,70 @@ public: ~ACE_ATM_Params (); /// Get protocol family. - int get_protocol_family (void) const; + int get_protocol_family () const; /// Set protocol family. void set_protocol_family (int); /// Get protocol. - int get_protocol (void) const; + int get_protocol () const; /// Set protocol. void set_protocol (int); /// Get type. - int get_type (void) const; + int get_type () const; /// Set type. void set_type (int); /// Get protocol info. - ACE_Protocol_Info *get_protocol_info( void ); + ACE_Protocol_Info *get_protocol_info(); /// Set protocol info. void set_protocol_info( ACE_Protocol_Info *); /// Get socket group. - ACE_SOCK_GROUP get_sock_group( void ); + ACE_SOCK_GROUP get_sock_group(); /// Set socket group. void set_sock_group( ACE_SOCK_GROUP ); /// Get socket flags. - u_long get_flags( void ); + u_long get_flags(); /// Set socket flags. - void set_flags( u_long ); + void set_flags(u_long); /// Get reuse_addr flag. - int get_reuse_addr (void) const; + int get_reuse_addr () const; /// Set reuse_addr flag. void set_reuse_addr (int); /// Get device. - const char* get_device (void) const; + const char* get_device () const; /// Get info. - Param_Info* get_info (void) const; + Param_Info* get_info () const; /// Set info. void set_info (Param_Info *); /// Get r/w flag. - int get_rw_flag (void) const; + int get_rw_flag () const; /// Set r/w flag. void set_rw_flag (int); /// Get user data. - Param_Udata* get_user_data (void) const; + Param_Udata* get_user_data () const; /// Set user data. void set_user_data (Param_Udata*); /// Get open flag. - int get_oflag (void) const; + int get_oflag () const; /// Set open flag. void set_oflag (int); diff --git a/ACE/apps/JAWS2/HTTPU/http_headers.h b/ACE/apps/JAWS2/HTTPU/http_headers.h index 839df6d7ff5..798f1c502b7 100644 --- a/ACE/apps/JAWS2/HTTPU/http_headers.h +++ b/ACE/apps/JAWS2/HTTPU/http_headers.h @@ -144,17 +144,16 @@ protected: class HTTPU_Export HTTP_Headers : public JAWS_Header_Info, public HTTP_HCodes { public: - const char *header( int name ) const; - const char *value( int name ); - const char *value_next( int name ); - void value_reset ( void ); + const char *header(int name) const; + const char *value(int name); + const char *value_next(int name); + void value_reset (); public: HTTP_Headers (void); const char *header_token (int name) const; const char *header_strings (int name) const; - }; diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp index 56f8e7ee686..63fbc5addff 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp @@ -125,7 +125,7 @@ be_visitor_valuebox_ch::visit_valuebox (be_valuebox *node) *os << "virtual ::CORBA::Boolean " << "_tao_unmarshal_v (TAO_InputCDR &);" << be_nl; *os << "virtual ::CORBA::Boolean " - << "_tao_match_formal_type (ptrdiff_t ) const;" << be_nl; + << "_tao_match_formal_type (ptrdiff_t) const;" << be_nl; // Private unimplemented default assignment operator *os << be_uidt_nl << "private:" << be_idt_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp index 97ee366b542..5dcc239871d 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp @@ -125,7 +125,7 @@ be_visitor_valuebox_cs::visit_valuebox (be_valuebox *node) // simply return true. *os << "::CORBA::Boolean" << be_nl << node->name () - << "::_tao_match_formal_type (ptrdiff_t ) const" << be_nl + << "::_tao_match_formal_type (ptrdiff_t) const" << be_nl << "{" << be_idt_nl << "return true;" << be_uidt_nl << "}" << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp index 08e9c233fbc..3694cf2e480 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp @@ -268,7 +268,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) *os << "virtual ::CORBA::Boolean " << "_tao_unmarshal_v (TAO_InputCDR &);" << be_nl; *os << "virtual ::CORBA::Boolean " - << "_tao_match_formal_type (ptrdiff_t ) const;" << be_nl; + << "_tao_match_formal_type (ptrdiff_t) const;" << be_nl; } if (be_global->gen_ostream_operators ()) diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp index f09a8cd5313..5814e1c120e 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp @@ -273,7 +273,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) // The virtual _tao_match_formal_type method. *os << "::CORBA::Boolean" << be_nl << node->name () - << "::_tao_match_formal_type (ptrdiff_t ) const" + << "::_tao_match_formal_type (ptrdiff_t) const" << be_nl << "{" << be_idt_nl << "return false;"<< be_uidt_nl diff --git a/TAO/examples/Advanced/ch_18/icp.cpp b/TAO/examples/Advanced/ch_18/icp.cpp index d06ee1dcf34..1717861115a 100644 --- a/TAO/examples/Advanced/ch_18/icp.cpp +++ b/TAO/examples/Advanced/ch_18/icp.cpp @@ -147,8 +147,7 @@ public: const StateMap::iterator & pos ) : m_pos(pos) {} bool operator()( - pair<const unsigned long, DeviceState> & p - ) const + pair<const unsigned long, DeviceState> & p) const { return( p.second.type == thermostat diff --git a/TAO/examples/Advanced/ch_18/server.h b/TAO/examples/Advanced/ch_18/server.h index bdb54aa4787..97b6ed266ba 100644 --- a/TAO/examples/Advanced/ch_18/server.h +++ b/TAO/examples/Advanced/ch_18/server.h @@ -138,8 +138,7 @@ private: const char * str ) : m_sc(sc), m_str(str) {} bool operator()( - pair<const CCS::AssetType, Thermometer_impl *> & p - ) const + pair<const CCS::AssetType, Thermometer_impl *> & p) const { char buf[32]; switch (m_sc) { diff --git a/TAO/examples/Advanced/ch_21/icp.cpp b/TAO/examples/Advanced/ch_21/icp.cpp index 892857db7b0..2cb291765f9 100644 --- a/TAO/examples/Advanced/ch_21/icp.cpp +++ b/TAO/examples/Advanced/ch_21/icp.cpp @@ -146,8 +146,7 @@ public: const StateMap::iterator & pos ) : m_pos(pos) {} bool operator()( - pair<const unsigned long, DeviceState> & p - ) const + pair<const unsigned long, DeviceState> & p) const { return( p.second.type == thermostat diff --git a/TAO/examples/Advanced/ch_21/server.h b/TAO/examples/Advanced/ch_21/server.h index 4935b052223..f0c94184bc1 100644 --- a/TAO/examples/Advanced/ch_21/server.h +++ b/TAO/examples/Advanced/ch_21/server.h @@ -140,8 +140,7 @@ private: const char * str ) : m_sc(sc), m_str(str) {} bool operator()( - CCS::AssetType anum - ) const + CCS::AssetType anum) const { char buf[32]; switch (m_sc) { diff --git a/TAO/examples/Advanced/ch_8_and_10/icp.cpp b/TAO/examples/Advanced/ch_8_and_10/icp.cpp index f93bdd4ce46..4788e48ac07 100644 --- a/TAO/examples/Advanced/ch_8_and_10/icp.cpp +++ b/TAO/examples/Advanced/ch_8_and_10/icp.cpp @@ -144,8 +144,7 @@ public: const StateMap::iterator & pos ) : m_pos(pos) {} bool operator()( - pair<const unsigned long, DeviceState> & p - ) const + pair<const unsigned long, DeviceState> & p) const { return( p.second.type == thermostat diff --git a/TAO/examples/Advanced/ch_8_and_10/server.h b/TAO/examples/Advanced/ch_8_and_10/server.h index 395c64e4382..45d0c88a980 100644 --- a/TAO/examples/Advanced/ch_8_and_10/server.h +++ b/TAO/examples/Advanced/ch_8_and_10/server.h @@ -117,8 +117,7 @@ private: const char * str ) : m_sc(sc), m_str(str) {} bool operator()( - pair<const CCS::AssetType, Thermometer_impl *> & p - ) const + pair<const CCS::AssetType, Thermometer_impl *> & p) const { switch (m_sc) { case CCS::Controller::LOCATION: diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ComponentRepository_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ComponentRepository_i.cpp index c980d2b422e..dd8769afc25 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ComponentRepository_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ComponentRepository_i.cpp @@ -113,8 +113,7 @@ TAO_ComponentRepository_i::create_servants_and_poas ( TAO_IDLType_i * TAO_ComponentRepository_i::select_idltype ( - CORBA::DefinitionKind def_kind - ) const + CORBA::DefinitionKind def_kind) const { switch (def_kind) { @@ -129,8 +128,7 @@ TAO_ComponentRepository_i::select_idltype ( TAO_Container_i * TAO_ComponentRepository_i::select_container ( - CORBA::DefinitionKind def_kind - ) const + CORBA::DefinitionKind def_kind) const { switch (def_kind) { @@ -147,8 +145,7 @@ TAO_ComponentRepository_i::select_container ( TAO_Contained_i * TAO_ComponentRepository_i::select_contained ( - CORBA::DefinitionKind def_kind - ) const + CORBA::DefinitionKind def_kind) const { switch (def_kind) { @@ -181,8 +178,7 @@ TAO_ComponentRepository_i::select_contained ( PortableServer::POA_ptr TAO_ComponentRepository_i::select_poa ( - CORBA::DefinitionKind def_kind - ) const + CORBA::DefinitionKind def_kind) const { switch (def_kind) { diff --git a/TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp b/TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp index a57cd230a60..b39aded25c9 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Refcountable.cpp @@ -32,11 +32,11 @@ public: static TAO_Notify_Tracker& get_instance(); - void add( TAO_Notify_Refcountable* p ); + void add( TAO_Notify_Refcountable* p); - void remove( const TAO_Notify_Refcountable* p ); + void remove( const TAO_Notify_Refcountable* p); - Entry find( const TAO_Notify_Refcountable* p ) const; + Entry find( const TAO_Notify_Refcountable* p) const; void dump( const char* title = 0 ); @@ -227,7 +227,7 @@ TAO_Notify_Tracker::remove( const TAO_Notify_Refcountable* p ) TAO_Notify_Tracker::Entry -TAO_Notify_Tracker::find( const TAO_Notify_Refcountable* p ) const +TAO_Notify_Tracker::find( const TAO_Notify_Refcountable* p) const { Entry e = { 0, "" }; if ( p == 0 ) return e; diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp index 78a1b0db812..3d3ae83bf82 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp @@ -395,8 +395,7 @@ RedGreen_Test_StructuredPushConsumer::~RedGreen_Test_StructuredPushConsumer ( void RedGreen_Test_StructuredPushConsumer::accumulate_into ( - ACE_Throughput_Stats &throughput - ) const + ACE_Throughput_Stats &throughput) const { throughput.accumulate (this->throughput_); } diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp index 404f031adae..90b629a2271 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp @@ -101,8 +101,7 @@ Throughput_StructuredPushSupplier::~Throughput_StructuredPushSupplier () void Throughput_StructuredPushSupplier::accumulate_into ( - ACE_Throughput_Stats &throughput - ) const + ACE_Throughput_Stats &throughput) const { throughput.accumulate (this->throughput_); } diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp index f502fe89c0d..20c35ef484f 100644 --- a/TAO/tao/Acceptor_Registry.cpp +++ b/TAO/tao/Acceptor_Registry.cpp @@ -17,6 +17,7 @@ #include "ace/Auto_Ptr.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_ctype.h" +#include <cstring> #if !defined(__ACE_INLINE__) #include "tao/Acceptor_Registry.inl" @@ -24,12 +25,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Acceptor_Registry::TAO_Acceptor_Registry () - : acceptors_ (nullptr), - size_ (0) -{ -} - TAO_Acceptor_Registry::~TAO_Acceptor_Registry () { this->close_all (); @@ -196,11 +191,11 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, // remaining number of endpoints in the current endpoint // specification. const char *ep_end = - ep->c_str () + ACE_OS::strlen (ep->c_str ()); + ep->c_str () + std::strlen (ep->c_str ()); - for (const char *e = ACE_OS::strchr (ep->c_str (), ','); + for (const char *e = std::strchr (ep->c_str (), ','); e != nullptr && e != ep_end; - e = ACE_OS::strchr (e, ',')) + e = std::strchr (e, ',')) { ++acceptor_count; ++e; diff --git a/TAO/tao/Acceptor_Registry.h b/TAO/tao/Acceptor_Registry.h index 308d9d12141..1c6b5506964 100644 --- a/TAO/tao/Acceptor_Registry.h +++ b/TAO/tao/Acceptor_Registry.h @@ -60,7 +60,7 @@ class TAO_Export TAO_Acceptor_Registry { public: /// Default constructor. - TAO_Acceptor_Registry (); + TAO_Acceptor_Registry () = default; /// Default destructor. ~TAO_Acceptor_Registry (); @@ -135,10 +135,10 @@ private: private: /// List of acceptors that are currently open. - TAO_Acceptor **acceptors_; + TAO_Acceptor **acceptors_ {}; /// Number of acceptors that are currently open. - size_t size_; + size_t size_ {}; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Adapter_Registry.cpp b/TAO/tao/Adapter_Registry.cpp index df2ab410265..9a53767886b 100644 --- a/TAO/tao/Adapter_Registry.cpp +++ b/TAO/tao/Adapter_Registry.cpp @@ -9,6 +9,7 @@ #include "ace/Log_Msg.h" #include "ace/OS_NS_string.h" #include "ace/CORBA_macros.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -171,7 +172,7 @@ TAO_Adapter_Registry::find_adapter (const char *name) const for (TAO_Adapter **i = this->adapters_; i != this->adapters_ + this->adapters_count_; ++i) - if (ACE_OS::strcmp ((*i)->name (), name) == 0) + if (std::strcmp ((*i)->name (), name) == 0) return *i; return nullptr; diff --git a/TAO/tao/AnyTypeCode/Any.cpp b/TAO/tao/AnyTypeCode/Any.cpp index da0c5d2c443..49d5bb77d6f 100644 --- a/TAO/tao/AnyTypeCode/Any.cpp +++ b/TAO/tao/AnyTypeCode/Any.cpp @@ -14,6 +14,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_wchar.h" #include "ace/OS_Memory.h" +#include <cstring> #if !defined (__ACE_INLINE__) # include "tao/AnyTypeCode/Any.inl" @@ -325,7 +326,7 @@ CORBA::Any::operator<<= (CORBA::Any::from_wchar wc) void CORBA::Any::operator<<= (CORBA::Any::from_string s) { - if (s.bound_ > 0 && s.val_ != 0 && ACE_OS::strlen (s.val_) > s.bound_) + if (s.bound_ > 0 && s.val_ != 0 && std::strlen (s.val_) > s.bound_) { return; } diff --git a/TAO/tao/AnyTypeCode/Enum_TypeCode.cpp b/TAO/tao/AnyTypeCode/Enum_TypeCode.cpp index 842d244a2b2..104275c6bf4 100644 --- a/TAO/tao/AnyTypeCode/Enum_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Enum_TypeCode.cpp @@ -8,6 +8,7 @@ #include "tao/CDR.h" #include "ace/Dynamic_Service.h" +#include <cstring> #ifndef __ACE_INLINE__ # include "tao/AnyTypeCode/Enum_TypeCode.inl" @@ -98,7 +99,7 @@ TAO::TypeCode::Enum<StringType, Traits<StringType>::get_string (lhs_enumerator); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; } diff --git a/TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp index 81af701debf..394c5dc02f1 100644 --- a/TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp @@ -7,6 +7,7 @@ #include "tao/SystemException.h" #include "ace/Dynamic_Service.h" +#include <cstring> #ifndef __ACE_INLINE__ # include "tao/AnyTypeCode/Enum_TypeCode_Static.inl" @@ -73,8 +74,7 @@ CORBA::Boolean TAO::TypeCode::Enum<char const *, char const * const *, TAO::Null_RefCount_Policy>::equal_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // This call shouldn't throw since CORBA::TypeCode::equal() verified // that the TCKind is the same as our's prior to invoking this @@ -94,7 +94,7 @@ TAO::TypeCode::Enum<char const *, Traits<char const *>::get_string (lhs_enumerator); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; } @@ -105,8 +105,7 @@ CORBA::Boolean TAO::TypeCode::Enum<char const *, char const * const *, TAO::Null_RefCount_Policy>::equivalent_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // Perform a structural comparison, excluding the name() and // member_name() operations. @@ -123,8 +122,7 @@ TAO::TypeCode::Enum<char const *, CORBA::TypeCode_ptr TAO::TypeCode::Enum<char const *, char const * const *, - TAO::Null_RefCount_Policy>::get_compact_typecode_i ( - ) const + TAO::Null_RefCount_Policy>::get_compact_typecode_i () const { ACE_Array_Base<CORBA::String_var> tc_enumerators (this->nenumerators_); @@ -160,8 +158,7 @@ TAO::TypeCode::Enum<char const *, char const * TAO::TypeCode::Enum<char const *, char const * const *, - TAO::Null_RefCount_Policy>::id_i ( - ) const + TAO::Null_RefCount_Policy>::id_i () const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. @@ -171,8 +168,7 @@ TAO::TypeCode::Enum<char const *, char const * TAO::TypeCode::Enum<char const *, char const * const *, - TAO::Null_RefCount_Policy>::name_i ( - ) const + TAO::Null_RefCount_Policy>::name_i () const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. @@ -182,8 +178,7 @@ TAO::TypeCode::Enum<char const *, CORBA::ULong TAO::TypeCode::Enum<char const *, char const * const *, - TAO::Null_RefCount_Policy>::member_count_i ( - ) const + TAO::Null_RefCount_Policy>::member_count_i () const { return this->nenumerators_; } @@ -192,8 +187,7 @@ char const * TAO::TypeCode::Enum<char const *, char const * const *, TAO::Null_RefCount_Policy>::member_name_i ( - CORBA::ULong index - ) const + CORBA::ULong index) const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. diff --git a/TAO/tao/AnyTypeCode/Objref_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Objref_TypeCode_Static.cpp index 9022c9ce878..c3edfaa1ab3 100644 --- a/TAO/tao/AnyTypeCode/Objref_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Objref_TypeCode_Static.cpp @@ -115,8 +115,7 @@ TAO::TypeCode::Objref<char const *, } char const * -TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy>::id_i ( - ) const +TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy>::id_i () const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. @@ -124,8 +123,7 @@ TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy>::id_i ( } char const * -TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy>::name_i ( - ) const +TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy>::name_i () const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. diff --git a/TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp index ebba0d9ea31..dd9782fba95 100644 --- a/TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp @@ -61,8 +61,7 @@ TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, CORBA::Boolean TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy>::equal_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // The following calls won't throw since CORBA::TypeCode::equal() // has already established the kind of tc is the same as our kind. @@ -82,8 +81,7 @@ TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, CORBA::Boolean TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, TAO::Null_RefCount_Policy>::equivalent_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // The following calls won't throw since CORBA::TypeCode::equal() // has already established the kind of tc is the same as our kind. @@ -102,8 +100,7 @@ TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, CORBA::TypeCode_ptr TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, - TAO::Null_RefCount_Policy>::get_compact_typecode_i ( - ) const + TAO::Null_RefCount_Policy>::get_compact_typecode_i () const { // Already compact since tk_sequence and tk_array TypeCodes have no // name or member names, meaning that we can simply call @@ -122,16 +119,14 @@ TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, CORBA::ULong TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, - TAO::Null_RefCount_Policy>::length_i ( - ) const + TAO::Null_RefCount_Policy>::length_i () const { return this->length_; } CORBA::TypeCode_ptr TAO::TypeCode::Sequence<CORBA::TypeCode_ptr const *, - TAO::Null_RefCount_Policy>::content_type_i ( - ) const + TAO::Null_RefCount_Policy>::content_type_i () const { return CORBA::TypeCode::_duplicate ( diff --git a/TAO/tao/AnyTypeCode/String_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/String_TypeCode_Static.cpp index 83f28c3add9..47d0eaacbd3 100644 --- a/TAO/tao/AnyTypeCode/String_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/String_TypeCode_Static.cpp @@ -46,8 +46,7 @@ TAO::TypeCode::String<TAO::Null_RefCount_Policy>::equal_i ( CORBA::Boolean TAO::TypeCode::String<TAO::Null_RefCount_Policy>::equivalent_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // Since TCKind comparisons must be performed before equal_i() is // called, we can also call it to determine equivalence of @@ -56,8 +55,7 @@ TAO::TypeCode::String<TAO::Null_RefCount_Policy>::equivalent_i ( } CORBA::TypeCode_ptr -TAO::TypeCode::String<TAO::Null_RefCount_Policy>::get_compact_typecode_i ( - ) const +TAO::TypeCode::String<TAO::Null_RefCount_Policy>::get_compact_typecode_i () const { // Already compact since tk_string and tk_wstring TypeCodes have no // name or member names, meaning that we can simply call @@ -70,8 +68,7 @@ TAO::TypeCode::String<TAO::Null_RefCount_Policy>::get_compact_typecode_i ( } CORBA::ULong -TAO::TypeCode::String<TAO::Null_RefCount_Policy>::length_i ( - ) const +TAO::TypeCode::String<TAO::Null_RefCount_Policy>::length_i () const { return this->length_; } diff --git a/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp b/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp index a258a8c5229..882ddd9bfef 100644 --- a/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp @@ -147,7 +147,7 @@ TAO::TypeCode::Struct<StringType, Traits<StringType>::get_string (lhs_field.name); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; CORBA::TypeCode_ptr const lhs_tc = diff --git a/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp index fb6853c958e..dc4a18a18b7 100644 --- a/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp @@ -13,6 +13,7 @@ #include "ace/Dynamic_Service.h" #include "ace/Truncate.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -123,7 +124,7 @@ TAO::TypeCode::Struct<char const *, Traits<char const *>::get_string (lhs_field.name); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; CORBA::TypeCode_ptr const lhs_tc = @@ -180,8 +181,7 @@ TAO::TypeCode::Struct<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy>::get_compact_typecode_i ( - ) const + TAO::Null_RefCount_Policy>::get_compact_typecode_i () const { ACE_Array_Base<Struct_Field<CORBA::String_var, CORBA::TypeCode_var> > @@ -228,8 +228,7 @@ TAO::TypeCode::Struct<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy>::id_i ( - ) const + TAO::Null_RefCount_Policy>::id_i () const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. diff --git a/TAO/tao/AnyTypeCode/TypeCode.cpp b/TAO/tao/AnyTypeCode/TypeCode.cpp index 53108bd3b91..15de05e890b 100644 --- a/TAO/tao/AnyTypeCode/TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode.cpp @@ -10,6 +10,7 @@ #include "tao/SystemException.h" #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -46,14 +47,14 @@ CORBA::TypeCode::equal (TypeCode_ptr tc) const char const * const this_id = this->id (); - if (ACE_OS::strcmp (this_id, tc_id) != 0) + if (std::strcmp (this_id, tc_id) != 0) return false; char const * const tc_name = tc->name (); char const * const this_name = this->name (); - if (ACE_OS::strcmp (this_name, tc_name) != 0) + if (std::strcmp (this_name, tc_name) != 0) return false; } catch (const ::CORBA::TypeCode::BadKind&) @@ -96,10 +97,10 @@ CORBA::TypeCode::equivalent (TypeCode_ptr tc) const char const * const this_id = unaliased_this->id (); char const * const tc_id = unaliased_tc->id (); - if (ACE_OS::strlen (this_id) != 0 - && ACE_OS::strlen (tc_id) != 0) + if (std::strlen (this_id) != 0 + && std::strlen (tc_id) != 0) { - return ACE_OS::strcmp (this_id, tc_id) == 0; + return std::strcmp (this_id, tc_id) == 0; } } catch (const ::CORBA::TypeCode::BadKind&) diff --git a/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp b/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp index e80e1c653a4..3b8c0110947 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp @@ -27,6 +27,7 @@ #include "ace/Array_Base.h" #include "ace/Value_Ptr.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -160,7 +161,7 @@ namespace { TAO::TypeCodeFactory::TC_Info & info = infos[i]; - if (ACE_OS::strcmp (info.id, id) == 0) + if (std::strcmp (info.id, id) == 0) { // We have a matching id, so store the TypeCode in the out // array and then compare the others. @@ -396,7 +397,7 @@ TAO::TypeCodeFactory::tc_objref_factory (CORBA::TCKind kind, break; } - if (ACE_OS::strcmp (id.in (), // len >= 0!!! + if (std::strcmp (id.in (), // len >= 0!!! tc_constant_id) == 0) { if (!cdr.skip_string ()) // No need to demarshal the name. diff --git a/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp b/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp index f383c79659d..76bd27168bb 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp @@ -3,6 +3,7 @@ #include "tao/AnyTypeCode/TypeCode_Case_Base_T.h" #include "ace/OS_NS_string.h" +#include <cstring> #ifndef __ACE_INLINE__ # include "tao/AnyTypeCode/TypeCode_Case_Base_T.inl" @@ -24,7 +25,7 @@ TAO::TypeCode::Case<StringType, TypeCodeType>::equal (CORBA::ULong index, char const * const lhs_name = this->name (); char const * const rhs_name = tc->member_name (index); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; // Check case TypeCodes. diff --git a/TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp index c267a8f0dd8..bdbe062ff12 100644 --- a/TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp @@ -97,8 +97,7 @@ TAO::TypeCode::Union<char const *, TAO::TypeCode::Case<char const *, CORBA::TypeCode_ptr const *> const * const *, TAO::Null_RefCount_Policy>::equal_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // These calls shouldn't throw since CORBA::TypeCode::equal() // verified that the TCKind is the same as our's prior to invoking @@ -197,8 +196,7 @@ TAO::TypeCode::Union<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Case<char const *, CORBA::TypeCode_ptr const *> const * const *, - TAO::Null_RefCount_Policy>::get_compact_typecode_i ( - ) const + TAO::Null_RefCount_Policy>::get_compact_typecode_i () const { // typedef ACE::Value_Ptr<TAO::TypeCode::Case<CORBA::String_var, // CORBA::TypeCode_var> > elem_type; diff --git a/TAO/tao/AnyTypeCode/Value_TypeCode.cpp b/TAO/tao/AnyTypeCode/Value_TypeCode.cpp index 79e5fb02c9d..32e79789204 100644 --- a/TAO/tao/AnyTypeCode/Value_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Value_TypeCode.cpp @@ -145,8 +145,7 @@ TAO::TypeCode::Value<StringType, TypeCodeType, FieldArrayType, RefCountPolicy>::equal_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // None of these calls should throw since CORBA::TypeCode::equal() // verified that the TCKind is the same as our's prior to invoking @@ -188,7 +187,7 @@ TAO::TypeCode::Value<StringType, Traits<StringType>::get_string (lhs_field.name); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; CORBA::TypeCode_ptr const lhs_tc = diff --git a/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp index 293192bb0b5..8745c4ffb63 100644 --- a/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp @@ -9,6 +9,7 @@ #include "ace/Dynamic_Service.h" #include "ace/Truncate.h" +#include <cstring> #ifndef __ACE_INLINE__ # include "tao/AnyTypeCode/Value_TypeCode_Static.inl" @@ -146,7 +147,7 @@ TAO::TypeCode::Value<char const *, Traits<char const *>::get_string (lhs_field.name);; char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; CORBA::TypeCode_ptr const lhs_tc = @@ -223,8 +224,7 @@ TAO::TypeCode::Value<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy>::get_compact_typecode_i ( - ) const + TAO::Null_RefCount_Policy>::get_compact_typecode_i () const { ACE_Array_Base<Value_Field<CORBA::String_var, CORBA::TypeCode_var> > tc_fields (this->nfields_); @@ -364,8 +364,7 @@ TAO::TypeCode::Value<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy>::concrete_base_type_i ( - ) const + TAO::Null_RefCount_Policy>::concrete_base_type_i () const { return CORBA::TypeCode::_duplicate ( diff --git a/TAO/tao/Block_Flushing_Strategy.h b/TAO/tao/Block_Flushing_Strategy.h index d8a593be810..feca0f059e3 100644 --- a/TAO/tao/Block_Flushing_Strategy.h +++ b/TAO/tao/Block_Flushing_Strategy.h @@ -36,13 +36,13 @@ namespace TAO class TAO_Block_Flushing_Strategy : public TAO_Flushing_Strategy { public: - virtual int schedule_output (TAO_Transport *transport); - virtual int cancel_output (TAO_Transport *transport); - virtual int flush_message (TAO_Transport *transport, - TAO_Queued_Message *msg, - ACE_Time_Value *max_wait_time); - virtual int flush_transport (TAO_Transport *transport - , ACE_Time_Value *max_wait_time); + int schedule_output (TAO_Transport *transport) override; + int cancel_output (TAO_Transport *transport) override; + int flush_message (TAO_Transport *transport, + TAO_Queued_Message *msg, + ACE_Time_Value *max_wait_time) override; + int flush_transport (TAO_Transport *transport + , ACE_Time_Value *max_wait_time) override; private: int call_handle_output (TAO_Transport *transport, diff --git a/TAO/tao/Blocked_Connect_Strategy.h b/TAO/tao/Blocked_Connect_Strategy.h index df6e230a09f..404eb2d3be7 100644 --- a/TAO/tao/Blocked_Connect_Strategy.h +++ b/TAO/tao/Blocked_Connect_Strategy.h @@ -36,12 +36,12 @@ public: * Concrete implementation for this class. Please see * Connect_Strategy.h for details */ - virtual void synch_options (ACE_Time_Value *val, ACE_Synch_Options &opt); + void synch_options (ACE_Time_Value *val, ACE_Synch_Options &opt) override; protected: - virtual int wait_i (TAO_LF_Event *ev, - TAO_Transport *t, - ACE_Time_Value *val); + int wait_i (TAO_LF_Event *ev, + TAO_Transport *t, + ACE_Time_Value *val) override; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/CDR.inl b/TAO/tao/CDR.inl index 38b70f01019..0bbc9aa51a3 100644 --- a/TAO/tao/CDR.inl +++ b/TAO/tao/CDR.inl @@ -1,5 +1,6 @@ // -*- C++ -*- #include "tao/SystemException.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -432,7 +433,7 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os, ACE_OutputCDR::from_string x) { if (x.bound_ != 0 && x.val_ != 0 && - ACE_OS::strlen (x.val_) > x.bound_) + std::strlen (x.val_) > x.bound_) { throw CORBA::BAD_PARAM (); } @@ -568,7 +569,7 @@ ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Boolean const marshal_flag = is >> const_cast<ACE_CDR::Char *&> (x.val_); if (marshal_flag && x.bound_ != 0 && x.val_ != 0 && - ACE_OS::strlen (x.val_) > x.bound_) + std::strlen (x.val_) > x.bound_) { throw CORBA::BAD_PARAM (); } diff --git a/TAO/tao/CORBALOC_Parser.cpp b/TAO/tao/CORBALOC_Parser.cpp index 810ef41d818..2ab88c2c38a 100644 --- a/TAO/tao/CORBALOC_Parser.cpp +++ b/TAO/tao/CORBALOC_Parser.cpp @@ -22,6 +22,8 @@ #include "tao/CORBALOC_Parser.inl" #endif /* __ACE_INLINE__ */ +#include <cstring> + static const char prefix[] = "corbaloc:"; static const size_t prefix_len = sizeof prefix - 1; static const char rir_token[] = "rir:"; @@ -106,7 +108,7 @@ TAO_CORBALOC_Parser::parse_string (const char * ior, CORBA::ORB_ptr orb) // Skip the prefix. We know it is there because this method is only // called if match_prefix() returns 1. - ior += ACE_OS::strlen(prefix); + ior += std::strlen(prefix); // First check for rir if (ACE_OS::strncmp (ior,rir_token,rir_token_len) == 0) @@ -116,9 +118,9 @@ TAO_CORBALOC_Parser::parse_string (const char * ior, CORBA::ORB_ptr orb) // most likely commas will separate endpoints, although they could be // part of an endpoint address for some protocols. size_t max_endpoint_count = 1; - for (const char *comma = ACE_OS::strchr (ior,','); + for (const char *comma = std::strchr (ior,','); comma; - comma = ACE_OS::strchr (comma+1,',')) + comma = std::strchr (comma+1,',')) ++max_endpoint_count; ACE_Array<parsed_endpoint> endpoints(max_endpoint_count); @@ -234,7 +236,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, size_t prot_addr_len, ACE_CString &canonical_endpoint) { - const char *separator = ACE_OS::strchr (ior, ':'); + const char *separator = std::strchr (ior, ':'); // A special case for handling iiop if (ior[0] != ':' && ACE_OS::strncmp (ior,iiop_token,iiop_token_len) != 0) @@ -247,7 +249,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, const char *addr_base = separator+1; const char *addr_tail = ior + prot_addr_len; // skip past version, if any - separator = ACE_OS::strchr (addr_base,'@'); + separator = std::strchr (addr_base,'@'); if (separator != nullptr && separator < addr_tail) { canonical_endpoint.set (addr_base,(separator - addr_base)+1,1); @@ -258,7 +260,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, ACE_CString raw_host; ACE_CString raw_port; - separator = ACE_OS::strchr (addr_base,':'); + separator = std::strchr (addr_base,':'); #if defined (ACE_HAS_IPV6) // IPv6 numeric address in host string? @@ -267,7 +269,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - const char *cp_pos = ACE_OS::strchr(addr_base, ']'); + const char *cp_pos = std::strchr(addr_base, ']'); if (cp_pos == 0 || cp_pos >= addr_tail) { // No valid IPv6 address specified but that will come out later. diff --git a/TAO/tao/CORBA_String.inl b/TAO/tao/CORBA_String.inl index c1e125fc657..0b220be52bd 100644 --- a/TAO/tao/CORBA_String.inl +++ b/TAO/tao/CORBA_String.inl @@ -1,5 +1,6 @@ // -*- C++ -*- #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -7,7 +8,7 @@ ACE_INLINE bool TAO::String_Var_Equal_To::operator() (CORBA::String_var const & lhs, CORBA::String_var const & rhs) const { - return (ACE_OS::strcmp (lhs.in (), rhs.in ()) == 0); + return (std::strcmp (lhs.in (), rhs.in ()) == 0); } ACE_INLINE bool diff --git a/TAO/tao/Codeset/Codeset_Manager_i.h b/TAO/tao/Codeset/Codeset_Manager_i.h index 8e7c49ead32..4d801b97c85 100644 --- a/TAO/tao/Codeset/Codeset_Manager_i.h +++ b/TAO/tao/Codeset/Codeset_Manager_i.h @@ -72,7 +72,7 @@ public: /// Called by an object of TAO_Acceptor to set NCS and CCS values /// for Char/Wchar in to the Object Reference. - void set_codeset (TAO_Tagged_Components& ) const; + void set_codeset (TAO_Tagged_Components&) const; /// /// Called from an object of "TAO_GIOP_Invocation" to set TCS on the /// Transport diff --git a/TAO/tao/Codeset/Codeset_Translator_Factory.h b/TAO/tao/Codeset/Codeset_Translator_Factory.h index 45b418ac4a6..422d6bfe10f 100644 --- a/TAO/tao/Codeset/Codeset_Translator_Factory.h +++ b/TAO/tao/Codeset/Codeset_Translator_Factory.h @@ -63,22 +63,22 @@ protected: /// will have a translator that is based on either the Char or Wchar /// translator, so the compiler will select the appropriate call from /// assign(). - void assign_i (TAO_InputCDR *, ACE_Char_Codeset_Translator* ) const; + void assign_i (TAO_InputCDR *, ACE_Char_Codeset_Translator*) const; /// Assign the translator to the supplied input CDR. The template instance /// will have a translator that is based on either the Char or Wchar /// translator, so the compiler will select the appropriate call from /// assign(). - void assign_i (TAO_InputCDR *, ACE_WChar_Codeset_Translator* ) const; + void assign_i (TAO_InputCDR *, ACE_WChar_Codeset_Translator*) const; /// Assign the translator to the supplied output CDR. The template instance /// will have a translator that is based on either the Char or Wchar /// translator, so the compiler will select the appropriate call from /// assign(). - void assign_i (TAO_OutputCDR *, ACE_Char_Codeset_Translator* ) const; + void assign_i (TAO_OutputCDR *, ACE_Char_Codeset_Translator*) const; /// Assign the translator to the supplied output CDR. The template instance /// will have a translator that is based on either the Char or Wchar /// translator, so the compiler will select the appropriate call from /// assign(). - void assign_i (TAO_OutputCDR *, ACE_WChar_Codeset_Translator* ) const; + void assign_i (TAO_OutputCDR *, ACE_WChar_Codeset_Translator*) const; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Codeset_Manager.h b/TAO/tao/Codeset_Manager.h index 0a39d7b3d90..dc1f2cda99a 100644 --- a/TAO/tao/Codeset_Manager.h +++ b/TAO/tao/Codeset_Manager.h @@ -66,7 +66,7 @@ public: /// Called by an object of TAO_Acceptor to set NCS and CCS values for /// Char/Wchar in to the Object Reference. - virtual void set_codeset (TAO_Tagged_Components& ) const = 0; + virtual void set_codeset (TAO_Tagged_Components&) const = 0; /// Called from an object of "TAO_GIOP_Invocation" to set TCS on the /// Transport diff --git a/TAO/tao/Collocated_Invocation.h b/TAO/tao/Collocated_Invocation.h index 41dfc3b23ac..bec4d7e70b1 100644 --- a/TAO/tao/Collocated_Invocation.h +++ b/TAO/tao/Collocated_Invocation.h @@ -84,7 +84,7 @@ namespace TAO private: // Disallow default construction. - Collocated_Invocation (void); + Collocated_Invocation () = delete; }; } diff --git a/TAO/tao/Collocation_Resolver.h b/TAO/tao/Collocation_Resolver.h index 9f405446b18..c3360654e0e 100644 --- a/TAO/tao/Collocation_Resolver.h +++ b/TAO/tao/Collocation_Resolver.h @@ -44,7 +44,7 @@ class TAO_Export TAO_Collocation_Resolver { public: /// Destructor. - virtual ~TAO_Collocation_Resolver (void); + virtual ~TAO_Collocation_Resolver (); /// Is @a object collocated? virtual CORBA::Boolean is_collocated (CORBA::Object_ptr object) const = 0; diff --git a/TAO/tao/DynamicAny/DynCommon.cpp b/TAO/tao/DynamicAny/DynCommon.cpp index d101bd51339..a9b0606205a 100644 --- a/TAO/tao/DynamicAny/DynCommon.cpp +++ b/TAO/tao/DynamicAny/DynCommon.cpp @@ -20,6 +20,7 @@ #include "ace/OS_NS_wchar.h" #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -158,7 +159,7 @@ TAO_DynCommon::insert_string (const char * value) CORBA::ULong const bound = unaliased_tc->length (); - if (bound > 0 && bound < ACE_OS::strlen (value)) + if (bound > 0 && bound < std::strlen (value)) { throw DynamicAny::DynAny::InvalidValue (); } diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp index 1dcca1819aa..359589118cf 100644 --- a/TAO/tao/DynamicInterface/Request.cpp +++ b/TAO/tao/DynamicInterface/Request.cpp @@ -20,6 +20,7 @@ # include "tao/DynamicInterface/Request.inl" #endif /* ! __ACE_INLINE__ */ +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -139,7 +140,7 @@ CORBA::Request::invoke (void) _tao_arg_list, sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), this->opname_, - static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), + static_cast<CORBA::ULong> (std::strlen (this->opname_)), this->exceptions_.in (), this); @@ -177,7 +178,7 @@ CORBA::Request::send_oneway (void) _tao_arg_list, sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), this->opname_, - static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), + static_cast<CORBA::ULong> (std::strlen (this->opname_)), TAO::TAO_SYNCHRONOUS_INVOCATION); // forward requested byte order @@ -220,7 +221,7 @@ CORBA::Request::send_deferred (void) _tao_arg_list, static_cast<int> (number_args), this->opname_, - ACE_OS::strlen (this->opname_), + std::strlen (this->opname_), 0, this->orb_->orb_core (), this); @@ -250,7 +251,7 @@ CORBA::Request::sendc (CORBA::Object_ptr handler) _tao_arg_list, sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), const_cast<char *> (this->opname_), - static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), + static_cast<CORBA::ULong> (std::strlen (this->opname_)), 0); // collocation proxy broker // forward requested byte order diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp index 3775c7789be..d5bb7996fa8 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp @@ -11,6 +11,7 @@ #include "tao/SystemException.h" #include "ace/Log_Msg.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -81,7 +82,7 @@ TAO_GIOP_Message_Generator_Parser_10::write_request_header ( if (result != 0) { const CORBA::ULong username_size = - static_cast<CORBA::ULong> (ACE_OS::strlen (username)); + static_cast<CORBA::ULong> (std::strlen (username)); CORBA::Octet *buffer = CORBA::OctetSeq::allocbuf (username_size + 1); diff --git a/TAO/tao/HTTP_Handler.cpp b/TAO/tao/HTTP_Handler.cpp index 5c70d7425b9..87d6184c7a2 100644 --- a/TAO/tao/HTTP_Handler.cpp +++ b/TAO/tao/HTTP_Handler.cpp @@ -6,6 +6,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_strings.h" #include "tao/debug.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -87,9 +88,9 @@ TAO_HTTP_Reader::send_request () char mesg [MAX_HEADER_SIZE]; // Check to see if the request is too big - if (MAX_HEADER_SIZE < (ACE_OS::strlen (request_prefix_) + if (MAX_HEADER_SIZE < (std::strlen (request_prefix_) + ACE_OS::strlen (filename_) - + ACE_OS::strlen (request_suffix_) + 4)) + + std::strlen (request_suffix_) + 4)) TAOLIB_ERROR_RETURN((LM_ERROR,"TAO (%P|%t) - HTTP_Reader::send_request, request too large!"), -1); // Create a message to send to the server requesting retrieval of the file diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 659eff78a96..682bbf03b0b 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -17,6 +17,7 @@ #include "ace/OS_NS_string.h" #include "ace/os_include/os_netdb.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -654,7 +655,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address, specified_hostname.clear(); } - const char *port_separator_loc = ACE_OS::strchr (address, ':'); + const char *port_separator_loc = std::strchr (address, ':'); char tmp_host[MAXHOSTNAMELEN + 1]; tmp_host[0] = '\0'; bool host_defaulted = port_separator_loc == address; @@ -671,7 +672,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address, { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - char const * const cp_pos = ACE_OS::strchr (address, ']'); + char const * const cp_pos = std::strchr (address, ']'); if (cp_pos == 0) { // No valid IPv6 address specified. diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index 166cdb505a9..aab4244dcd2 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -19,6 +19,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_time.h" #include "ace/CORBA_macros.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -730,12 +731,12 @@ TAO_IIOP_Connector::check_prefix (const char *endpoint) static const char *protocol[] = { "iiop", "iioploc" }; - size_t const slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; if (slot == 0) // an empty string is valid for corbaloc. return 0; - size_t const len0 = ACE_OS::strlen (protocol[0]); - size_t const len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp index 8ec0fde8237..3f4dbfc101c 100644 --- a/TAO/tao/IIOP_Endpoint.cpp +++ b/TAO/tao/IIOP_Endpoint.cpp @@ -24,6 +24,7 @@ #include "ace/ACE.h" #include "ace/INET_Addr.h" #include "ace/Sock_Connect.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -190,7 +191,7 @@ TAO_IIOP_Endpoint::addr_to_string (char *buffer, size_t length) size_t actual_len = ACE_OS::strlen (this->host_.in ()) // chars in host name + sizeof (':') // delimiter - + ACE_OS::strlen ("65536") // max port + + std::strlen ("65536") // max port + sizeof ('\0'); #if defined (ACE_HAS_IPV6) @@ -218,7 +219,7 @@ TAO_IIOP_Endpoint::host (const char *h) { this->host_ = h; #if defined (ACE_HAS_IPV6) - if (ACE_OS::strchr (h, ':') != 0) + if (std::strchr (h, ':') != 0) this->is_ipv6_decimal_ = true; #endif /* ACE_HAS_IPV6 */ @@ -347,7 +348,7 @@ TAO_IIOP_Endpoint::object_addr_i () const if (!this->is_ipv6_decimal_) is_ipv4_decimal_ = ACE_OS::strspn (this->host_.in (), ".0123456789") == - ACE_OS::strlen (this->host_.in ()); + std::strlen (this->host_.in ()); // If this is *not* an IPv4 decimal address at first try to // resolve the address as an IPv6 address; if that fails diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp index a33b42085e7..64358da1313 100644 --- a/TAO/tao/IIOP_Profile.cpp +++ b/TAO/tao/IIOP_Profile.cpp @@ -12,6 +12,7 @@ #include "ace/OS_NS_stdio.h" #include "ace/Truncate.h" #include "ace/os_include/os_netdb.h" +#include <cstring> static const char the_prefix[] = "iiop"; @@ -128,7 +129,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) // Pull off the "hostname:port/" part of the objref // Copy the string because we are going to modify it... - const char *okd = ACE_OS::strchr (ior, this->object_key_delimiter_); + const char *okd = std::strchr (ior, this->object_key_delimiter_); if (okd == nullptr || okd == ior) { @@ -143,7 +144,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) // Length of host string. CORBA::ULong length_host = 0; - const char *cp_pos_overrun = ACE_OS::strchr (ior, ':'); // Look for a port + const char *cp_pos_overrun = std::strchr (ior, ':'); // Look for a port const char *cp_pos = (cp_pos_overrun < okd) ? cp_pos_overrun : nullptr; // but before object key #if defined (ACE_HAS_IPV6) // IPv6 numeric address in host string? @@ -157,7 +158,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - const char *cp_pos_a_overrun = ACE_OS::strchr(ior, ']'); + const char *cp_pos_a_overrun = std::strchr(ior, ']'); const char *cp_pos_a = (cp_pos_a_overrun < okd) ? cp_pos_a_overrun : 0; // before object key if (cp_pos_a == 0) { @@ -482,9 +483,9 @@ TAO_IIOP_Profile::to_string () const 8 /* "corbaloc" */ + 1 /* colon separator */ + 1 /* object key separator */ + - ACE_OS::strlen (key.in ())); + std::strlen (key.in ())); size_t const pfx_len = ( - ACE_OS::strlen (::the_prefix) /* "iiop" */ + + std::strlen (::the_prefix) /* "iiop" */ + 1 /* colon separator */); const TAO_IIOP_Endpoint *endp = nullptr; @@ -496,7 +497,7 @@ TAO_IIOP_Profile::to_string () const 1 /* decimal point */ + 1 /* minor version */ + 1 /* `@' character */ + - ACE_OS::strlen (endp->host ()) + + std::strlen (endp->host ()) + 1 /* colon separator */ + 5 /* port number */ + 1 /* comma */); @@ -528,7 +529,7 @@ TAO_IIOP_Profile::to_string () const tmp = tmp.substr(0, pos + 1); tmp[pos] = '\0'; } - ACE_OS::sprintf (buf + ACE_OS::strlen(buf), + ACE_OS::sprintf (buf + std::strlen(buf), "%s:%c.%c@[%s]:%d", ::the_prefix, digits [this->version_.major], @@ -538,7 +539,7 @@ TAO_IIOP_Profile::to_string () const } else #endif - ACE_OS::sprintf (buf + ACE_OS::strlen(buf), + ACE_OS::sprintf (buf + std::strlen(buf), "%s:%c.%c@%s:%d", ::the_prefix, digits [this->version_.major], @@ -547,7 +548,7 @@ TAO_IIOP_Profile::to_string () const endp->port () ); } - ACE_OS::sprintf (buf + ACE_OS::strlen(buf), + ACE_OS::sprintf (buf + std::strlen(buf), "%c%s", this->object_key_delimiter_, key.in ()); @@ -577,7 +578,7 @@ TAO_IIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const const char* host = 0; const char* pos = 0; if (this->endpoint_.is_ipv6_decimal_ && - (pos = ACE_OS::strchr (host = this->endpoint_.host (), '%')) != 0) + (pos = std::strchr (host = this->endpoint_.host (), '%')) != 0) { ACE_CString tmp; size_t len = pos - host; @@ -634,7 +635,7 @@ TAO_IIOP_Profile::encode_alternate_endpoints () const char* host = 0; const char* pos = 0; if (endpoint->is_ipv6_decimal_ && - (pos = ACE_OS::strchr (host = endpoint->host (), '%')) != 0) + (pos = std::strchr (host = endpoint->host (), '%')) != 0) { ACE_CString tmp; size_t len = pos - host; diff --git a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp index 5f15990b92d..0e1df9788a3 100644 --- a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp +++ b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp @@ -6,6 +6,7 @@ #include "tao/IIOP_Profile.h" #include "tao/MProfile.h" #include "tao/CDR.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -165,7 +166,7 @@ TAO_IORManip_IIOP_Filter::fill_profile_info ( char host[host_length] = ""; if (profile->endpoint ()->addr_to_string (host, host_length) != -1) { - char* delim = ACE_OS::strchr (host, ':'); + char* delim = std::strchr (host, ':'); if (delim != 0) { *delim = '\0'; diff --git a/TAO/tao/ImR_Client/ImR_Client.cpp b/TAO/tao/ImR_Client/ImR_Client.cpp index b98d874ccae..a2c429cb4a3 100644 --- a/TAO/tao/ImR_Client/ImR_Client.cpp +++ b/TAO/tao/ImR_Client/ImR_Client.cpp @@ -10,6 +10,7 @@ #include "tao/ImR_Client/ServerObject_i.h" #include "tao/ImR_Client/ImplRepoC.h" #include "tao/IORManipulation/IORManip_Loader.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -21,9 +22,8 @@ namespace // should be protocol neutral. const char corbaloc[] = "corbaloc:"; char *pos = ACE_OS::strstr (ior, corbaloc); - pos = ACE_OS::strchr (pos + sizeof (corbaloc), ':'); - - pos = ACE_OS::strchr (pos + 1, delimiter); + pos = std::strchr (pos + sizeof (corbaloc), ':'); + pos = std::strchr (pos + 1, delimiter); return pos; } diff --git a/TAO/tao/MCAST_Parser.cpp b/TAO/tao/MCAST_Parser.cpp index 101a9c54238..a9b44d460df 100644 --- a/TAO/tao/MCAST_Parser.cpp +++ b/TAO/tao/MCAST_Parser.cpp @@ -12,6 +12,7 @@ #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" #include "ace/Truncate.h" +#include <cstring> #if !defined(__ACE_INLINE__) #include "tao/MCAST_Parser.inl" @@ -203,7 +204,7 @@ TAO_MCAST_Parser::multicast_query (char* & buf, CORBA::Short data_len = (CORBA::Short) ACE_HTONS ( ACE_Utils::truncate_cast<ACE_UINT16> ( - ACE_OS::strlen (service_name) + 1)); + std::strlen (service_name) + 1)); // Vector we will send. It contains: 1) length of service // name string, 2)port on which we are listening for @@ -222,7 +223,7 @@ TAO_MCAST_Parser::multicast_query (char* & buf, // The service name string. iovp[2].iov_base = (char *) service_name; iovp[2].iov_len = - static_cast<u_long> (ACE_OS::strlen (service_name) + 1); + static_cast<u_long> (std::strlen (service_name) + 1); // Send the multicast. result = dgram.send (iovp, diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 70f9681685e..f5dde223670 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -38,6 +38,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_ctype.h" #include "ace/CORBA_macros.h" +#include <cstring> static const char ior_prefix[] = "IOR:"; @@ -950,7 +951,7 @@ CORBA::ORB::resolve_initial_references (const char *name, CORBA::String_var ior_env_var_name = CORBA::string_alloc ( - static_cast<CORBA::ULong> (ACE_OS::strlen (name) + sizeof (ior_string))); + static_cast<CORBA::ULong> (std::strlen (name) + sizeof (ior_string))); ACE_OS::strcpy (ior_env_var_name.inout (), name); @@ -1005,7 +1006,7 @@ CORBA::ORB::resolve_initial_references (const char *name, void CORBA::ORB::register_initial_reference (const char * id, CORBA::Object_ptr obj) { - if (id == nullptr || ACE_OS::strlen (id) == 0) + if (id == nullptr || std::strlen (id) == 0) throw ::CORBA::ORB::InvalidName (); if (CORBA::is_nil (obj)) @@ -1020,7 +1021,7 @@ CORBA::ORB::register_initial_reference (const char * id, CORBA::Object_ptr obj) CORBA::Object_ptr CORBA::ORB::unregister_initial_reference (const char * id) { - if (id == nullptr || ACE_OS::strlen (id) == 0) + if (id == nullptr || std::strlen (id) == 0) throw ::CORBA::ORB::InvalidName (); TAO_Object_Ref_Table &table = this->orb_core_->object_ref_table (); @@ -1616,7 +1617,7 @@ CORBA::ORB::ior_string_to_object (const char *str) { // Unhex the bytes, and make a CDR deencapsulation stream from the // resulting data. - ACE_Message_Block mb (ACE_OS::strlen (str) / 2 + 1 + ACE_Message_Block mb (std::strlen (str) / 2 + 1 + ACE_CDR::MAX_ALIGNMENT + 1); ACE_CDR::mb_align (&mb); diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index cb2d45bff86..4073819bfd0 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -65,6 +65,7 @@ #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" #include "ace/Message_Block.h" +#include <cstring> #if TAO_HAS_INTERCEPTORS == 1 # include "tao/ClientRequestInterceptor_Adapter.h" @@ -73,7 +74,6 @@ # include "tao/ServerRequestInterceptor_Adapter_Factory.h" #endif /* TAO_HAS_INTERCEPTORS == 1 */ - #if !defined (__ACE_INLINE__) # include "tao/ORB_Core.inl" #endif /* ! __ACE_INLINE__ */ @@ -2870,7 +2870,7 @@ TAO_ORB_Core::resolve_rir (const char *name) this->orb_params ()->default_init_ref (); // Check if a DefaultInitRef was specified. - if (ACE_OS::strlen (default_init_ref.in ()) != 0) + if (std::strlen (default_init_ref.in ()) != 0) { static const char corbaloc_prefix[] = "corbaloc:"; static const char mcast_prefix[] = "mcast:"; diff --git a/TAO/tao/Object_KeyC.cpp b/TAO/tao/Object_KeyC.cpp index dc0c4745f8d..6b147b6bb59 100644 --- a/TAO/tao/Object_KeyC.cpp +++ b/TAO/tao/Object_KeyC.cpp @@ -34,6 +34,7 @@ #include "ace/Truncate.h" #include "ace/OS_NS_string.h" #include "ace/os_include/os_ctype.h" +#include <cstring> // TAO_IDL - Generated from // be\be_visitor_arg_traits.cpp:70 @@ -149,7 +150,7 @@ TAO::ObjectKey::decode_string_to_sequence ( return; } - size_t const str_len = ACE_OS::strlen (str); + size_t const str_len = std::strlen (str); // Ensure sequence length value does not exceed maximum value for // sequence index type (CORBA::ULong). This is mostly an issue for diff --git a/TAO/tao/Object_Ref_Table.cpp b/TAO/tao/Object_Ref_Table.cpp index e5268b7612e..304a47a9dec 100644 --- a/TAO/tao/Object_Ref_Table.cpp +++ b/TAO/tao/Object_Ref_Table.cpp @@ -5,6 +5,7 @@ #include "tao/SystemException.h" #include "ace/OS_NS_string.h" #include "ace/Log_Msg.h" +#include <cstring> #ifndef __ACE_INLINE__ # include "tao/Object_Ref_Table.inl" @@ -65,7 +66,7 @@ TAO_Object_Ref_Table::bind_i (const char *id, CORBA::Object_ptr obj) // Make sure that the supplied Object reference is valid, // i.e. not nil. if (id == nullptr - || ACE_OS::strlen (id) == 0 + || std::strlen (id) == 0 || ::CORBA::is_nil (obj)) { errno = EINVAL; diff --git a/TAO/tao/PI/Interceptor_List_T.cpp b/TAO/tao/PI/Interceptor_List_T.cpp index 249b6bc2a84..d40ecfdb54d 100644 --- a/TAO/tao/PI/Interceptor_List_T.cpp +++ b/TAO/tao/PI/Interceptor_List_T.cpp @@ -3,8 +3,8 @@ #include "tao/debug.h" #include "ace/os_include/os_stddef.h" -#include "ace/OS_NS_string.h" #include "ace/Log_Msg.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -55,7 +55,7 @@ namespace TAO /// Interceptor with the same isn't already registered. CORBA::String_var name = interceptor->name (); - if (ACE_OS::strlen (name.in ()) != 0) + if (std::strlen (name.in ()) != 0) { // @@ This simple search algorithm isn't the greatest // thing in the world, but since we only register @@ -123,10 +123,9 @@ namespace TAO { /// If the Interceptor is not anonymous, make sure an /// Interceptor with the same isn't already registered. - CORBA::String_var name = - interceptor->name (); + CORBA::String_var name = interceptor->name (); - if (ACE_OS::strlen (name.in ()) != 0) + if (std::strlen (name.in ()) != 0) { // @@ This simple search algorithm isn't the greatest // thing in the world, but since we only register diff --git a/TAO/tao/PI/ORBInitInfo.cpp b/TAO/tao/PI/ORBInitInfo.cpp index c33199df6ee..523c389a11f 100644 --- a/TAO/tao/PI/ORBInitInfo.cpp +++ b/TAO/tao/PI/ORBInitInfo.cpp @@ -16,7 +16,7 @@ #include "tao/PI/ORBInitInfo.inl" #endif /* defined INLINE */ -#include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -142,7 +142,7 @@ TAO_ORBInitInfo::register_initial_reference ( { this->check_validity (); - if (id == 0 || ACE_OS::strlen (id) == 0) + if (id == 0 || std::strlen (id) == 0) throw PortableInterceptor::ORBInitInfo::InvalidName (); if (CORBA::is_nil (obj)) @@ -159,7 +159,7 @@ TAO_ORBInitInfo::resolve_initial_references (const char * id) { this->check_validity (); - if (id == 0 || ACE_OS::strlen (id) == 0) + if (id == 0 || std::strlen (id) == 0) throw PortableInterceptor::ORBInitInfo::InvalidName (); // The ORB is practically fully initialized by the time this point diff --git a/TAO/tao/PortableServer/BD_String_SArgument_T.cpp b/TAO/tao/PortableServer/BD_String_SArgument_T.cpp index ea69a7d7c71..df6ea5d437c 100644 --- a/TAO/tao/PortableServer/BD_String_SArgument_T.cpp +++ b/TAO/tao/PortableServer/BD_String_SArgument_T.cpp @@ -133,8 +133,7 @@ template<typename S_var, template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_BD_String_SArgument_T<S_var,BOUND,Insert_Policy>::marshal ( - TAO_OutputCDR & cdr - ) + TAO_OutputCDR & cdr) { if (this->x_.in () != 0 && ACE_OS::strlen (this->x_.in ()) > BOUND) { diff --git a/TAO/tao/PortableServer/PortableServer_Functions.cpp b/TAO/tao/PortableServer/PortableServer_Functions.cpp index fe9c1f5f45a..3bf950df354 100644 --- a/TAO/tao/PortableServer/PortableServer_Functions.cpp +++ b/TAO/tao/PortableServer/PortableServer_Functions.cpp @@ -1,6 +1,7 @@ // -*- C++ -*- #include "tao/PortableServer/PortableServer_Functions.h" #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -22,7 +23,7 @@ namespace PortableServer // artifact of the way strings are stored in C. // CORBA::ULong buffer_size = static_cast <CORBA::ULong> - (ACE_OS::strlen (string)); + (std::strlen (string)); // Create the buffer for the Id CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (buffer_size); diff --git a/TAO/tao/PortableServer/Var_Size_SArgument_T.cpp b/TAO/tao/PortableServer/Var_Size_SArgument_T.cpp index bd8aadcc542..285f609dc9d 100644 --- a/TAO/tao/PortableServer/Var_Size_SArgument_T.cpp +++ b/TAO/tao/PortableServer/Var_Size_SArgument_T.cpp @@ -27,8 +27,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::In_Var_Size_SArgument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, this->x_); } @@ -59,8 +58,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::Inout_Var_Size_SArgument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, this->x_); } diff --git a/TAO/tao/PortableServer/Vector_SArgument_T.cpp b/TAO/tao/PortableServer/Vector_SArgument_T.cpp index c813f99ed9e..b429071c296 100644 --- a/TAO/tao/PortableServer/Vector_SArgument_T.cpp +++ b/TAO/tao/PortableServer/Vector_SArgument_T.cpp @@ -25,8 +25,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::In_Vector_SArgument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, this->x_); } @@ -57,8 +56,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::Inout_Vector_SArgument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, this->x_); } diff --git a/TAO/tao/RTCORBA/RT_ProtocolPropertiesA.cpp b/TAO/tao/RTCORBA/RT_ProtocolPropertiesA.cpp index 0316299507a..3ce86837710 100644 --- a/TAO/tao/RTCORBA/RT_ProtocolPropertiesA.cpp +++ b/TAO/tao/RTCORBA/RT_ProtocolPropertiesA.cpp @@ -68,8 +68,7 @@ namespace TAO template<> ::CORBA::Boolean Any_Impl_T<RTCORBA::ProtocolProperties>::to_object ( - ::CORBA::Object_ptr &_tao_elem - ) const + ::CORBA::Object_ptr &_tao_elem) const { _tao_elem = ::CORBA::Object::_duplicate (this->value_); return true; diff --git a/TAO/tao/Strategies/COIOP_Connector.cpp b/TAO/tao/Strategies/COIOP_Connector.cpp index 5846b47c44e..ce03957681a 100644 --- a/TAO/tao/Strategies/COIOP_Connector.cpp +++ b/TAO/tao/Strategies/COIOP_Connector.cpp @@ -10,6 +10,7 @@ #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" #include "tao/Strategies/COIOP_Profile.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -108,10 +109,10 @@ TAO_COIOP_Connector::check_prefix (const char *endpoint) const char *protocol[] = { "COIOP", "COIOPloc" }; - size_t const slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; - size_t const len0 = ACE_OS::strlen (protocol[0]); - size_t const len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/COIOP_Profile.cpp b/TAO/tao/Strategies/COIOP_Profile.cpp index 0e1db4b6eea..9802c361d07 100644 --- a/TAO/tao/Strategies/COIOP_Profile.cpp +++ b/TAO/tao/Strategies/COIOP_Profile.cpp @@ -98,7 +98,7 @@ TAO_COIOP_Profile::parse_string_i (const char *ior) // Pull off the "hostname:port/" part of the objref // Copy the string because we are going to modify it... const char *okd = - ACE_OS::strchr (ior, this->object_key_delimiter_); + std::strchr (ior, this->object_key_delimiter_); if (okd == 0 || okd == ior) { diff --git a/TAO/tao/Strategies/DIOP_Acceptor.cpp b/TAO/tao/Strategies/DIOP_Acceptor.cpp index 2a25ad79c67..39574a53fbe 100644 --- a/TAO/tao/Strategies/DIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/DIOP_Acceptor.cpp @@ -19,6 +19,7 @@ #endif /* __ACE_INLINE__ */ #include "ace/os_include/os_netdb.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -546,7 +547,7 @@ TAO_DIOP_Acceptor::parse_address (const char *address, specified_hostname.clear(); } - const char *port_separator_loc = ACE_OS::strchr (address, ':'); + const char *port_separator_loc = std::strchr (address, ':'); char tmp_host[MAXHOSTNAMELEN + 1]; tmp_host[0] = '\0'; bool host_defaulted = port_separator_loc == address; @@ -563,7 +564,7 @@ TAO_DIOP_Acceptor::parse_address (const char *address, { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - char const * const cp_pos = ACE_OS::strchr (address, ']'); + char const * const cp_pos = std::strchr (address, ']'); if (cp_pos == 0) { // No valid IPv6 address specified. diff --git a/TAO/tao/Strategies/DIOP_Connector.cpp b/TAO/tao/Strategies/DIOP_Connector.cpp index 361ba6ed9b7..236bb65d1d2 100644 --- a/TAO/tao/Strategies/DIOP_Connector.cpp +++ b/TAO/tao/Strategies/DIOP_Connector.cpp @@ -16,6 +16,7 @@ #include "ace/os_include/os_netdb.h" #include "tao/Strategies/DIOP_Profile.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -254,10 +255,10 @@ TAO_DIOP_Connector::check_prefix (const char *endpoint) const char *protocol[] = { "diop", "dioploc" }; - size_t const slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; - size_t const len0 = ACE_OS::strlen (protocol[0]); - size_t const len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/DIOP_Endpoint.cpp b/TAO/tao/Strategies/DIOP_Endpoint.cpp index e616cb66c9e..d21c854a17b 100644 --- a/TAO/tao/Strategies/DIOP_Endpoint.cpp +++ b/TAO/tao/Strategies/DIOP_Endpoint.cpp @@ -15,6 +15,7 @@ #endif /* __ACE_INLINE__ */ #include "ace/os_include/os_netdb.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -168,7 +169,7 @@ TAO_DIOP_Endpoint::host (const char *h) { this->host_ = h; #if defined (ACE_HAS_IPV6) - if (ACE_OS::strchr (h, ':') != 0) + if (std::strchr (h, ':') != 0) this->is_ipv6_decimal_ = true; #endif /* ACE_HAS_IPV6 */ diff --git a/TAO/tao/Strategies/DIOP_Profile.cpp b/TAO/tao/Strategies/DIOP_Profile.cpp index 463806b64b3..d8566303445 100644 --- a/TAO/tao/Strategies/DIOP_Profile.cpp +++ b/TAO/tao/Strategies/DIOP_Profile.cpp @@ -13,6 +13,7 @@ #include "ace/OS_NS_string.h" #include "ace/os_include/os_netdb.h" #include "ace/Truncate.h" +#include <cstring> static const char the_prefix[] = "diop"; @@ -117,7 +118,7 @@ TAO_DIOP_Profile::parse_string_i (const char *ior) { // Pull off the "hostname:port/" part of the objref // Copy the string because we are going to modify it... - const char *okd = ACE_OS::strchr (ior, this->object_key_delimiter_); + const char *okd = std::strchr (ior, this->object_key_delimiter_); if (okd == 0 || okd == ior) { @@ -132,7 +133,7 @@ TAO_DIOP_Profile::parse_string_i (const char *ior) // Length of host string. CORBA::ULong length_host = 0; - const char *cp_pos = ACE_OS::strchr (ior, ':'); // Look for a port + const char *cp_pos = std::strchr (ior, ':'); // Look for a port #if defined (ACE_HAS_IPV6) // IPv6 numeric address in host string? bool ipv6_in_host = false; @@ -145,7 +146,7 @@ TAO_DIOP_Profile::parse_string_i (const char *ior) { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - const char *cp_pos_a = ACE_OS::strchr (ior, ']'); + const char *cp_pos_a = std::strchr (ior, ']'); if (cp_pos_a == 0) { // No valid IPv6 address specified. @@ -469,7 +470,7 @@ TAO_DIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const const char* host; const char* pos; if (this->endpoint_.is_ipv6_decimal_ && - (pos = ACE_OS::strchr (host = this->endpoint_.host (), '%')) != 0) + (pos = std::strchr (host = this->endpoint_.host (), '%')) != 0) { ACE_CString tmp; size_t len = pos - host; diff --git a/TAO/tao/Strategies/SCIOP_Acceptor.cpp b/TAO/tao/Strategies/SCIOP_Acceptor.cpp index ad4ae5e451a..b33826598fb 100644 --- a/TAO/tao/Strategies/SCIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/SCIOP_Acceptor.cpp @@ -10,6 +10,7 @@ #include "tao/Transport.h" #include "tao/CDR.h" #include "ace/os_include/os_netdb.h" +#include <cstring> #if !defined(__ACE_INLINE__) #include "tao/Strategies/SCIOP_Acceptor.inl" @@ -237,7 +238,7 @@ TAO_SCIOP_Acceptor::open (TAO_ORB_Core *orb_core, ACE_Multihomed_INET_Addr addr; - const char *port_separator_loc = ACE_OS::strchr (address, ':'); + const char *port_separator_loc = std::strchr (address, ':'); ACE_Auto_Basic_Array_Ptr<char> tmp_host_auto; if (port_separator_loc == address) @@ -304,7 +305,7 @@ TAO_SCIOP_Acceptor::open (TAO_ORB_Core *orb_core, // in open_i. // Set the length of the hostname - hostname_length = ACE_OS::strlen(address); + hostname_length = std::strlen(address); } ACE_NEW_RETURN(tmp_host, char[hostname_length + 1], -1); @@ -803,7 +804,7 @@ TAO_SCIOP_Acceptor::parse_multiple_hostnames (const char *hostnames, { // Make a copy of hostnames string - int const hostnames_string_length = ACE_OS::strlen(hostnames) + 1; + int const hostnames_string_length = std::strlen(hostnames) + 1; char* hostnames_copy = 0; ACE_NEW_RETURN (hostnames_copy, char[hostnames_string_length], diff --git a/TAO/tao/Strategies/SCIOP_Connector.cpp b/TAO/tao/Strategies/SCIOP_Connector.cpp index c7b9e328fde..b11b0340d5a 100644 --- a/TAO/tao/Strategies/SCIOP_Connector.cpp +++ b/TAO/tao/Strategies/SCIOP_Connector.cpp @@ -18,6 +18,7 @@ #include "ace/OS_NS_strings.h" #include "ace/Strategies_T.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -360,10 +361,9 @@ TAO_SCIOP_Connector::check_prefix (const char *endpoint) const char *protocol[] = { "sciop", "scioploc" }; - size_t slot = ACE_OS::strchr (endpoint, ':') - endpoint; - - size_t len0 = ACE_OS::strlen (protocol[0]); - size_t len1 = ACE_OS::strlen (protocol[1]); + size_t const slot = std::strchr (endpoint, ':') - endpoint; + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/SCIOP_Endpoint.cpp b/TAO/tao/Strategies/SCIOP_Endpoint.cpp index c2c0d330ff7..213d7e52f01 100644 --- a/TAO/tao/Strategies/SCIOP_Endpoint.cpp +++ b/TAO/tao/Strategies/SCIOP_Endpoint.cpp @@ -13,6 +13,7 @@ #include "ace/Synch.h" #include "ace/OS_NS_stdio.h" #include "tao/ORB_Core.h" +#include <cstring> #if !defined (__ACE_INLINE__) # include "tao/Strategies/SCIOP_Endpoint.inl" @@ -131,7 +132,7 @@ TAO_SCIOP_Endpoint::addr_to_string (char *buffer, size_t length) size_t actual_len = ACE_OS::strlen (this->host_.in ()) // chars in host name + sizeof (':') // delimiter - + ACE_OS::strlen ("65536") // max port + + std::strlen ("65536") // max port + sizeof ('\0'); if (length < actual_len) diff --git a/TAO/tao/Strategies/SCIOP_Profile.cpp b/TAO/tao/Strategies/SCIOP_Profile.cpp index a5088c77aa5..114bd24aa21 100644 --- a/TAO/tao/Strategies/SCIOP_Profile.cpp +++ b/TAO/tao/Strategies/SCIOP_Profile.cpp @@ -137,7 +137,7 @@ TAO_SCIOP_Profile::parse_string_i (const char *ior) // Pull off the "hostname:port/" part of the objref // Copy the string because we are going to modify it... - const char *okd = ACE_OS::strchr (ior, this->object_key_delimiter_); + const char *okd = std::strchr (ior, this->object_key_delimiter_); if (okd == 0 || okd == ior) { @@ -152,7 +152,7 @@ TAO_SCIOP_Profile::parse_string_i (const char *ior) // Length of host string. CORBA::ULong length_host = 0; - const char *cp_pos = ACE_OS::strchr (ior, ':'); // Look for a port + const char *cp_pos = std::strchr (ior, ':'); // Look for a port if (cp_pos == ior) { diff --git a/TAO/tao/Strategies/SHMIOP_Connector.cpp b/TAO/tao/Strategies/SHMIOP_Connector.cpp index 3f0532eb050..37197284327 100644 --- a/TAO/tao/Strategies/SHMIOP_Connector.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connector.cpp @@ -13,6 +13,7 @@ #include "tao/Thread_Lane_Resources.h" #include "tao/Blocked_Connect_Strategy.h" #include "ace/OS_NS_strings.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -303,10 +304,10 @@ TAO_SHMIOP_Connector::check_prefix (const char *endpoint) const char *protocol[] = { "shmiop", "shmioploc" }; - size_t slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; - size_t len0 = ACE_OS::strlen (protocol[0]); - size_t len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/SHMIOP_Endpoint.cpp b/TAO/tao/Strategies/SHMIOP_Endpoint.cpp index 911c1b14ad4..354172a95ca 100644 --- a/TAO/tao/Strategies/SHMIOP_Endpoint.cpp +++ b/TAO/tao/Strategies/SHMIOP_Endpoint.cpp @@ -13,6 +13,7 @@ #endif /* __ACE_INLINE__ */ #include "ace/os_include/os_netdb.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -129,7 +130,7 @@ TAO_SHMIOP_Endpoint::addr_to_string (char *buffer, size_t length) size_t actual_len = ACE_OS::strlen (this->host_.in ()) // chars in host name + sizeof (':') // delimiter - + ACE_OS::strlen ("65536") // max port + + std::strlen ("65536") // max port + sizeof ('\0'); if (length < actual_len) diff --git a/TAO/tao/Strategies/SHMIOP_Profile.cpp b/TAO/tao/Strategies/SHMIOP_Profile.cpp index 7b43eb77f60..eb01ce6655b 100644 --- a/TAO/tao/Strategies/SHMIOP_Profile.cpp +++ b/TAO/tao/Strategies/SHMIOP_Profile.cpp @@ -13,6 +13,7 @@ #include "ace/OS_NS_string.h" #include "ace/os_include/os_netdb.h" #include "ace/Truncate.h" +#include <cstring> static const char prefix_[] = "shmiop"; @@ -130,7 +131,7 @@ TAO_SHMIOP_Profile::parse_string_i (const char *string) CORBA::String_var copy (string); char *start = copy.inout (); - char *cp = ACE_OS::strchr (start, ':'); // Look for a port + char *cp = std::strchr (start, ':'); // Look for a port if (cp == 0) { @@ -142,7 +143,7 @@ TAO_SHMIOP_Profile::parse_string_i (const char *string) CORBA::COMPLETED_NO); } - char *okd = ACE_OS::strchr (start, this->object_key_delimiter_); + char *okd = std::strchr (start, this->object_key_delimiter_); if (okd == 0) { diff --git a/TAO/tao/Strategies/UIOP_Connector.cpp b/TAO/tao/Strategies/UIOP_Connector.cpp index c4abd8dd420..2bbc354a4ff 100644 --- a/TAO/tao/Strategies/UIOP_Connector.cpp +++ b/TAO/tao/Strategies/UIOP_Connector.cpp @@ -15,6 +15,7 @@ #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -76,7 +77,7 @@ TAO_UIOP_Connector::corbaloc_scan (const char *str, size_t &len) if (this->check_prefix (str) != 0) return 0; - const char *separator = ACE_OS::strchr (str,'|'); + const char *separator = std::strchr (str,'|'); if (separator == 0) { if (TAO_debug_level) @@ -329,10 +330,10 @@ TAO_UIOP_Connector::check_prefix (const char *endpoint) static const char *protocol[] = { "uiop", "uioploc" }; - const size_t slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; - const size_t len0 = ACE_OS::strlen (protocol[0]); - const size_t len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/UIOP_Profile.cpp b/TAO/tao/Strategies/UIOP_Profile.cpp index f4fa10f2067..3179089b4ec 100644 --- a/TAO/tao/Strategies/UIOP_Profile.cpp +++ b/TAO/tao/Strategies/UIOP_Profile.cpp @@ -13,6 +13,7 @@ #include "ace/OS_NS_stdio.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_ctype.h" +#include <cstring> static const char prefix_[] = "uiop"; @@ -21,7 +22,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL const char TAO_UIOP_Profile::object_key_delimiter_ = '|'; char -TAO_UIOP_Profile::object_key_delimiter (void) const +TAO_UIOP_Profile::object_key_delimiter () const { return TAO_UIOP_Profile::object_key_delimiter_; } @@ -79,13 +80,13 @@ TAO_UIOP_Profile::~TAO_UIOP_Profile (void) } TAO_Endpoint* -TAO_UIOP_Profile::endpoint (void) +TAO_UIOP_Profile::endpoint () { return &this->endpoint_; } CORBA::ULong -TAO_UIOP_Profile::endpoint_count (void) const +TAO_UIOP_Profile::endpoint_count () const { return this->count_; } @@ -135,7 +136,7 @@ TAO_UIOP_Profile::parse_string_i (const char *string) CORBA::String_var copy (string); char *start = copy.inout (); - char *cp = ACE_OS::strchr (start, this->object_key_delimiter_); + char *cp = std::strchr (start, this->object_key_delimiter_); if (cp == 0) { @@ -237,7 +238,7 @@ TAO_UIOP_Profile::add_endpoint (TAO_UIOP_Endpoint *endp) char * -TAO_UIOP_Profile::to_string (void) const +TAO_UIOP_Profile::to_string () const { CORBA::String_var key; TAO::ObjectKey::encode_sequence_to_string (key.inout(), diff --git a/TAO/tao/String_Alloc.cpp b/TAO/tao/String_Alloc.cpp index 91935ce80a1..5e03a6710ed 100644 --- a/TAO/tao/String_Alloc.cpp +++ b/TAO/tao/String_Alloc.cpp @@ -3,6 +3,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_wchar.h" #include "ace/OS_Memory.h" +#include <cstring> #ifndef TAO_NO_SHARED_NULL_CORBA_STRING static char null_char[]= ""; @@ -30,7 +31,7 @@ CORBA::string_dup (const char *str) return null_char; #endif /* TAO_NO_SHARED_NULL_CORBA_STRING */ - size_t const len = ACE_OS::strlen (str); + size_t const len = std::strlen (str); // This allocates an extra byte for the '\0'; char * copy = CORBA::string_alloc (static_cast<CORBA::ULong> (len)); diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp index 1d7b01a5c1c..6a3853353e3 100644 --- a/TAO/tao/TAO_Server_Request.cpp +++ b/TAO/tao/TAO_Server_Request.cpp @@ -10,6 +10,7 @@ #include "tao/Transport.h" #include "tao/CDR.h" #include "tao/SystemException.h" +#include <cstring> #if TAO_HAS_INTERCEPTORS == 1 #include "tao/PortableInterceptorC.h" @@ -94,7 +95,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, int &parse_error) : mesg_base_ (mesg_base), operation_ (CORBA::string_dup (operation)), - operation_len_ (operation == nullptr ? 0 : ACE_OS::strlen (operation)), + operation_len_ (operation == nullptr ? 0 : std::strlen (operation)), release_operation_ (true), is_forwarded_ (false), incoming_ (nullptr), diff --git a/TAO/tao/TAO_Server_Request.inl b/TAO/tao/TAO_Server_Request.inl index e380e82a01a..337e172490a 100644 --- a/TAO/tao/TAO_Server_Request.inl +++ b/TAO/tao/TAO_Server_Request.inl @@ -68,7 +68,7 @@ TAO_ServerRequest::operation (const char *operation, if (this->release_operation_) CORBA::string_free (const_cast <char*> (this->operation_)); - this->operation_len_ = (length == 0 ? ACE_OS::strlen (operation) : length); + this->operation_len_ = (length == 0 ? std::strlen (operation) : length); this->release_operation_ = release; this->operation_ = operation; } diff --git a/TAO/tao/Transport_Connector.cpp b/TAO/tao/Transport_Connector.cpp index 4e4961b1f90..9d920a75c55 100644 --- a/TAO/tao/Transport_Connector.cpp +++ b/TAO/tao/Transport_Connector.cpp @@ -17,6 +17,7 @@ #include "tao/Base_Transport_Property.h" #include "ace/OS_NS_string.h" +#include <cstring> #if !defined (__ACE_INLINE__) # include "tao/Transport_Connector.inl" @@ -81,11 +82,11 @@ TAO_Connector::corbaloc_scan (const char *str, size_t &len) { if (this->check_prefix (str) != 0) return nullptr; - const char *comma_pos = ACE_OS::strchr (str,','); - const char *slash_pos = ACE_OS::strchr (str,'/'); + const char *comma_pos = std::strchr (str,','); + const char *slash_pos = std::strchr (str,'/'); if (comma_pos == nullptr && slash_pos == nullptr) { - len = ACE_OS::strlen (str); + len = std::strlen (str); } else if (comma_pos == nullptr || comma_pos > slash_pos) len = (slash_pos - str); @@ -135,7 +136,7 @@ TAO_Connector::make_mprofile (const char *string, TAO_MProfile &mprofile) ACE_CString ior; - ior.set (string, ACE_OS::strlen (string), 1); + ior.set (string, std::strlen (string), 1); // Find out where the protocol ends ACE_CString::size_type ior_index = ior.find ("://"); diff --git a/TAO/tao/Var_Size_Argument_T.cpp b/TAO/tao/Var_Size_Argument_T.cpp index bc349533182..a2bf18ce09a 100644 --- a/TAO/tao/Var_Size_Argument_T.cpp +++ b/TAO/tao/Var_Size_Argument_T.cpp @@ -24,8 +24,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::In_Var_Size_Argument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, *this->x_); } @@ -83,8 +82,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, *this->x_); } @@ -114,8 +112,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, *this->x_); } @@ -145,8 +142,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, this->x_.in ()); } diff --git a/TAO/tao/Vector_Argument_T.cpp b/TAO/tao/Vector_Argument_T.cpp index 2e6b2bc35bd..18ea19ca6c5 100644 --- a/TAO/tao/Vector_Argument_T.cpp +++ b/TAO/tao/Vector_Argument_T.cpp @@ -23,8 +23,7 @@ template<typename S, template <typename> class Insert_Policy> void TAO::In_Vector_Argument_T<S,Insert_Policy>::interceptor_value ( - CORBA::Any *any - ) const + CORBA::Any *any) const { Insert_Policy<S>::any_insert (any, this->x_); } diff --git a/TAO/tao/WrongTransactionC.cpp b/TAO/tao/WrongTransactionC.cpp index a2f1be23a7b..614703f33db 100644 --- a/TAO/tao/WrongTransactionC.cpp +++ b/TAO/tao/WrongTransactionC.cpp @@ -119,8 +119,7 @@ void CORBA::WrongTransaction::_raise () const } void CORBA::WrongTransaction::_tao_encode ( - TAO_OutputCDR &cdr - ) const + TAO_OutputCDR &cdr) const { if (cdr << *this) { diff --git a/TAO/tao/WrongTransactionC.h b/TAO/tao/WrongTransactionC.h index 11ce0f2f73a..43a1f850746 100644 --- a/TAO/tao/WrongTransactionC.h +++ b/TAO/tao/WrongTransactionC.h @@ -81,12 +81,10 @@ namespace CORBA virtual void _raise () const; virtual void _tao_encode ( - TAO_OutputCDR & - ) const; + TAO_OutputCDR &) const; virtual void _tao_decode ( - TAO_InputCDR & - ); + TAO_InputCDR &); // TAO_IDL - Generated from // be\be_visitor_exception/exception_ch.cpp:129 diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp index 4c829a31980..10dfa7e3653 100644 --- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp +++ b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp @@ -32,7 +32,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) CORBA::Object_var obj = orb->string_to_object (argv[1]); InvokeMe_var server = InvokeMe::_narrow (obj.in ()); - always Shutdown( server.in () ); // When goes out of scope! + always Shutdown( server.in ()); // When goes out of scope! server->invoke_me (); ACE_DEBUG ((LM_DEBUG, "\n")); server->invoke_me (); diff --git a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp index dab0e2fd811..610a517976e 100644 --- a/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp +++ b/TAO/tests/Portable_Interceptors/AdvSlotDblCpy/server.cpp @@ -68,7 +68,7 @@ namespace CORBA::Any_var data; ACE_DEBUG ((LM_DEBUG, "SERVER %C -> get_slot(TSC) -> is ", location)); - data= pi_current->get_slot( slot_id ); + data= pi_current->get_slot(slot_id); CORBA::TypeCode_var tc= data->type(); if (tc->kind() == CORBA::tk_null) @@ -98,7 +98,7 @@ namespace } ACE_DEBUG ((LM_DEBUG, "SERVER %C -> get_slot(RSC) -> is ", location)); - data= ri->get_slot( slot_id ); + data= ri->get_slot(slot_id); tc= data->type(); if (tc->kind() == CORBA::tk_null) |