Skip to content

Commit

Permalink
fix: z_error_t -> z_result_t
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan committed Aug 6, 2024
1 parent 3ee8cd3 commit e5f5b58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/attachment_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ bool create_attachment_iter(z_owned_bytes_t *kv_pair, void *context) {
return true;
}

z_error_t attachement_data_t::serialize_to_zbytes(z_owned_bytes_t *attachment) {
z_result_t attachement_data_t::serialize_to_zbytes(z_owned_bytes_t *attachment) {
attachement_context_t context = attachement_context_t(this);
return z_bytes_serialize_from_iter(attachment, create_attachment_iter,
(void *)&context);
Expand Down
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/attachment_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class attachement_data_t final {
source_timestamp = _source_timestamp;
memcpy(source_gid, _source_gid, RMW_GID_STORAGE_SIZE);
}
z_error_t serialize_to_zbytes(z_owned_bytes_t *);
z_result_t serialize_to_zbytes(z_owned_bytes_t *);
};

class attachement_context_t final {
Expand Down
8 changes: 4 additions & 4 deletions rmw_zenoh_cpp/src/rmw_zenoh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ rmw_node_t *rmw_create_node(rmw_context_t *context, const char *name,
}

z_owned_keyexpr_t keyexpr;
z_error_t z_ret =
z_result_t z_ret =
z_keyexpr_from_str(&keyexpr, node_data->entity->keyexpr().c_str());
// WARN(yuyuan): z_view_keyexpr_t would fail
// z_view_keyexpr_t keyexpr;
// z_error_t z_ret =
// z_result_t z_ret =
// z_view_keyexpr_from_str(&keyexpr,
// node_data->entity->keyexpr().c_str());
if (z_ret) {
Expand Down Expand Up @@ -668,7 +668,7 @@ rmw_publisher_t *rmw_create_publisher(
// z_view_keyexpr_t liveliness_keyexpr;
// z_view_keyexpr_from_str(&liveliness_keyexpr,
// publisher_data->entity->keyexpr().c_str());
z_error_t z_ret = zc_liveliness_declare_token(
z_result_t z_ret = zc_liveliness_declare_token(
&publisher_data->token, z_loan(node->context->impl->session),
z_loan(liveliness_keyexpr), NULL);
auto free_token = rcpputils::make_scope_exit([publisher_data]() {
Expand Down Expand Up @@ -2768,7 +2768,7 @@ rmw_service_t *rmw_create_service(
z_queryable_options_t qable_options;
z_queryable_options_default(&qable_options);
qable_options.complete = true;
z_error_t z_ret = z_declare_queryable(
z_result_t z_ret = z_declare_queryable(
&service_data->qable, z_loan(context_impl->session),
z_loan(service_data->keyexpr), z_move(callback), &qable_options);

Expand Down

0 comments on commit e5f5b58

Please sign in to comment.