diff options
author | David Robillard <d@drobilla.net> | 2020-07-17 19:35:53 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-17 20:44:52 +0200 |
commit | b50a5872fca8a4086502d7c19e80bc9992782079 (patch) | |
tree | 07a4df6bd59076c7ecf543c0928fdf08a3deb104 /raul | |
parent | 0887b4035da053931bee16fafc7800a05f2ce775 (diff) | |
download | raul-b50a5872fca8a4086502d7c19e80bc9992782079.tar.gz raul-b50a5872fca8a4086502d7c19e80bc9992782079.tar.bz2 raul-b50a5872fca8a4086502d7c19e80bc9992782079.zip |
Fix conversion warnings
Diffstat (limited to 'raul')
-rw-r--r-- | raul/Semaphore.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/raul/Semaphore.hpp b/raul/Semaphore.hpp index 0eb1703..ee2325f 100644 --- a/raul/Semaphore.hpp +++ b/raul/Semaphore.hpp @@ -158,7 +158,7 @@ Semaphore::timed_wait(const std::chrono::duration<Rep, Period>& wait) inline bool Semaphore::init(unsigned initial) { - if (!(_sem = CreateSemaphore(NULL, initial, LONG_MAX, NULL))) { + if (!(_sem = CreateSemaphore(NULL, (LONG)initial, LONG_MAX, NULL))) { return false; } return true; @@ -198,7 +198,8 @@ Semaphore::timed_wait(const std::chrono::duration<Rep, Period>& wait) namespace chr = std::chrono; const chr::milliseconds ms(chr::duration_cast<chr::milliseconds>(wait)); - return WaitForSingleObject(_sem, ms.count()) == WAIT_OBJECT_0; + return WaitForSingleObject( + _sem, static_cast<DWORD>(ms.count())) == WAIT_OBJECT_0; } #else /* !defined(__APPLE__) && !defined(_WIN32) */ |