From dc05a2e755b985226e49316950fc30fc9257713c Mon Sep 17 00:00:00 2001 From: Michael Jeronimo Date: Tue, 30 Apr 2019 13:47:20 -0700 Subject: [PATCH] Add assignment of parameter-related fields in node options constructor (#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 * Run linters --- rclcpp/src/rclcpp/node_options.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rclcpp/src/rclcpp/node_options.cpp b/rclcpp/src/rclcpp/node_options.cpp index 713cdee..099596c 100644 --- a/rclcpp/src/rclcpp/node_options.cpp +++ b/rclcpp/src/rclcpp/node_options.cpp @@ -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; }