From a6541d25a684564bb810c3b22536a0427e4442f9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Apr 2019 21:20:52 +0200 Subject: Fix implicit narrowing conversion --- raul/Semaphore.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/raul/Semaphore.hpp b/raul/Semaphore.hpp index 1c6ee71..0eb1703 100644 --- a/raul/Semaphore.hpp +++ b/raul/Semaphore.hpp @@ -256,7 +256,8 @@ Semaphore::timed_wait(const std::chrono::duration& wait) const chr::seconds end_sec(chr::duration_cast(end)); const chr::nanoseconds end_nsec(end - end_sec); - const struct timespec ts_end = { end_sec.count(), end_nsec.count() }; + const struct timespec ts_end = { static_cast(end_sec.count()), + static_cast(end_nsec.count()) }; return (sem_timedwait(&_sem, &ts_end) == 0); } -- cgit v1.2.1