From a8e23c414047064048a0cabfe0c94f772fdaea57 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 1 Sep 2019 13:58:45 +0200 Subject: [PATCH] db/update/InotifySource: add `noexcept` --- src/db/update/InotifySource.cxx | 2 +- src/db/update/InotifySource.hxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db/update/InotifySource.cxx b/src/db/update/InotifySource.cxx index ac3c931ff..e8b61e874 100644 --- a/src/db/update/InotifySource.cxx +++ b/src/db/update/InotifySource.cxx @@ -98,7 +98,7 @@ InotifySource::Add(const char *path_fs, unsigned mask) } void -InotifySource::Remove(unsigned wd) +InotifySource::Remove(unsigned wd) noexcept { auto ifd = GetSocket().ToFileDescriptor(); int ret = inotify_rm_watch(ifd.Get(), wd); diff --git a/src/db/update/InotifySource.hxx b/src/db/update/InotifySource.hxx index 43225df56..846d44682 100644 --- a/src/db/update/InotifySource.hxx +++ b/src/db/update/InotifySource.hxx @@ -42,7 +42,7 @@ public: InotifySource(EventLoop &_loop, mpd_inotify_callback_t callback, void *ctx); - ~InotifySource() { + ~InotifySource() noexcept { Close(); } @@ -60,7 +60,7 @@ public: * * @param wd the watch descriptor returned by mpd_inotify_source_add() */ - void Remove(unsigned wd); + void Remove(unsigned wd) noexcept; private: bool OnSocketReady(unsigned flags) noexcept override;