From 8c6dd6fc365fee92e0da15e5e0f5522a27a0bc49 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 21 May 2016 19:44:44 +0200 Subject: Use platform in semaphore. --- src/semaphore.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/semaphore.cc b/src/semaphore.cc index e872ff2..59a2c54 100644 --- a/src/semaphore.cc +++ b/src/semaphore.cc @@ -38,7 +38,7 @@ #include <../include/semaphore.h> #include #include -#include +#include #endif #endif @@ -81,7 +81,7 @@ Semaphore::~Semaphore() void Semaphore::post() { #if DG_PLATFORM == DG_PLATFORM_WINDOWS - ReleaseSemaphore(prv->semaphore, 1, NULL); + ReleaseSemaphore(prv->semaphore, 1, nullptr); #else sem_post(&prv->semaphore); #endif @@ -101,7 +101,7 @@ bool Semaphore::wait(const std::chrono::milliseconds& timeout) struct timespec ts; struct timeval now; - int rv = gettimeofday(&now, NULL); + int rv = gettimeofday(&now, nullptr); assert(rv == 0); ts->tv_sec = now.tv_sec; -- cgit v1.2.3