meta-ros/recipes-ros1/bond-core/files/0001-Argument-to-Boost-Mill...

51 lines
1.7 KiB
Diff

From 1240bce50ca1538cdad07dc472d31797257e0851 Mon Sep 17 00:00:00 2001
From: Paul-Edouard Sarlin <Skydes@users.noreply.github.com>
Date: Sun, 29 Apr 2018 22:40:15 +0200
Subject: [PATCH] Argument to Boost Milliseconds must be integral in Boost >=
1.67 (#37)
* Argument to Boost milliseconds must be integral
* Fix style
* More consistent type
Upstream-Status: Accepted [https://github.com/ros/bond_core/commit/1240bce50ca1538cdad07dc472d31797257e0851]
This patch has been generated with:
`git format-patch -1 1240bce50ca1538cdad07dc472d31797257e0851`
in the bond_core repository.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
bondcpp/src/bond.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bondcpp/src/bond.cpp b/bondcpp/src/bond.cpp
index 8872d61..58e7901 100644
--- a/bondcpp/src/bond.cpp
+++ b/bondcpp/src/bond.cpp
@@ -218,7 +218,8 @@ bool Bond::waitUntilFormed(ros::WallDuration timeout)
break; // The deadline has expired
}
- condition_.timed_wait(mutex_, boost::posix_time::milliseconds(wait_time.toSec() * 1000.0f));
+ condition_.timed_wait(mutex_, boost::posix_time::milliseconds(
+ static_cast<int64_t>(wait_time.toSec() * 1000.0f)));
}
return sm_.getState().getId() != SM::WaitingForSister.getId();
}
@@ -246,7 +247,8 @@ bool Bond::waitUntilBroken(ros::WallDuration timeout)
break; // The deadline has expired
}
- condition_.timed_wait(mutex_, boost::posix_time::milliseconds(wait_time.toSec() * 1000.0f));
+ condition_.timed_wait(mutex_, boost::posix_time::milliseconds(
+ static_cast<int64_t>(wait_time.toSec() * 1000.0f)));
}
return sm_.getState().getId() == SM::Dead.getId();
}
--
2.7.4