Skip to content

Commit

Permalink
Fix MSVC "possible loss of data" warning (#434)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey committed Apr 9, 2024
1 parent f55dc45 commit 661ae9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/include/gz/msgs/convert/StdTypes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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<int32_t>(timeSecAndNsecs.second));
}

inline void Set(std::chrono::steady_clock::duration *_data,
Expand Down

0 comments on commit 661ae9c

Please sign in to comment.