Skip to content

Commit b5b7594

Browse files
committed
style: formatting
1 parent ba5b21a commit b5b7594

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

rclcpp/src/rclcpp/duration.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,16 @@ Duration::from_nanoseconds(rcl_duration_value_t nanoseconds)
319319
}
320320

321321
builtin_interfaces::msg::Time
322-
operator+(const builtin_interfaces::msg::Time & lhs, const rclcpp::Duration & rhs) {
322+
operator+(const builtin_interfaces::msg::Time & lhs, const rclcpp::Duration & rhs)
323+
{
323324
if (lhs.sec < 0) {
324325
throw std::runtime_error("message time is negative");
325326
}
326327

327328
rcl_time_point_value_t rcl_time;
328329
rcl_time = RCL_S_TO_NS(static_cast<int64_t>(lhs.sec));
329330
rcl_time += lhs.nanosec;
330-
331+
331332
if (rclcpp::add_will_overflow(rcl_time, rhs.nanoseconds())) {
332333
throw std::overflow_error("addition leads to int64_t overflow");
333334
}
@@ -351,15 +352,16 @@ operator+(const builtin_interfaces::msg::Time & lhs, const rclcpp::Duration & rh
351352
}
352353

353354
builtin_interfaces::msg::Time
354-
operator-(const builtin_interfaces::msg::Time & lhs, const rclcpp::Duration & rhs) {
355+
operator-(const builtin_interfaces::msg::Time & lhs, const rclcpp::Duration & rhs)
356+
{
355357
if (lhs.sec < 0) {
356358
throw std::runtime_error("message time is negative");
357359
}
358360

359361
rcl_time_point_value_t rcl_time;
360362
rcl_time = RCL_S_TO_NS(static_cast<int64_t>(lhs.sec));
361363
rcl_time += lhs.nanosec;
362-
364+
363365
if (rclcpp::sub_will_overflow(rcl_time, rhs.nanoseconds())) {
364366
throw std::overflow_error("addition leads to int64_t overflow");
365367
}

0 commit comments

Comments
 (0)