From 74ed7697ba7c2c0362c3afcd50200623be51d814 Mon Sep 17 00:00:00 2001 From: yellowhatter Date: Wed, 20 Nov 2024 15:32:03 +0300 Subject: [PATCH] fix format --- rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp | 7 ++++--- rmw_zenoh_cpp/src/detail/shm_context.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) 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 6693ac59..bdfd57ee 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp @@ -181,9 +181,10 @@ class rmw_context_impl_s::Data final if (rmw_zenoh_cpp::zenoh_shm_enabled()) { RMW_ZENOH_LOG_DEBUG_NAMED("rmw_zenoh_cpp", "SHM is enabled"); - shm_ = std::make_optional(rmw_zenoh_cpp::ShmContext( - rmw_zenoh_cpp::zenoh_shm_alloc_size(), - rmw_zenoh_cpp::zenoh_shm_message_size_threshold() + shm_ = std::make_optional( + rmw_zenoh_cpp::ShmContext( + rmw_zenoh_cpp::zenoh_shm_alloc_size(), + rmw_zenoh_cpp::zenoh_shm_message_size_threshold() )); } else { RMW_ZENOH_LOG_DEBUG_NAMED("rmw_zenoh_cpp", "SHM is disabled"); diff --git a/rmw_zenoh_cpp/src/detail/shm_context.cpp b/rmw_zenoh_cpp/src/detail/shm_context.cpp index b8acaf3b..dab7b1cf 100644 --- a/rmw_zenoh_cpp/src/detail/shm_context.cpp +++ b/rmw_zenoh_cpp/src/detail/shm_context.cpp @@ -23,15 +23,15 @@ namespace rmw_zenoh_cpp ShmContext::ShmContext(size_t alloc_size, size_t msgsize_threshold) :msgsize_threshold(msgsize_threshold) { - // Create Layout for provider's memory - // Provider's alignment will be 1 byte as we are going to make only 1-byte aligned allocations - // TODO(yellowhatter): use zenoh_shm_message_size_threshold as base for alignment + // Create Layout for provider's memory + // Provider's alignment will be 1 byte as we are going to make only 1-byte aligned allocations + // TODO(yellowhatter): use zenoh_shm_message_size_threshold as base for alignment z_alloc_alignment_t alignment = {0}; z_owned_memory_layout_t layout; if (z_memory_layout_new(&layout, alloc_size, alignment) != Z_OK) { throw std::runtime_error("Unable to create a Layout for SHM provider."); } - // Create SHM provider + // Create SHM provider const auto provider_creation_result = z_posix_shm_provider_new(&shm_provider, z_loan(layout)); z_drop(z_move(layout));