From 2a328ccdcaf47730ab757c5b0a927003cb9e5376 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Tue, 19 Mar 2024 11:10:42 -0500 Subject: [PATCH] Fix MSVC "possible loss of data" warning Signed-off-by: Addisu Z. Taddese --- core/include/gz/msgs/convert/StdTypes.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/include/gz/msgs/convert/StdTypes.hh b/core/include/gz/msgs/convert/StdTypes.hh index 20e2bff8..94e7012b 100644 --- a/core/include/gz/msgs/convert/StdTypes.hh +++ b/core/include/gz/msgs/convert/StdTypes.hh @@ -47,7 +47,7 @@ inline void Set(gz::msgs::Time *_msg, gz::math::durationToSecNsec(_data); msgs::Time msg; _msg->set_sec(timeSecAndNsecs.first); - _msg->set_nsec(timeSecAndNsecs.second); + _msg->set_nsec(static_cast(timeSecAndNsecs.second)); } inline void Set(std::chrono::steady_clock::duration *_data,