diff --git a/rclcpp/src/rclcpp/node.cpp b/rclcpp/src/rclcpp/node.cpp index 48636fd6fd..6bd1e07007 100644 --- a/rclcpp/src/rclcpp/node.cpp +++ b/rclcpp/src/rclcpp/node.cpp @@ -214,7 +214,8 @@ Node::Node( options.automatically_declare_parameters_from_overrides() )), node_time_source_( - options.time_source() ? options.time_source() : std::make_shared( + options.time_source() ? options.time_source() : + std::make_shared( node_base_, node_topics_, node_graph_, diff --git a/rclcpp/src/rclcpp/node_interfaces/node_time_source.cpp b/rclcpp/src/rclcpp/node_interfaces/node_time_source.cpp index f7bbcd1c38..7aa445da03 100644 --- a/rclcpp/src/rclcpp/node_interfaces/node_time_source.cpp +++ b/rclcpp/src/rclcpp/node_interfaces/node_time_source.cpp @@ -48,7 +48,8 @@ NodeTimeSource::NodeTimeSource( node_parameters_); } -void NodeTimeSource::attachClock(rclcpp::node_interfaces::NodeClockInterface::SharedPtr clock){ +void NodeTimeSource::attachClock(rclcpp::node_interfaces::NodeClockInterface::SharedPtr clock) +{ time_source_.attachClock(clock->get_clock()); } diff --git a/rclcpp/src/rclcpp/node_options.cpp b/rclcpp/src/rclcpp/node_options.cpp index 8e712f14c3..22e5dc10e2 100644 --- a/rclcpp/src/rclcpp/node_options.cpp +++ b/rclcpp/src/rclcpp/node_options.cpp @@ -408,7 +408,7 @@ NodeOptions & NodeOptions::time_source(rclcpp::node_interfaces::NodeTimeSourceInterface::SharedPtr time_source) { this->time_source_ = time_source; - return *this; + return *this; } } // namespace rclcpp