summaryrefslogtreecommitdiff
path: root/src/event
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-04-04 19:49:00 +0200
committerMax Kellermann <max@musicpd.org>2019-04-04 19:54:17 +0200
commit43677d574069b66e4f04fe331b663df71bcf0da6 (patch)
tree88d79c94f1b80b97780e9c9c7735d34efad9eadf /src/event
parent693815bb32e01f490a0ff1e5a8613296bf77dc4e (diff)
event/MaskMonitor: add `noexcept`
Diffstat (limited to 'src/event')
-rw-r--r--src/event/MaskMonitor.cxx4
-rw-r--r--src/event/MaskMonitor.hxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/event/MaskMonitor.cxx b/src/event/MaskMonitor.cxx
index 3fe29c99b..c34cb9019 100644
--- a/src/event/MaskMonitor.cxx
+++ b/src/event/MaskMonitor.cxx
@@ -1,5 +1,5 @@
/*
- * 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();
diff --git a/src/event/MaskMonitor.hxx b/src/event/MaskMonitor.hxx
index 6b91ab0fd..cff69e8aa 100644
--- a/src/event/MaskMonitor.hxx
+++ b/src/event/MaskMonitor.hxx
@@ -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 */