Skip to content

Commit

Permalink
[#490] Rename worst_case_memory_size to maximum_elements in slice exa…
Browse files Browse the repository at this point in the history
…mple
  • Loading branch information
orecham committed Nov 7, 2024
1 parent 5962a0c commit 7d4daa7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/cxx/publish_subscribe_dynamic_data/src/publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ auto main() -> int {
.open_or_create()
.expect("successful service creation/opening");

const uint64_t worst_case_memory_size = 1024; // NOLINT
auto publisher = service.publisher_builder()
.max_slice_len(worst_case_memory_size)
.create()
.expect("successful publisher creation");
// Since the payload type is uint8_t, this number is the same as the number of bytes in the payload.
// For other types, number of bytes used by the payload will be max_slice_len * sizeof(Payload::ValueType)
const uint64_t maximum_elements = 1024; // NOLINT
auto publisher =
service.publisher_builder().max_slice_len(maximum_elements).create().expect("successful publisher creation");

auto counter = 0;

Expand Down

0 comments on commit 7d4daa7

Please sign in to comment.