meta-ros/v1-recipes-ros1/ros-comm/roscpp/0001-make-implicit-cast-exp...

29 lines
1.3 KiB
Diff

Upstream-Status: Inappropriate [upstream source code changed]
The current upstream source code (in melodic-devel) changed, and for the indigo
and kinetic releases, it is irrelevant to be submitted back and applied because
boost will not be updated to 1.67 in the supported Debian/Ubuntu distributions.
diff --git a/clients/roscpp/src/libros/callback_queue.cpp b/clients/roscpp/src/libros/callback_queue.cpp
index cd2f4f8..fa600d5 100644
--- a/clients/roscpp/src/libros/callback_queue.cpp
+++ b/clients/roscpp/src/libros/callback_queue.cpp
@@ -229,7 +229,7 @@ CallbackQueue::CallOneResult CallbackQueue::callOne(ros::WallDuration timeout)
{
if (!timeout.isZero())
{
- condition_.timed_wait(lock, boost::posix_time::microseconds(timeout.toSec() * 1000000.0f));
+ condition_.timed_wait(lock, boost::posix_time::microseconds(static_cast<int64_t>(timeout.toSec() * 1000000.0f)));
}
if (callbacks_.empty())
@@ -305,7 +305,7 @@ void CallbackQueue::callAvailable(ros::WallDuration timeout)
{
if (!timeout.isZero())
{
- condition_.timed_wait(lock, boost::posix_time::microseconds(timeout.toSec() * 1000000.0f));
+ condition_.timed_wait(lock, boost::posix_time::microseconds(static_cast<int64_t>(timeout.toSec() * 1000000.0f)));
}
if (callbacks_.empty() || !enabled_)