Skip to content

Commit d84c90c

Browse files
Make DomainParticipant::get_instance_handle return by value (#6149)
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
1 parent 61f8677 commit d84c90c

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

include/fastdds/dds/domain/DomainParticipant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ class DomainParticipant : public Entity
11591159
*
11601160
* @return InstanceHandle of this DomainParticipant.
11611161
*/
1162-
FASTDDS_EXPORTED_API const InstanceHandle_t& get_instance_handle() const;
1162+
FASTDDS_EXPORTED_API InstanceHandle_t get_instance_handle() const;
11631163

11641164
// From here legacy RTPS methods.
11651165

src/cpp/fastdds/domain/DomainParticipant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ rpc::ServiceTypeSupport DomainParticipant::find_service_type(
687687
return impl_->find_service_type(service_type_name);
688688
}
689689

690-
const InstanceHandle_t& DomainParticipant::get_instance_handle() const
690+
InstanceHandle_t DomainParticipant::get_instance_handle() const
691691
{
692692
return impl_->get_instance_handle();
693693
}

src/cpp/fastdds/domain/DomainParticipantImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ IContentFilterFactory* DomainParticipantImpl::find_content_filter_factory(
775775
return &dds_sql_filter_factory_;
776776
}
777777

778-
const InstanceHandle_t& DomainParticipantImpl::get_instance_handle() const
778+
InstanceHandle_t DomainParticipantImpl::get_instance_handle() const
779779
{
780780
return handle_;
781781
}

src/cpp/fastdds/domain/DomainParticipantImpl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ class DomainParticipantImpl
653653
const rpc::ServiceTypeSupport find_service_type(
654654
const std::string& service_name) const;
655655

656-
const InstanceHandle_t& get_instance_handle() const;
656+
InstanceHandle_t get_instance_handle() const;
657657

658658
// From here legacy RTPS methods.
659659

0 commit comments

Comments
 (0)