Skip to content
This repository was archived by the owner on Dec 9, 2021. It is now read-only.

Commit

Permalink
simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Mar 4, 2019
1 parent 70f5b8c commit 2337a69
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,10 @@ convert_dds_message_to_ros(
ros_message.@(member.name).resize(size);
@[ end if]@
for (DDS::ULong i = 0; i < size; i++) {
@[ if isinstance(member.type.basetype, BaseString)]@
ros_message.@(member.name)[i] = dds_message.@(member.name)_[i];
@[ elif isinstance(member.type.basetype, BasicType)]@
@[ if member.type.basetype.type == 'boolean']@
@[ if isinstance(member.type.basetype, BaseString) and member.type.basetype.type == 'boolean']@

This comment has been minimized.

Copy link
@sloretz

sloretz Mar 4, 2019

Contributor

BaseString -> BasicType

This comment has been minimized.

Copy link
@dirk-thomas

dirk-thomas Mar 4, 2019

Author Member

Fixed in 0c633e2.

ros_message.@(member.name)[i] = (dds_message.@(member.name)_[i] != 0);
@[ else]@
@[ if isinstance(member.type.basetype, BaseString) or isinstance(member.type.basetype, BaseString)]@

This comment has been minimized.

Copy link
@sloretz

sloretz Mar 4, 2019

Contributor

BaseString -> BasicType on one of the conditions

This comment has been minimized.

Copy link
@dirk-thomas

dirk-thomas Mar 4, 2019

Author Member

Fixed in 0c633e2.

ros_message.@(member.name)[i] = dds_message.@(member.name)_[i];
@[ end if]@
@[ else]@
@('::'.join(member.type.basetype.namespaces))::typesupport_opensplice_cpp::convert_dds_message_to_ros(
dds_message.@(member.name)_[i], ros_message.@(member.name)[i]);
Expand Down

0 comments on commit 2337a69

Please sign in to comment.