Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use RMW_GID_STORAGE_SIZE to client_service_id_t. #515

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions rmw_cyclonedds_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,7 @@ struct CddsSubscription : CddsEntity

struct client_service_id_t
{
// strangely, the writer_guid in an rmw_request_id_t is smaller than the identifier in
// an rmw_gid_t
uint8_t data[sizeof((reinterpret_cast<rmw_request_id_t *>(0))->writer_guid)]; // NOLINT
uint8_t data[RMW_GID_STORAGE_SIZE];
};

struct CddsCS
Expand Down Expand Up @@ -4889,11 +4887,8 @@ static void get_unique_csid(const rmw_node_t * node, client_service_id_t & id)
{
auto impl = node->context->impl;
static_assert(
sizeof(dds_guid_t) <= sizeof(id.data),
sizeof(dds_guid_t) <= RMW_GID_STORAGE_SIZE,
"client/service id assumed it can hold a DDSI GUID");
static_assert(
sizeof(dds_guid_t) <= sizeof((reinterpret_cast<rmw_gid_t *>(0))->data),
"client/service id assumes rmw_gid_t can hold a DDSI GUID");
uint32_t x;

{
Expand Down