From b47b1298f9175a549c6761a02588805f3c82f764 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Thu, 30 May 2024 14:58:40 +0200 Subject: [PATCH] Refs #21120. Uncrustify. Signed-off-by: Miguel Company --- src/cpp/rtps/reader/BaseReader.cpp | 25 ++++++++++++------------- src/cpp/rtps/reader/BaseReader.hpp | 1 - src/cpp/rtps/writer/StatefulWriter.cpp | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/cpp/rtps/reader/BaseReader.cpp b/src/cpp/rtps/reader/BaseReader.cpp index 5ffc7a2f3f..c6ead7eba8 100644 --- a/src/cpp/rtps/reader/BaseReader.cpp +++ b/src/cpp/rtps/reader/BaseReader.cpp @@ -163,9 +163,9 @@ bool BaseReader::is_sample_valid( { // Check if the payload is dirty // Note the Payloads used in loans include a mandatory RTPS 2.3 extra header - if (!fastrtps::rtps::DataSharingPayloadPool::check_sequence_number( - static_cast(data) - fastrtps::rtps::SerializedPayload_t::representation_header_size, - sn)) + auto payload = static_cast(data); + payload -= fastrtps::rtps::SerializedPayload_t::representation_header_size; + if (!fastrtps::rtps::DataSharingPayloadPool::check_sequence_number(payload, sn)) { return false; } @@ -385,7 +385,7 @@ fastrtps::rtps::History::const_iterator BaseReader::findCacheInFragmentedProcess fastrtps::rtps::CacheChange_t** change, fastrtps::rtps::History::const_iterator hint) const { - fastrtps::rtps::History::const_iterator ret_val = history_->get_change_nts(sequence_number, writer_guid, change, hint); + auto ret_val = history_->get_change_nts(sequence_number, writer_guid, change, hint); if (nullptr != *change && (*change)->is_fully_assembled()) { @@ -399,7 +399,7 @@ bool BaseReader::is_datasharing_compatible_with( const fastrtps::rtps::WriterProxyData& wdata) { if (!is_datasharing_compatible_ || - wdata.m_qos.data_sharing.kind() == fastdds::dds::OFF) + wdata.m_qos.data_sharing.kind() == fastdds::dds::DataSharingKind::OFF) { return false; } @@ -425,18 +425,17 @@ void BaseReader::setup_datasharing( if (att.endpoint.data_sharing_configuration().kind() != fastdds::dds::DataSharingKind::OFF) { using std::placeholders::_1; - std::shared_ptr notification = - DataSharingNotification::create_notification( - getGuid(), att.endpoint.data_sharing_configuration().shm_directory()); + std::shared_ptr notification = DataSharingNotification::create_notification( + getGuid(), att.endpoint.data_sharing_configuration().shm_directory()); if (notification) { is_datasharing_compatible_ = true; datasharing_listener_.reset(new DataSharingListener( - notification, - att.endpoint.data_sharing_configuration().shm_directory(), - att.data_sharing_listener_thread, - att.matched_writers_allocation, - this)); + notification, + att.endpoint.data_sharing_configuration().shm_directory(), + att.data_sharing_listener_thread, + att.matched_writers_allocation, + this)); // We can start the listener here, as no writer can be matched already, // so no notification will occur until the non-virtual instance is constructed. diff --git a/src/cpp/rtps/reader/BaseReader.hpp b/src/cpp/rtps/reader/BaseReader.hpp index 5a8ef7d59c..7f65fd0808 100644 --- a/src/cpp/rtps/reader/BaseReader.hpp +++ b/src/cpp/rtps/reader/BaseReader.hpp @@ -88,7 +88,6 @@ class BaseReader fastrtps::rtps::ReaderHistory* hist, fastrtps::rtps::ReaderListener* listen); - public: virtual ~BaseReader(); diff --git a/src/cpp/rtps/writer/StatefulWriter.cpp b/src/cpp/rtps/writer/StatefulWriter.cpp index 8df8fe8e0b..11c229ae3b 100644 --- a/src/cpp/rtps/writer/StatefulWriter.cpp +++ b/src/cpp/rtps/writer/StatefulWriter.cpp @@ -526,7 +526,7 @@ bool StatefulWriter::intraprocess_heartbeat( { incrementHBCount(); returned_value = fastdds::rtps::BaseReader::downcast(reader)->processHeartbeatMsg( - m_guid, m_heartbeatCount, first_seq, last_seq, true, liveliness, c_VendorId_eProsima); + m_guid, m_heartbeatCount, first_seq, last_seq, true, liveliness, c_VendorId_eProsima); } }