Skip to content

Commit ff54392

Browse files
authored
Add const reference in 'update_partitions()' (#176)
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
1 parent e2230e8 commit ff54392

9 files changed

Lines changed: 9 additions & 9 deletions

File tree

ddspipe_core/include/ddspipe_core/interface/IParticipant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class IParticipant
154154
*/
155155
DDSPIPE_CORE_DllAPI
156156
virtual void update_partitions(
157-
std::set<std::string> partitions) = 0;
157+
const std::set<std::string>& partitions) = 0;
158158

159159
/**
160160
* Update the content_topicfilter data structure of the participant

ddspipe_participants/include/ddspipe_participants/participant/auxiliar/BlankParticipant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class BlankParticipant : public core::IParticipant
9797
//! Override update_partitions() IParticipant method
9898
DDSPIPE_PARTICIPANTS_DllAPI
9999
virtual void update_partitions(
100-
std::set<std::string> partitions) override;
100+
const std::set<std::string>& partitions) override;
101101

102102
//! Override update_content_topicfilter() IParticipant method
103103
DDSPIPE_PARTICIPANTS_DllAPI

ddspipe_participants/include/ddspipe_participants/participant/dds/CommonParticipant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class CommonParticipant : public core::IParticipant
140140
//! Override update_partitions() IParticipant method
141141
DDSPIPE_PARTICIPANTS_DllAPI
142142
virtual void update_partitions(
143-
std::set<std::string> partitions) override;
143+
const std::set<std::string>& partitions) override;
144144

145145
//! Override update_content_topicfilter() IParticipant method
146146
DDSPIPE_PARTICIPANTS_DllAPI

ddspipe_participants/include/ddspipe_participants/participant/dynamic_types/SchemaParticipant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class SchemaParticipant : public core::IParticipant
9898
//! Override update_partitions() IParticipant method
9999
DDSPIPE_PARTICIPANTS_DllAPI
100100
virtual void update_partitions(
101-
std::set<std::string> partitions) override;
101+
const std::set<std::string>& partitions) override;
102102

103103
//! Override update_content_topicfilter() IParticipant method
104104
DDSPIPE_PARTICIPANTS_DllAPI

ddspipe_participants/include/ddspipe_participants/participant/rtps/CommonParticipant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class CommonParticipant
150150
//! Override update_partitions() IParticipant method
151151
DDSPIPE_PARTICIPANTS_DllAPI
152152
virtual void update_partitions(
153-
std::set<std::string> partitions) override;
153+
const std::set<std::string>& partitions) override;
154154

155155
//! Override update_content_topicfilter() IParticipant method
156156
DDSPIPE_PARTICIPANTS_DllAPI

ddspipe_participants/src/cpp/participant/auxiliar/BlankParticipant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void BlankParticipant::clear_topic_partitions()
142142
}
143143

144144
void BlankParticipant::update_partitions(
145-
std::set<std::string> partitions)
145+
const std::set<std::string>& partitions)
146146
{
147147
// Nothing
148148
}

ddspipe_participants/src/cpp/participant/dds/CommonParticipant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ fastdds::dds::Topic* CommonParticipant::topic_related_(
553553
}
554554

555555
void CommonParticipant::update_partitions(
556-
std::set<std::string> partitions)
556+
const std::set<std::string>& partitions)
557557
{
558558
partition_filter_set_ = std::move(partitions);
559559
}

ddspipe_participants/src/cpp/participant/dynamic_types/SchemaParticipant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void SchemaParticipant::clear_topic_partitions()
176176
}
177177

178178
void SchemaParticipant::update_partitions(
179-
std::set<std::string> partitions)
179+
const std::set<std::string>& partitions)
180180
{
181181
// Nothing
182182
}

ddspipe_participants/src/cpp/participant/rtps/CommonParticipant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ void CommonParticipant::clear_topic_partitions()
646646
}
647647

648648
void CommonParticipant::update_partitions(
649-
std::set<std::string> partitions)
649+
const std::set<std::string>& partitions)
650650
{
651651
partition_filter_set_ = std::move(partitions);
652652
}

0 commit comments

Comments
 (0)