diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-05-06 15:41:43 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-05-06 15:41:43 +0200 |
commit | b7b5b9ee2a9d6cefe9b83589122cedb89c22279c (patch) | |
tree | b7953590423e616d1f61a8ae9a4a2a4ca154d9f5 /src/events.cc | |
parent | 305bc5c31dde06afb3d867abd1b461a98c868a74 (diff) |
Remove old (obsolete) Mutex class and replace all uses with std::mutex.
Diffstat (limited to 'src/events.cc')
-rw-r--r-- | src/events.cc | 6 |
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(); } |