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");