diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-01-05 18:10:11 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-01-05 18:10:11 +0100 |
commit | 7d8b0feae4bb77d4867eeaba358f690f6d0075e9 (patch) | |
tree | 7ec005b72a4b9b8f1cd7d160a1700497c3d15dd2 | |
parent | 283fb56eae1580dd83d1a6d67f3caf0dfb8f4ad4 (diff) | |
download | ATCD-7d8b0feae4bb77d4867eeaba358f690f6d0075e9.tar.gz |
More const any extraction
* TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp:
* TAO/orbsvcs/FT_ReplicationManager/FT_Property_Validator.cpp:
* TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp:
* TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp:
* TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp:
* TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp:
* TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h:
* TAO/tests/IDL_Test/main.cpp:
8 files changed, 9 insertions, 9 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp b/TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp index 544c8e1f539..aab6cd523fc 100644 --- a/TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp @@ -224,7 +224,7 @@ be_visitor_any_extracted_type_decl::visit_typedef (be_typedef *node) int be_visitor_any_extracted_type_decl::visit_union (be_union *node) { - os_ << node->full_name () << " * " << var_name_ << " = 0;"; + os_ << "const " << node->full_name () << " * " << var_name_ << " = 0;"; return 0; } diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_Property_Validator.cpp b/TAO/orbsvcs/FT_ReplicationManager/FT_Property_Validator.cpp index aa4dcccaf3c..30baef0cd46 100644 --- a/TAO/orbsvcs/FT_ReplicationManager/FT_Property_Validator.cpp +++ b/TAO/orbsvcs/FT_ReplicationManager/FT_Property_Validator.cpp @@ -184,7 +184,7 @@ TAO::FT_Property_Validator::validate_criteria ( } else if (property.nam == this->factories_) { - PortableGroup::FactoriesValue * factories; + const PortableGroup::FactoriesValue * factories = 0; if (!(property.val >>= factories)) invalid_criteria[p++] = property; else diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp index 66c38b24a6a..fd8b69eb8f4 100644 --- a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp +++ b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp @@ -331,7 +331,7 @@ int TAO::FT_ReplicationManagerFaultAnalyzer::get_factories ( prop_name[0].id = CORBA::string_dup (FT::FT_FACTORIES); int result = 0; - PortableGroup::FactoryInfos_var temp_factories; + const PortableGroup::FactoryInfos_var temp_factories; PortableGroup::Value value; if (TAO_PG::get_property_value (prop_name, properties, value) == 1) { diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp index 46bda339433..d78e8d93725 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp @@ -254,7 +254,7 @@ TAO_FTEC_Event_Channel_Impl::connect_push_consumer ( CORBA::Any_var any = Request_Context_Repository().get_cached_result(); - FtRtecEventChannelAdmin::ObjectId *oid; + const FtRtecEventChannelAdmin::ObjectId *oid = 0; if (any.in() >>= oid) { FtRtecEventChannelAdmin::ObjectId* result; @@ -290,7 +290,7 @@ TAO_FTEC_Event_Channel_Impl::connect_push_supplier ( CORBA::Any_var any = Request_Context_Repository().get_cached_result(); - FtRtecEventChannelAdmin::ObjectId *oid; + const FtRtecEventChannelAdmin::ObjectId *oid = 0; if (any.in() >>= oid) { FtRtecEventChannelAdmin::ObjectId* result; diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp index d187dcbbf7b..a95575bb02c 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp @@ -63,7 +63,7 @@ Request_Context_Repository::set_object_id( FtRtecEventChannelAdmin::ObjectId_var get_object_id(CORBA::Any_var a) { - FtRtecEventChannelAdmin::ObjectId *object_id, *r; + const FtRtecEventChannelAdmin::ObjectId *object_id, *r; FtRtecEventChannelAdmin::ObjectId_var result; if ((a.in() >>= object_id) ==0) diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp index e8db0df6b9f..001c0053dd4 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp @@ -45,7 +45,7 @@ TAO_Set_Update_Interceptor::send_request ( { CORBA::Any_var a = Request_Context_Repository().get_ft_request_service_context(ri); - IOP::ServiceContext* sc; + const IOP::ServiceContext* sc = 0; if ((a.in() >>= sc) ==0) return; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h index 708d9e14b59..46fa552893b 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h @@ -37,7 +37,7 @@ namespace TAO int find (const PG_Property_Set & decoder, const ACE_CString & key, TYPE & value) { int result = 0; - PortableGroup::Value const * any; + const PortableGroup::Value const * any = 0; if ( decoder.find (key, any)) { result = ((*any) >>= value); diff --git a/TAO/tests/IDL_Test/main.cpp b/TAO/tests/IDL_Test/main.cpp index d4925cf1247..eed4ab96e68 100644 --- a/TAO/tests/IDL_Test/main.cpp +++ b/TAO/tests/IDL_Test/main.cpp @@ -337,7 +337,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) field.value._d (FTYPE_VARCHAR); CORBA::Any any1; any1 <<= field; - Field *outfield; + const Field *outfield = 0; if ((any1 >>= outfield) == 0) { |