From 3eb1fe52d71c8c70fb78a950ed8ac92e007216ab Mon Sep 17 00:00:00 2001 From: Devin Bonnie <47613035+dabonnie@users.noreply.github.com> Date: Wed, 27 Nov 2019 13:58:17 -0800 Subject: [PATCH] Fix duration.cpp lint error (#930) * Fix duration.cpp lint error Signed-off-by: Devin Bonnie * Apply review format suggestion Signed-off-by: Devin Bonnie --- rclcpp/src/rclcpp/duration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclcpp/src/rclcpp/duration.cpp b/rclcpp/src/rclcpp/duration.cpp index bdf9bda..07d3698 100644 --- a/rclcpp/src/rclcpp/duration.cpp +++ b/rclcpp/src/rclcpp/duration.cpp @@ -182,8 +182,8 @@ bounds_check_duration_scale(int64_t dns, double scale, uint64_t max) { auto abs_dns = static_cast(std::abs(dns)); auto abs_scale = std::abs(scale); - if (abs_scale > 1.0 && - abs_dns > static_cast(static_cast(max) / static_cast(abs_scale))) + if (abs_scale > 1.0 && abs_dns > + static_cast(static_cast(max) / static_cast(abs_scale))) { if ((dns > 0 && scale > 0) || (dns < 0 && scale < 0)) { throw std::overflow_error("duration scaling leads to int64_t overflow");