Skip to content

Commit 7559328

Browse files
committed
Refs #21808: Apply Ricardo's rev
Signed-off-by: Mario Dominguez <[email protected]>
1 parent a9444cc commit 7559328

File tree

7 files changed

+26
-23
lines changed

7 files changed

+26
-23
lines changed

src/cpp/fastdds/publisher/DataWriterImpl.hpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -382,25 +382,25 @@ class DataWriterImpl : protected rtps::IReaderDataFilter
382382
const char* filter_class_name);
383383

384384
/**
385-
* @brief Retrieves in a subscription associated with the DataWriter
385+
* @brief Retrieves in a subscription associated with the @ref DataWriter
386386
*
387387
* @param[out] subscription_data subscription data struct
388-
* @param subscription_handle InstanceHandle_t of the subscription
389-
* @return RETCODE_BAD_PARAMETER if the DataWriter is not matched with
390-
* the given subscription handle, RETCODE_OK otherwise.
388+
* @param subscription_handle @ref InstanceHandle_t of the subscription
389+
* @return @ref RETCODE_BAD_PARAMETER if the DataWriter is not matched with
390+
* the given subscription handle, @ref RETCODE_OK otherwise.
391391
*
392392
*/
393393
ReturnCode_t get_matched_subscription_data(
394394
SubscriptionBuiltinTopicData& subscription_data,
395395
const InstanceHandle_t& subscription_handle) const;
396396

397397
/**
398-
* @brief Fills the given vector with the InstanceHandle_t of matched DataReaders
398+
* @brief Fills the given vector with the @ref InstanceHandle_t of matched DataReaders
399399
*
400-
* @param[out] subscription_handles Vector where the InstanceHandle_t are returned
401-
* @return RETCODE_OK if the operation succeeds.
400+
* @param[out] subscription_handles Vector where the @ref InstanceHandle_t are returned
401+
* @return @ref RETCODE_OK if the operation succeeds.
402402
*
403-
* @note Returning an empty list is not an error, it returns RETCODE_OK.
403+
* @note Returning an empty list is not an error, it returns @ref RETCODE_OK.
404404
*
405405
*/
406406
ReturnCode_t get_matched_subscriptions(

src/cpp/fastdds/subscriber/DataReaderImpl.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,22 @@ class DataReaderImpl
238238
* @brief Retrieves in a publication associated with the DataWriter
239239
*
240240
* @param[out] publication_data publication data struct
241-
* @param publication_handle InstanceHandle_t of the publication
242-
* @return RETCODE_BAD_PARAMETER if the DataReader is not matched with
243-
* the given publication handle, RETCODE_OK otherwise.
241+
* @param publication_handle @ref InstanceHandle_t of the publication
242+
* @return @ref RETCODE_BAD_PARAMETER if the DataReader is not matched with
243+
* the given publication handle, @ref RETCODE_OK otherwise.
244244
*
245245
*/
246246
ReturnCode_t get_matched_publication_data(
247247
rtps::PublicationBuiltinTopicData& publication_data,
248248
const InstanceHandle_t& publication_handle) const;
249249

250250
/**
251-
* @brief Fills the given vector with the InstanceHandle_t of matched DataReaders
251+
* @brief Fills the given vector with the @ref InstanceHandle_t of matched DataReaders
252252
*
253-
* @param[out] publication_handles Vector where the InstanceHandle_t are returned
254-
* @return RETCODE_OK if the operation succeeds.
253+
* @param[out] publication_handles Vector where the @ref InstanceHandle_t are returned
254+
* @return @ref RETCODE_OK if the operation succeeds.
255255
*
256-
* @note Returning an empty list is not an error, it returns RETCODE_OK.
256+
* @note Returning an empty list is not an error, it returns @ref RETCODE_OK.
257257
*
258258
*/
259259
ReturnCode_t get_matched_publications(

src/cpp/rtps/participant/RTPSParticipantImpl.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1121,10 +1121,10 @@ class RTPSParticipantImpl
11211121
std::vector<TransportNetmaskFilterInfo> get_netmask_filter_info() const;
11221122

11231123
/**
1124-
* @brief Fills the provided PublicationBuiltinTopicData with the information of the
1124+
* @brief Fills the provided @ref PublicationBuiltinTopicData with the information of the
11251125
* writer identified by writer_guid.
11261126
*
1127-
* @param[out] data PublicationBuiltinTopicData to fill.
1127+
* @param[out] data @ref PublicationBuiltinTopicData to fill.
11281128
* @param[in] writer_guid GUID of the writer to get the information from.
11291129
* @return True if the writer was found and the data was filled.
11301130
*/
@@ -1133,10 +1133,10 @@ class RTPSParticipantImpl
11331133
const GUID_t& writer_guid) const;
11341134

11351135
/**
1136-
* @brief Fills the provided SubscriptionBuiltinTopicData with the information of the
1136+
* @brief Fills the provided @ref SubscriptionBuiltinTopicData with the information of the
11371137
* reader identified by reader_guid.
11381138
*
1139-
* @param[out] data SubscriptionBuiltinTopicData to fill.
1139+
* @param[out] data @ref SubscriptionBuiltinTopicData to fill.
11401140
* @param[in] reader_guid GUID of the reader to get the information from.
11411141
* @return True if the reader was found and the data was filled.
11421142
*/

src/cpp/rtps/reader/StatefulReader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ bool StatefulReader::matched_writers_guids(
15001500
guids.reserve(matched_writers_.size());
15011501
for (WriterProxy* writer : matched_writers_)
15021502
{
1503-
guids.push_back(writer->guid());
1503+
guids.emplace_back(writer->guid());
15041504
}
15051505
return true;
15061506
}

src/cpp/rtps/reader/StatelessReader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ bool StatelessReader::matched_writers_guids(
529529
guids.reserve(matched_writers_.size());
530530
for (const RemoteWriterInfo_t& writer : matched_writers_)
531531
{
532-
guids.push_back(writer.guid);
532+
guids.emplace_back(writer.guid);
533533
}
534534
return true;
535535
}

src/cpp/rtps/writer/StatefulWriter.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1609,10 +1609,12 @@ bool StatefulWriter::matched_readers_guids(
16091609
{
16101610
std::lock_guard<RecursiveTimedMutex> guard(mp_mutex);
16111611
guids.clear();
1612+
guids.reserve(guids.size() + matched_local_readers_.size() + matched_datasharing_readers_.size() +
1613+
matched_remote_readers_.size());
16121614
for_matched_readers(matched_local_readers_, matched_datasharing_readers_, matched_remote_readers_,
16131615
[&guids](const ReaderProxy* reader)
16141616
{
1615-
guids.push_back(reader->guid());
1617+
guids.emplace_back(reader->guid());
16161618
return false;
16171619
}
16181620
);

src/cpp/rtps/writer/StatelessWriter.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,11 @@ bool StatelessWriter::matched_readers_guids(
403403
{
404404
std::lock_guard<RecursiveTimedMutex> guard(mp_mutex);
405405
guids.clear();
406+
guids.reserve(matched_local_readers_.size() + matched_datasharing_readers_.size() + matched_remote_readers_.size());
406407
for_matched_readers(matched_local_readers_, matched_datasharing_readers_, matched_remote_readers_,
407408
[&guids](const ReaderLocator& reader)
408409
{
409-
guids.push_back(reader.remote_guid());
410+
guids.emplace_back(reader.remote_guid());
410411
return false;
411412
}
412413
);

0 commit comments

Comments
 (0)