From f9d06d5afec0b764d8fa10acad975f3610b2ec49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Mon, 25 Nov 2024 14:13:50 +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 | 4 ++-- .../src/detail/rmw_context_impl_s.cpp | 20 ++++++++++--------- rmw_zenoh_cpp/src/detail/rmw_node_data.cpp | 4 ++-- .../src/detail/rmw_publisher_data.cpp | 4 ++-- rmw_zenoh_cpp/src/detail/rmw_service_data.cpp | 16 +++++++-------- .../src/detail/rmw_subscription_data.cpp | 12 +++++------ 6 files changed, 31 insertions(+), 29 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp index f57203fb..28490b59 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp @@ -479,8 +479,8 @@ void ClientData::_shutdown() std::move(token_).value().undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "Unable to undeclare liveliness token"); + "rmw_zenoh_cpp", + "Unable to undeclare liveliness token"); return; } diff --git a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp index 52867e8e..03fd9d7d 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp @@ -88,9 +88,9 @@ class rmw_context_impl_s::Data final std::string shm_enabled = config.value().get(Z_CONFIG_SHARED_MEMORY_KEY, &result); if (result != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "Not able to get %s from the config file", - Z_CONFIG_SHARED_MEMORY_KEY); + "rmw_zenoh_cpp", + "Not able to get %s from the config file", + Z_CONFIG_SHARED_MEMORY_KEY); } // Initialize the zenoh session. @@ -187,7 +187,8 @@ class rmw_context_impl_s::Data final // Initialize the shm manager if shared_memory is enabled in the config. shm_provider_ = std::nullopt; if (shm_enabled == "true") { - auto layout = zenoh::MemoryLayout(SHM_BUFFER_SIZE_MB * 1024 * 1024, + auto layout = zenoh::MemoryLayout( + SHM_BUFFER_SIZE_MB * 1024 * 1024, zenoh::AllocAlignment({5})); zenoh::PosixShmProvider provider(layout, &result); if (result != Z_OK) { @@ -220,9 +221,10 @@ class rmw_context_impl_s::Data final data_shared_ptr = data_to_data_shared_ptr_map[this]; } - // Update the graph cache. - data_shared_ptr->update_graph_cache(sample, - std::string(sample.get_keyexpr().as_string_view())); + // Update the graph cache. + data_shared_ptr->update_graph_cache( + sample, + std::string(sample.get_keyexpr().as_string_view())); }, zenoh::closures::none, std::move(sub_options), @@ -260,8 +262,8 @@ class rmw_context_impl_s::Data final std::move(graph_subscriber_cpp_).value().undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "Unable to undeclare liveliness token"); + "rmw_zenoh_cpp", + "Unable to undeclare liveliness token"); return RMW_RET_ERROR; } diff --git a/rmw_zenoh_cpp/src/detail/rmw_node_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_node_data.cpp index 1ec650d4..0ebc6c26 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_node_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_node_data.cpp @@ -403,8 +403,8 @@ rmw_ret_t NodeData::shutdown() std::move(token_).value().undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "Unable to undeclare liveliness token"); + "rmw_zenoh_cpp", + "Unable to undeclare liveliness token"); return RMW_RET_ERROR; } diff --git a/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp index 1d41c46a..1634743a 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp @@ -391,8 +391,8 @@ rmw_ret_t PublisherData::shutdown() std::move(token_).value().undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "Unable to undeclare liveliness token"); + "rmw_zenoh_cpp", + "Unable to undeclare liveliness token"); return RMW_RET_ERROR; } std::move(pub_).undeclare(&err); diff --git a/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp index a5cd078e..508178c2 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_service_data.cpp @@ -149,8 +149,8 @@ std::shared_ptr ServiceData::make( if (sub_data == nullptr) { RMW_ZENOH_LOG_ERROR_NAMED( "rmw_zenoh_cpp", - "Unable to obtain ServiceData from data for %s.", - std::string(query.get_keyexpr().as_string_view())); + "Unable to obtain ServiceData from data for %s.", + std::string(query.get_keyexpr().as_string_view())); return; } @@ -339,8 +339,8 @@ rmw_ret_t ServiceData::take_request( *taken = true; } else { RMW_ZENOH_LOG_DEBUG_NAMED( - "rmw_zenoh_cpp", - "ServiceData not able to get slice data"); + "rmw_zenoh_cpp", + "ServiceData not able to get slice data"); return RMW_RET_ERROR; } return RMW_RET_OK; @@ -497,16 +497,16 @@ rmw_ret_t ServiceData::shutdown() std::move(token_).value().undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "Unable to undeclare liveliness token"); + "rmw_zenoh_cpp", + "Unable to undeclare liveliness token"); return RMW_RET_ERROR; } std::move(qable_).value().undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "Unable to undeclare liveliness token"); + "rmw_zenoh_cpp", + "Unable to undeclare queryable"); return RMW_RET_ERROR; } diff --git a/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp index 895501c8..848eeb94 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp @@ -398,8 +398,8 @@ rmw_ret_t SubscriptionData::shutdown() std::move(token_).value().undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "Unable to undeclare liveliness token"); + "rmw_zenoh_cpp", + "Unable to undeclare liveliness token"); return RMW_RET_ERROR; } @@ -409,8 +409,8 @@ rmw_ret_t SubscriptionData::shutdown() std::move(*sub).undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "failed to undeclare sub."); + "rmw_zenoh_cpp", + "failed to undeclare sub."); return RMW_RET_ERROR; } } else { @@ -420,8 +420,8 @@ rmw_ret_t SubscriptionData::shutdown() std::move(*sub).undeclare(&err); if (err != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( - "rmw_zenoh_cpp", - "failed to undeclare querying sub."); + "rmw_zenoh_cpp", + "failed to undeclare querying sub."); return RMW_RET_ERROR; } }