From b8d72d682a9bd345e32df7395b603873b11060dd Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Wed, 21 Jun 2017 09:24:01 -0400 Subject: [PATCH] Remove a constructor that we can't test. (#340) There are currently no paths that lead to it, and it has a bug anyway; if a large enough value is passed into sec, then we will overflow sec on the multiply. Just remove it since we can't reach the code anyway. Signed-off-by: Chris Lalancette --- rclcpp/include/rclcpp/time.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rclcpp/include/rclcpp/time.hpp b/rclcpp/include/rclcpp/time.hpp index d637213..33f5499 100644 --- a/rclcpp/include/rclcpp/time.hpp +++ b/rclcpp/include/rclcpp/time.hpp @@ -62,10 +62,6 @@ public: private: rcl_time_point_value_t rcl_time_; - Time(std::uint32_t sec, std::uint32_t nanosec) - : rcl_time_(RCL_S_TO_NS(sec) + nanosec) - {} - explicit Time(rcl_time_point_value_t && rcl_time) : rcl_time_(std::forward(rcl_time)) {}