diff --git a/rviz_common/src/rviz_common/transformation/tf2_helpers/tf2_conversion_helpers.cpp b/rviz_common/src/rviz_common/transformation/tf2_helpers/tf2_conversion_helpers.cpp index aadf1c12f..de12c0021 100644 --- a/rviz_common/src/rviz_common/transformation/tf2_helpers/tf2_conversion_helpers.cpp +++ b/rviz_common/src/rviz_common/transformation/tf2_helpers/tf2_conversion_helpers.cpp @@ -59,7 +59,9 @@ fromTf2TimePoint(const tf2::TimePoint & tf2_time) const auto seconds = std::chrono::time_point_cast(tf2_time); const auto nanoseconds = std::chrono::time_point_cast(tf2_time) - std::chrono::time_point_cast(seconds); - return rclcpp::Time(seconds.time_since_epoch().count(), nanoseconds.count()); + return rclcpp::Time( + static_cast(seconds.time_since_epoch().count()), + static_cast(nanoseconds.count())); } tf2::TimePoint