From 8a0b83127f68773aaa011a91b4df25388eaa1ae1 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Tue, 10 Oct 2023 17:33:42 +0000 Subject: [PATCH] Cast msg fields to float. This is to avoid a warning on Windows. It is safe to do since the heartbeat timeout or period aren't expected to be outside the range a float can represent. Signed-off-by: Chris Lalancette --- bondcpp/src/bond.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bondcpp/src/bond.cpp b/bondcpp/src/bond.cpp index 1cb6a2c..61e9cde 100644 --- a/bondcpp/src/bond.cpp +++ b/bondcpp/src/bond.cpp @@ -558,8 +558,8 @@ void Bond::publishStatus(bool active) msg.id = id_; msg.instance_id = instance_id_; msg.active = active; - msg.heartbeat_timeout = heartbeat_timeout_.seconds(); - msg.heartbeat_period = heartbeat_period_.seconds(); + msg.heartbeat_timeout = static_cast(heartbeat_timeout_.seconds()); + msg.heartbeat_period = static_cast(heartbeat_period_.seconds()); pub_->publish(msg); }