event/MaskMonitor: add noexcept
This commit is contained in:
parent
693815bb32
commit
43677d5740
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2003-2018 The Music Player Daemon Project
|
* Copyright 2003-2019 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -20,7 +20,7 @@
|
|||||||
#include "MaskMonitor.hxx"
|
#include "MaskMonitor.hxx"
|
||||||
|
|
||||||
void
|
void
|
||||||
MaskMonitor::OrMask(unsigned new_mask)
|
MaskMonitor::OrMask(unsigned new_mask) noexcept
|
||||||
{
|
{
|
||||||
if (pending_mask.fetch_or(new_mask) == 0)
|
if (pending_mask.fetch_or(new_mask) == 0)
|
||||||
defer.Schedule();
|
defer.Schedule();
|
||||||
|
@ -40,19 +40,19 @@ class MaskMonitor final {
|
|||||||
std::atomic_uint pending_mask;
|
std::atomic_uint pending_mask;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MaskMonitor(EventLoop &_loop, Callback _callback)
|
MaskMonitor(EventLoop &_loop, Callback _callback) noexcept
|
||||||
:defer(_loop, BIND_THIS_METHOD(RunDeferred)),
|
:defer(_loop, BIND_THIS_METHOD(RunDeferred)),
|
||||||
callback(_callback), pending_mask(0) {}
|
callback(_callback), pending_mask(0) {}
|
||||||
|
|
||||||
EventLoop &GetEventLoop() {
|
EventLoop &GetEventLoop() noexcept {
|
||||||
return defer.GetEventLoop();
|
return defer.GetEventLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cancel() {
|
void Cancel() noexcept {
|
||||||
defer.Cancel();
|
defer.Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OrMask(unsigned new_mask);
|
void OrMask(unsigned new_mask) noexcept;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* DeferEvent callback */
|
/* DeferEvent callback */
|
||||||
|
Loading…
Reference in New Issue
Block a user