From fcd8937411bb26281f8ed4e195d6df18dd44c339 Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Tue, 24 Dec 2024 19:03:32 +0800 Subject: [PATCH 1/4] fix: align the default value of reliability --- include/zenoh/api/session.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/zenoh/api/session.hxx b/include/zenoh/api/session.hxx index d236969..7ab0b29 100644 --- a/include/zenoh/api/session.hxx +++ b/include/zenoh/api/session.hxx @@ -532,7 +532,7 @@ class Session : public Owned<::z_owned_session_t> { /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future /// release. /// @brief The delete operation reliability. - Reliability reliability = Reliability::Z_RELIABILITY_BEST_EFFORT; + Reliability reliability = Reliability::Z_RELIABILITY_RELIABLE; #endif /// @brief the timestamp of this message. std::optional timestamp = {}; @@ -588,7 +588,7 @@ class Session : public Owned<::z_owned_session_t> { /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future /// release. /// @brief The put operation reliability. - Reliability reliability = Reliability::Z_RELIABILITY_BEST_EFFORT; + Reliability reliability = Reliability::Z_RELIABILITY_RELIABLE; #endif #if defined(ZENOHCXX_ZENOHC) && defined(Z_FEATURE_UNSTABLE_API) /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future @@ -648,7 +648,7 @@ class Session : public Owned<::z_owned_session_t> { /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future /// release. /// @brief The publisher reliability. - Reliability reliability = Reliability::Z_RELIABILITY_BEST_EFFORT; + Reliability reliability = Reliability::Z_RELIABILITY_RELIABLE; #endif #if defined(ZENOHCXX_ZENOHC) && defined(Z_FEATURE_UNSTABLE_API) /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future From ff686d655a7ddfa8649acba54cfd104b1c37443d Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Tue, 7 Jan 2025 15:11:37 +0800 Subject: [PATCH 2/4] chore: address the comment --- include/zenoh/api/session.hxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/zenoh/api/session.hxx b/include/zenoh/api/session.hxx index 7ab0b29..ca7e090 100644 --- a/include/zenoh/api/session.hxx +++ b/include/zenoh/api/session.hxx @@ -14,6 +14,7 @@ #pragma once +#include #include #include "../detail/closures_concrete.hxx" @@ -532,7 +533,7 @@ class Session : public Owned<::z_owned_session_t> { /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future /// release. /// @brief The delete operation reliability. - Reliability reliability = Reliability::Z_RELIABILITY_RELIABLE; + Reliability reliability = z_reliability_default(); #endif /// @brief the timestamp of this message. std::optional timestamp = {}; @@ -588,7 +589,7 @@ class Session : public Owned<::z_owned_session_t> { /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future /// release. /// @brief The put operation reliability. - Reliability reliability = Reliability::Z_RELIABILITY_RELIABLE; + Reliability reliability = z_reliability_default(); #endif #if defined(ZENOHCXX_ZENOHC) && defined(Z_FEATURE_UNSTABLE_API) /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future @@ -648,7 +649,7 @@ class Session : public Owned<::z_owned_session_t> { /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future /// release. /// @brief The publisher reliability. - Reliability reliability = Reliability::Z_RELIABILITY_RELIABLE; + Reliability reliability = z_reliability_default(); #endif #if defined(ZENOHCXX_ZENOHC) && defined(Z_FEATURE_UNSTABLE_API) /// @warning This API has been marked as unstable: it works as advertised, but it may be changed in a future From 6ce2504998e722ce43f4d777d31fc4c87beb2d5a Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Tue, 7 Jan 2025 15:56:15 +0800 Subject: [PATCH 3/4] style: clang-format --- include/zenoh/api/session.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/include/zenoh/api/session.hxx b/include/zenoh/api/session.hxx index ca7e090..b1b7cf6 100644 --- a/include/zenoh/api/session.hxx +++ b/include/zenoh/api/session.hxx @@ -15,6 +15,7 @@ #pragma once #include + #include #include "../detail/closures_concrete.hxx" From 6e268d461adea54bc41febfab12584fad417ed55 Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Tue, 7 Jan 2025 16:32:57 +0800 Subject: [PATCH 4/4] fix: compile failure --- include/zenoh/api/session.hxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/zenoh/api/session.hxx b/include/zenoh/api/session.hxx index b1b7cf6..fc85993 100644 --- a/include/zenoh/api/session.hxx +++ b/include/zenoh/api/session.hxx @@ -14,8 +14,6 @@ #pragma once -#include - #include #include "../detail/closures_concrete.hxx"