Skip to content

Commit

Permalink
make linters happy
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Nov 25, 2024
1 parent 0f58e29 commit f9d06d5
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 29 deletions.
4 changes: 2 additions & 2 deletions rmw_zenoh_cpp/src/detail/rmw_client_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
20 changes: 11 additions & 9 deletions rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions rmw_zenoh_cpp/src/detail/rmw_node_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions rmw_zenoh_cpp/src/detail/rmw_service_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ std::shared_ptr<ServiceData> 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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
12 changes: 6 additions & 6 deletions rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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 {
Expand All @@ -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;
}
}
Expand Down

0 comments on commit f9d06d5

Please sign in to comment.