From c3b159f5b83a964dc6680340af6bd6ae81f87027 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:06:04 -0800 Subject: [PATCH] fix: use the default destructor that automatically drops the zenoh reply/query and hence sends the final signal (#473) (#475) (cherry picked from commit 4fc36b75606911c2bbd2467667827f04edc7254f) Co-authored-by: Yuyuan Yuan --- rmw_zenoh_cpp/src/detail/zenoh_utils.cpp | 6 ------ rmw_zenoh_cpp/src/detail/zenoh_utils.hpp | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp b/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp index d097b2e7..61bca63d 100644 --- a/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp +++ b/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp @@ -53,9 +53,6 @@ std::chrono::nanoseconds::rep ZenohQuery::get_received_timestamp() const return received_timestamp_; } -///============================================================================= -ZenohQuery::~ZenohQuery() {} - ///============================================================================= const zenoh::Query & ZenohQuery::get_query() const {return query_;} @@ -68,9 +65,6 @@ ZenohReply::ZenohReply( received_timestamp_ = received_timestamp; } -///============================================================================= -ZenohReply::~ZenohReply() {} - ///============================================================================= const zenoh::Reply & ZenohReply::get_sample() const { diff --git a/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp b/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp index c4f646aa..7034927c 100644 --- a/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp +++ b/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp @@ -40,7 +40,7 @@ class ZenohReply final public: ZenohReply(const zenoh::Reply & reply, std::chrono::nanoseconds::rep received_timestamp); - ~ZenohReply(); + ~ZenohReply() = default; const zenoh::Reply & get_sample() const; @@ -58,7 +58,7 @@ class ZenohQuery final public: ZenohQuery(const zenoh::Query & query, std::chrono::nanoseconds::rep received_timestamp); - ~ZenohQuery(); + ~ZenohQuery() = default; const zenoh::Query & get_query() const;