From 775d0c444d1cf096929b24d3fcc9004293d01258 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Thu, 8 Jun 2017 19:32:53 -0400 Subject: [PATCH] Remove a constructor that we can't test. 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 d637213682..33f5499743 100644 --- a/rclcpp/include/rclcpp/time.hpp +++ b/rclcpp/include/rclcpp/time.hpp @@ -62,10 +62,6 @@ class Time 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)) {}