Skip to content

Commit

Permalink
Add assignment of parameter-related fields in node options constructor (
Browse files Browse the repository at this point in the history
ros2#708)

* Add assignment of missing parameter-related fields in node options copy constructor.

The allow_undeclared_parameters and automatically_declare_initial_parameters fields of
the node options class were not assigned in the assignment operator, resulting in
an incorrect copy of the node options object, which also indirectly affects the
copy constructor.

Signed-off-by: Michael Jeronimo <[email protected]>

* Run linters
  • Loading branch information
Michael Jeronimo authored and christopherho-ApexAI committed Jun 3, 2019
1 parent 963ff50 commit 6e3bbc3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rclcpp/src/rclcpp/node_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ NodeOptions::operator=(const NodeOptions & other)
this->use_intra_process_comms_ = other.use_intra_process_comms_;
this->start_parameter_services_ = other.start_parameter_services_;
this->allocator_ = other.allocator_;
this->allow_undeclared_parameters_ = other.allow_undeclared_parameters_;
this->automatically_declare_initial_parameters_ =
other.automatically_declare_initial_parameters_;
}
return *this;
}
Expand Down

0 comments on commit 6e3bbc3

Please sign in to comment.