Skip to content

Commit

Permalink
Refs #21711: Apply Ricardo's rev
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <[email protected]>
  • Loading branch information
Mario-DL committed Oct 8, 2024
1 parent 62459ef commit ed30087
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions include/fastdds/dds/publisher/DataWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,13 @@ class DataWriter : public DomainEntity
*/
RTPS_DllAPI ReturnCode_t get_matched_subscriptions(
std::vector<InstanceHandle_t>& subscription_handles) const;
/**
* @note User is responsible for the memory deallocation of the returned vector.
*/

#ifndef DOXYGEN_SHOULD_SKIP_THIS
FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds:DataWriter::get_matched_subscriptions()",
"In favor of version using std::vector<fastrtps::rtps::InstanceHandle_t>.")
/**
* @note User is responsible for the memory deallocation of the returned vector.
*/
RTPS_DllAPI ReturnCode_t get_matched_subscriptions(
std::vector<InstanceHandle_t*>& subscription_handles) const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fastdds/publisher/DataWriterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2262,7 +2262,7 @@ ReturnCode_t DataWriterImpl::get_matched_subscriptions(
{
for (const GUID_t& guid : matched_reader_guids)
{
subscription_handles.push_back(InstanceHandle_t(guid));
subscription_handles.emplace_back(InstanceHandle_t(guid));
}
ret = ReturnCode_t::RETCODE_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fastdds/subscriber/DataReaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ ReturnCode_t DataReaderImpl::get_matched_publications(
{
for (const GUID_t& guid : matched_writers_guids)
{
publication_handles.push_back(InstanceHandle_t(guid));
publication_handles.emplace_back(InstanceHandle_t(guid));
}
ret = ReturnCode_t::RETCODE_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion test/mock/rtps/RTPSReader/fastdds/rtps/reader/RTPSReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class RTPSReader : public Endpoint
virtual bool matched_writers_guids(
std::vector<GUID_t>&) const
{
return true;
return false;
}

virtual bool isInCleanState()
Expand Down

0 comments on commit ed30087

Please sign in to comment.