summaryrefslogtreecommitdiff
path: root/src/events.cc
diff options
context:
space:
mode:
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();
}