Skip to content

Commit

Permalink
[eclipse-iceoryx#264] No designated initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Jul 12, 2024
1 parent cd2fd3f commit f4cfd2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions examples/cxx/complex_data_types/src/complex_data_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ int main() {
payload.plain_old_data = counter;
payload.text = iox::string<8>("hello");
payload.vec_of_data.push_back(counter);
payload.vec_of_complex_data.push_back(
ComplexData{.name = iox::string<4>("bla"),
.data = iox::vector<uint64_t, 4>(2, counter)});
payload.vec_of_complex_data.push_back(ComplexData{
iox::string<4>("bla"), iox::vector<uint64_t, 4>(2, counter)});

send_sample(std::move(sample)).expect("send successful");

Expand Down
4 changes: 2 additions & 2 deletions examples/cxx/publish_subscribe/src/publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ int main() {
counter += 1;
auto sample = publisher.loan_uninit().expect("acquire sample");

sample.write_payload(TransmissionData{
.x = counter, .y = counter * 3, .funky = counter * 812.12});
sample.write_payload(
TransmissionData{counter, counter * 3, counter * 812.12});

send_sample(std::move(sample)).expect("send successful");

Expand Down

0 comments on commit f4cfd2c

Please sign in to comment.