From bf5fae3752536fb9b08afb0ba1f50d6e606b354c Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 17 Jun 2010 07:59:47 +0000 Subject: Thu Jun 17 07:58:29 UTC 2010 Johnny Willemsen * connectors/dds4ccm/impl/dds/ContentFilterSetting.cpp: * connectors/dds4ccm/impl/dds/ContentFilteredTopic.cpp: * connectors/dds4ccm/impl/dds/Getter_T.cpp: Const, layout, and memory management changes --- CIAO/ChangeLog | 7 ++++++ .../dds4ccm/impl/dds/ContentFilterSetting.cpp | 5 +++-- .../dds4ccm/impl/dds/ContentFilteredTopic.cpp | 2 +- CIAO/connectors/dds4ccm/impl/dds/Getter_T.cpp | 26 ++++++++++------------ 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index eb956820048..864a19e4490 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,10 @@ +Thu Jun 17 07:58:29 UTC 2010 Johnny Willemsen + + * connectors/dds4ccm/impl/dds/ContentFilterSetting.cpp: + * connectors/dds4ccm/impl/dds/ContentFilteredTopic.cpp: + * connectors/dds4ccm/impl/dds/Getter_T.cpp: + Const, layout, and memory management changes + Thu Jun 17 07:43:08 UTC 2010 Johnny Willemsen * connectors/dds4ccm/tests/CSLSampleRejected/Receiver/CSL_SRTest_Receiver_exec.h: diff --git a/CIAO/connectors/dds4ccm/impl/dds/ContentFilterSetting.cpp b/CIAO/connectors/dds4ccm/impl/dds/ContentFilterSetting.cpp index a51bba0862c..f9278f5ed2e 100644 --- a/CIAO/connectors/dds4ccm/impl/dds/ContentFilterSetting.cpp +++ b/CIAO/connectors/dds4ccm/impl/dds/ContentFilterSetting.cpp @@ -23,8 +23,9 @@ namespace CIAO CCM_DDS_ContentFilterSetting_i::filter (void) { DDS4CCM_TRACE ("CCM_DDS_ContentFilterSetting_i::filter"); - - return &this->filter_; + ::CCM_DDS::QueryFilter* retval = new ::CCM_DDS::QueryFilter; + *retval = this->filter_; + return retval; } void diff --git a/CIAO/connectors/dds4ccm/impl/dds/ContentFilteredTopic.cpp b/CIAO/connectors/dds4ccm/impl/dds/ContentFilteredTopic.cpp index 6e560a8e168..9ad829d08de 100644 --- a/CIAO/connectors/dds4ccm/impl/dds/ContentFilteredTopic.cpp +++ b/CIAO/connectors/dds4ccm/impl/dds/ContentFilteredTopic.cpp @@ -39,7 +39,7 @@ namespace CIAO this->impl ()->get_expression_parameters (parameters); expression_parameters <<= parameters; #else - ::DDS::ReturnCode_t retval = + ::DDS::ReturnCode_t const retval = this->impl ()->get_expression_parameters (expression_parameters); #endif return retval; diff --git a/CIAO/connectors/dds4ccm/impl/dds/Getter_T.cpp b/CIAO/connectors/dds4ccm/impl/dds/Getter_T.cpp index 30086fcda0d..d9b1b01d625 100644 --- a/CIAO/connectors/dds4ccm/impl/dds/Getter_T.cpp +++ b/CIAO/connectors/dds4ccm/impl/dds/Getter_T.cpp @@ -80,7 +80,7 @@ CIAO::DDS4CCM::DDS_CCM::Getter_Base_T::get_many ( active_conditions[i]->get_trigger_value (); // Take read condition - DDS_ReturnCode_t retcode = + DDS_ReturnCode_t const retcode = this->impl ()->read_w_condition (data, sample_info, max_samples); if (retcode == DDS_RETCODE_OK && data.length () >= 1) @@ -214,8 +214,7 @@ CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one ( typename DDS_TYPE::dds_seq_type data; ::DDS::ReturnCode_t const retcode = - this->impl ()->read_w_condition (data, - sample_info); + this->impl ()->read_w_condition (data, sample_info); if (retcode == ::DDS::RETCODE_NO_DATA) { DDS4CCM_DEBUG (6, (LM_DEBUG, CLINFO @@ -229,8 +228,9 @@ CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one ( "CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one - " "Error while reading from DDS: <%C>\n", translate_retcode (retcode))); - DDS_ReturnCode_t const retval = this->impl ()->return_loan (data, sample_info); - if (retval != DDS_RETCODE_OK) + DDS_ReturnCode_t const retval = + this->impl ()->return_loan (data, sample_info); + if (retval != ::DDS::RETCODE_OK) { DDS4CCM_ERROR (1, (LM_ERROR, CLINFO "CIAO::DDS4CCM::DDS_CCM::Getter_Base_T::Getter_T::get_one - " @@ -240,8 +240,7 @@ CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one ( throw CCM_DDS::InternalError (retcode, 1); } - else if (data.length () == 1 && - sample_info[0].valid_data) + else if (data.length () == 1 && sample_info[0].valid_data) { info <<= sample_info[0]; an_instance = data[0]; @@ -253,7 +252,7 @@ CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one ( "CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one - " "No valid available in DDS.\n")); } - //return the loan of each read. + // Return the loan of each read. DDS_ReturnCode_t const retval = this->impl ()->return_loan (data, sample_info); if (retval != DDS_RETCODE_OK) { @@ -280,8 +279,7 @@ CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one ( typename DDS_TYPE::value_type, CORBA::NO_MEMORY ()); DDSConditionSeq active_conditions; - if (!this->impl ()->wait (active_conditions, - this->time_out_)) + if (!this->impl ()->wait (active_conditions, this->time_out_)) { return false; } @@ -299,7 +297,7 @@ CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one ( { DDS_SampleInfoSeq sample_info; typename DDS_TYPE::dds_seq_type data; - DDS_ReturnCode_t retcode = + DDS_ReturnCode_t const retcode = this->impl ()->read_w_condition (data, sample_info); if (retcode == ::DDS::RETCODE_NO_DATA) @@ -315,7 +313,8 @@ CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one ( "CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one - " "Error while reading from DDS: <%C>\n", translate_retcode (retcode))); - DDS_ReturnCode_t const retval = this->impl ()->return_loan (data, sample_info); + DDS_ReturnCode_t const retval = + this->impl ()->return_loan (data, sample_info); if (retval != DDS_RETCODE_OK) { DDS4CCM_ERROR (1, (LM_ERROR, CLINFO @@ -325,8 +324,7 @@ CIAO::DDS4CCM::DDS_CCM::Getter_T::get_one ( } throw CCM_DDS::InternalError (retcode, 1); } - else if (data.length () == 1 && - sample_info[0].valid_data) + else if (data.length () == 1 && sample_info[0].valid_data) { info <<= sample_info[0]; *an_instance = data[0]; -- cgit v1.2.1