Commit 43677d57 authored by Max Kellermann's avatar Max Kellermann

event/MaskMonitor: add `noexcept`

parent 693815bb
/*
* Copyright 2003-2018 The Music Player Daemon Project
* Copyright 2003-2019 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
......@@ -20,7 +20,7 @@
#include "MaskMonitor.hxx"
void
MaskMonitor::OrMask(unsigned new_mask)
MaskMonitor::OrMask(unsigned new_mask) noexcept
{
if (pending_mask.fetch_or(new_mask) == 0)
defer.Schedule();
......
......@@ -40,19 +40,19 @@ class MaskMonitor final {
std::atomic_uint pending_mask;
public:
MaskMonitor(EventLoop &_loop, Callback _callback)
MaskMonitor(EventLoop &_loop, Callback _callback) noexcept
:defer(_loop, BIND_THIS_METHOD(RunDeferred)),
callback(_callback), pending_mask(0) {}
EventLoop &GetEventLoop() {
EventLoop &GetEventLoop() noexcept {
return defer.GetEventLoop();
}
void Cancel() {
void Cancel() noexcept {
defer.Cancel();
}
void OrMask(unsigned new_mask);
void OrMask(unsigned new_mask) noexcept;
protected:
/* DeferEvent callback */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment