From ab4778c5f7a25fae8c20ce38b0b049265104874a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Moreno?= Date: Tue, 23 Jul 2024 09:53:44 +0200 Subject: [PATCH] Refs #21313: Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ricardo González Moreno --- src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp | 3 ++- src/cpp/rtps/participant/RTPSParticipantImpl.cpp | 2 +- src/cpp/rtps/participant/RTPSParticipantImpl.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp b/src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp index 601e5cd1ab1..85d8e14bced 100644 --- a/src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp +++ b/src/cpp/rtps/builtin/discovery/endpoint/EDPStatic.cpp @@ -133,7 +133,8 @@ bool EDPStatic::initEDP( } // Check there is a Participant's property changing the exchange format. - for (auto& property : mp_RTPSParticipant->get_attributes().properties.properties()) + auto& properties = mp_RTPSParticipant->get_attributes().properties.properties(); + for (auto& property : properties) { if (0 == property.name().compare(exchange_format_property_name)) { diff --git a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp index 4727494c5b0..adb9d6fbb97 100644 --- a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp +++ b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp @@ -3161,7 +3161,7 @@ dds::utils::TypePropagation RTPSParticipantImpl::type_propagation() const return dds::utils::to_type_propagation(m_att.properties); } -RTPSParticipantAttributes RTPSParticipantImpl::get_attributes() const +const RTPSParticipantAttributes& RTPSParticipantImpl::get_attributes() const { return m_att; } diff --git a/src/cpp/rtps/participant/RTPSParticipantImpl.h b/src/cpp/rtps/participant/RTPSParticipantImpl.h index d033708604a..a8a6e4f00db 100644 --- a/src/cpp/rtps/participant/RTPSParticipantImpl.h +++ b/src/cpp/rtps/participant/RTPSParticipantImpl.h @@ -795,7 +795,7 @@ class RTPSParticipantImpl public: - RTPSParticipantAttributes get_attributes() const; + const RTPSParticipantAttributes& get_attributes() const; /** * Create a Writer in this RTPSParticipant.