From 92af26fb614d564402bb4d8f493d527318dd2dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Mon, 25 Nov 2024 16:21:42 +0100 Subject: [PATCH] make linters happy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- rmw_zenoh_cpp/src/detail/rmw_client_data.cpp | 2 +- rmw_zenoh_cpp/src/detail/rmw_service_data.cpp | 5 +++-- rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp | 9 ++++----- rmw_zenoh_cpp/src/zenohd/main.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp index 5e3b7cfc..727d4b0b 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp @@ -249,7 +249,7 @@ rmw_ret_t ClientData::take_response( auto & reply = latest_reply->get_sample(); - if(!reply.is_ok()) { + if (!reply.is_ok()) { RMW_SET_ERROR_MSG("invalid reply sample"); return RMW_RET_ERROR; } diff --git a/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp index 82caae80..99c49cdb 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp @@ -144,7 +144,7 @@ std::shared_ptr ServiceData::make( std::weak_ptr data_wp = service_data; service_data->qable_ = session->declare_queryable( service_ke, - [data_wp](const zenoh::Query & query){ + [data_wp](const zenoh::Query & query) { auto sub_data = data_wp.lock(); if (sub_data == nullptr) { RMW_ZENOH_LOG_ERROR_NAMED( @@ -417,7 +417,8 @@ rmw_ret_t ServiceData::send_response( const zenoh::Query & loaned_query = query->get_query(); zenoh::Query::ReplyOptions options = zenoh::Query::ReplyOptions::create_default(); - options.attachment = create_map_and_set_sequence_num(request_id->sequence_number, + options.attachment = create_map_and_set_sequence_num( + request_id->sequence_number, request_id->writer_guid); std::vector raw_bytes( diff --git a/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp index 5ed6dfb4..581e6607 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp @@ -268,11 +268,10 @@ bool SubscriptionData::init() opts.accept_replies = ZC_REPLY_KEYEXPR_ANY; zenoh::ZResult err; - std::get>( - sub_data->sub_.value()).get( - zenoh::KeyExpr(selector), - std::move(opts), - &err); + std::get>(sub_data->sub_.value()).get( + zenoh::KeyExpr(selector), + std::move(opts), + &err); if (err != Z_OK) { RMW_SET_ERROR_MSG("unable to get querying subscriber."); diff --git a/rmw_zenoh_cpp/src/zenohd/main.cpp b/rmw_zenoh_cpp/src/zenohd/main.cpp index ea0b4fbe..ab791a03 100644 --- a/rmw_zenoh_cpp/src/zenohd/main.cpp +++ b/rmw_zenoh_cpp/src/zenohd/main.cpp @@ -79,7 +79,7 @@ int main(int argc, char ** argv) std::move(config.value()), zenoh::Session::SessionOptions::create_default(), &result); - if(result != Z_OK) { + if (result != Z_OK) { std::cout << "Error opening Session!" << "\\n"; return 1; }