From 43677d574069b66e4f04fe331b663df71bcf0da6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Apr 2019 19:49:00 +0200 Subject: [PATCH] event/MaskMonitor: add `noexcept` --- src/event/MaskMonitor.cxx | 4 ++-- src/event/MaskMonitor.hxx | 8 ++++---- 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 */