Skip to content

Commit

Permalink
Refs #21120. Uncrustify.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany committed Jun 3, 2024
1 parent 744241c commit b47b129
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
25 changes: 12 additions & 13 deletions src/cpp/rtps/reader/BaseReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const fastrtps::rtps::octet*>(data) - fastrtps::rtps::SerializedPayload_t::representation_header_size,
sn))
auto payload = static_cast<const fastrtps::rtps::octet*>(data);
payload -= fastrtps::rtps::SerializedPayload_t::representation_header_size;
if (!fastrtps::rtps::DataSharingPayloadPool::check_sequence_number(payload, sn))
{
return false;
}
Expand Down Expand Up @@ -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())
{
Expand All @@ -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;
}
Expand All @@ -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<DataSharingNotification> notification =
DataSharingNotification::create_notification(
getGuid(), att.endpoint.data_sharing_configuration().shm_directory());
std::shared_ptr<DataSharingNotification> 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.
Expand Down
1 change: 0 additions & 1 deletion src/cpp/rtps/reader/BaseReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class BaseReader
fastrtps::rtps::ReaderHistory* hist,
fastrtps::rtps::ReaderListener* listen);


public:

virtual ~BaseReader();
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit b47b129

Please sign in to comment.