summaryrefslogtreecommitdiff
path: root/src/events.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-05-06 15:41:43 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-05-06 15:41:43 +0200
commitb7b5b9ee2a9d6cefe9b83589122cedb89c22279c (patch)
treeb7953590423e616d1f61a8ae9a4a2a4ca154d9f5 /src/events.cc
parent305bc5c31dde06afb3d867abd1b461a98c868a74 (diff)
Remove old (obsolete) Mutex class and replace all uses with std::mutex.
Diffstat (limited to 'src/events.cc')
-rw-r--r--src/events.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/events.cc b/src/events.cc
index a7ce715..1acbc11 100644
--- a/src/events.cc
+++ b/src/events.cc
@@ -28,14 +28,14 @@
void EventQueue::post(Event* event, timepos_t time)
{
- MutexAutolock lock(mutex);
+ std::lock_guard<std::mutex> guard(mutex);
event->offset = time;
queue.insert(std::pair<timepos_t, Event*>(time, event));
}
Event* EventQueue::take(timepos_t time)
{
- MutexAutolock lock(mutex);
+ std::lock_guard<std::mutex> guard(mutex);
std::multimap<timepos_t, Event*>::iterator i = queue.find(time);
if(i == queue.end())
return NULL;
@@ -46,6 +46,6 @@ Event* EventQueue::take(timepos_t time)
bool EventQueue::hasEvent(timepos_t time)
{
- MutexAutolock lock(mutex);
+ std::lock_guard<std::mutex> guard(mutex);
return queue.find(time) != queue.end();
}