Skip to content

Commit

Permalink
Refs #21808: 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 18, 2024
1 parent a9444cc commit 7559328
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 deletions.
16 changes: 8 additions & 8 deletions src/cpp/fastdds/publisher/DataWriterImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,25 +382,25 @@ class DataWriterImpl : protected rtps::IReaderDataFilter
const char* filter_class_name);

/**
* @brief Retrieves in a subscription associated with the DataWriter
* @brief Retrieves in a subscription associated with the @ref DataWriter
*
* @param[out] subscription_data subscription data struct
* @param subscription_handle InstanceHandle_t of the subscription
* @return RETCODE_BAD_PARAMETER if the DataWriter is not matched with
* the given subscription handle, RETCODE_OK otherwise.
* @param subscription_handle @ref InstanceHandle_t of the subscription
* @return @ref RETCODE_BAD_PARAMETER if the DataWriter is not matched with
* the given subscription handle, @ref RETCODE_OK otherwise.
*
*/
ReturnCode_t get_matched_subscription_data(
SubscriptionBuiltinTopicData& subscription_data,
const InstanceHandle_t& subscription_handle) const;

/**
* @brief Fills the given vector with the InstanceHandle_t of matched DataReaders
* @brief Fills the given vector with the @ref InstanceHandle_t of matched DataReaders
*
* @param[out] subscription_handles Vector where the InstanceHandle_t are returned
* @return RETCODE_OK if the operation succeeds.
* @param[out] subscription_handles Vector where the @ref InstanceHandle_t are returned
* @return @ref RETCODE_OK if the operation succeeds.
*
* @note Returning an empty list is not an error, it returns RETCODE_OK.
* @note Returning an empty list is not an error, it returns @ref RETCODE_OK.
*
*/
ReturnCode_t get_matched_subscriptions(
Expand Down
14 changes: 7 additions & 7 deletions src/cpp/fastdds/subscriber/DataReaderImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,22 +238,22 @@ class DataReaderImpl
* @brief Retrieves in a publication associated with the DataWriter
*
* @param[out] publication_data publication data struct
* @param publication_handle InstanceHandle_t of the publication
* @return RETCODE_BAD_PARAMETER if the DataReader is not matched with
* the given publication handle, RETCODE_OK otherwise.
* @param publication_handle @ref InstanceHandle_t of the publication
* @return @ref RETCODE_BAD_PARAMETER if the DataReader is not matched with
* the given publication handle, @ref RETCODE_OK otherwise.
*
*/
ReturnCode_t get_matched_publication_data(
rtps::PublicationBuiltinTopicData& publication_data,
const InstanceHandle_t& publication_handle) const;

/**
* @brief Fills the given vector with the InstanceHandle_t of matched DataReaders
* @brief Fills the given vector with the @ref InstanceHandle_t of matched DataReaders
*
* @param[out] publication_handles Vector where the InstanceHandle_t are returned
* @return RETCODE_OK if the operation succeeds.
* @param[out] publication_handles Vector where the @ref InstanceHandle_t are returned
* @return @ref RETCODE_OK if the operation succeeds.
*
* @note Returning an empty list is not an error, it returns RETCODE_OK.
* @note Returning an empty list is not an error, it returns @ref RETCODE_OK.
*
*/
ReturnCode_t get_matched_publications(
Expand Down
8 changes: 4 additions & 4 deletions src/cpp/rtps/participant/RTPSParticipantImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1121,10 +1121,10 @@ class RTPSParticipantImpl
std::vector<TransportNetmaskFilterInfo> get_netmask_filter_info() const;

/**
* @brief Fills the provided PublicationBuiltinTopicData with the information of the
* @brief Fills the provided @ref PublicationBuiltinTopicData with the information of the
* writer identified by writer_guid.
*
* @param[out] data PublicationBuiltinTopicData to fill.
* @param[out] data @ref PublicationBuiltinTopicData to fill.
* @param[in] writer_guid GUID of the writer to get the information from.
* @return True if the writer was found and the data was filled.
*/
Expand All @@ -1133,10 +1133,10 @@ class RTPSParticipantImpl
const GUID_t& writer_guid) const;

/**
* @brief Fills the provided SubscriptionBuiltinTopicData with the information of the
* @brief Fills the provided @ref SubscriptionBuiltinTopicData with the information of the
* reader identified by reader_guid.
*
* @param[out] data SubscriptionBuiltinTopicData to fill.
* @param[out] data @ref SubscriptionBuiltinTopicData to fill.
* @param[in] reader_guid GUID of the reader to get the information from.
* @return True if the reader was found and the data was filled.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/StatefulReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ bool StatefulReader::matched_writers_guids(
guids.reserve(matched_writers_.size());
for (WriterProxy* writer : matched_writers_)
{
guids.push_back(writer->guid());
guids.emplace_back(writer->guid());
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/StatelessReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ bool StatelessReader::matched_writers_guids(
guids.reserve(matched_writers_.size());
for (const RemoteWriterInfo_t& writer : matched_writers_)
{
guids.push_back(writer.guid);
guids.emplace_back(writer.guid);
}
return true;
}
Expand Down
4 changes: 3 additions & 1 deletion src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1609,10 +1609,12 @@ bool StatefulWriter::matched_readers_guids(
{
std::lock_guard<RecursiveTimedMutex> guard(mp_mutex);
guids.clear();
guids.reserve(guids.size() + matched_local_readers_.size() + matched_datasharing_readers_.size() +
matched_remote_readers_.size());
for_matched_readers(matched_local_readers_, matched_datasharing_readers_, matched_remote_readers_,
[&guids](const ReaderProxy* reader)
{
guids.push_back(reader->guid());
guids.emplace_back(reader->guid());
return false;
}
);
Expand Down
3 changes: 2 additions & 1 deletion src/cpp/rtps/writer/StatelessWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,11 @@ bool StatelessWriter::matched_readers_guids(
{
std::lock_guard<RecursiveTimedMutex> guard(mp_mutex);
guids.clear();
guids.reserve(matched_local_readers_.size() + matched_datasharing_readers_.size() + matched_remote_readers_.size());
for_matched_readers(matched_local_readers_, matched_datasharing_readers_, matched_remote_readers_,
[&guids](const ReaderLocator& reader)
{
guids.push_back(reader.remote_guid());
guids.emplace_back(reader.remote_guid());
return false;
}
);
Expand Down

0 comments on commit 7559328

Please sign in to comment.