summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-12-22 12:00:12 +0100
committerMax Kellermann <max@musicpd.org>2019-12-22 12:00:12 +0100
commit7764719513b02149e8b101b298462a98de70fbbe (patch)
treeec8f57ea076f56677a834b3a73296db7174e61d1 /src
parentdcbb9fe07ce0c48ffaf6300167eb74276d129136 (diff)
event/MultiSocketMonitor: un-inline AddSocket()
Diffstat (limited to 'src')
-rw-r--r--src/event/MultiSocketMonitor.cxx12
-rw-r--r--src/event/MultiSocketMonitor.hxx10
2 files changed, 13 insertions, 9 deletions
diff --git a/src/event/MultiSocketMonitor.cxx b/src/event/MultiSocketMonitor.cxx
index f747fd0f9..98d57332c 100644
--- a/src/event/MultiSocketMonitor.cxx
+++ b/src/event/MultiSocketMonitor.cxx
@@ -42,6 +42,18 @@ MultiSocketMonitor::Reset() noexcept
ready = refresh = false;
}
+bool
+MultiSocketMonitor::AddSocket(SocketDescriptor fd, unsigned events) noexcept
+{
+ fds.emplace_front(*this, fd);
+ bool success = fds.front().Schedule(events);
+ if (!success) {
+ fds.pop_front();
+ }
+
+ return success;
+}
+
void
MultiSocketMonitor::ClearSocketList() noexcept
{
diff --git a/src/event/MultiSocketMonitor.hxx b/src/event/MultiSocketMonitor.hxx
index c4bad8ac0..c1d363a29 100644
--- a/src/event/MultiSocketMonitor.hxx
+++ b/src/event/MultiSocketMonitor.hxx
@@ -145,15 +145,7 @@ public:
*
* May only be called from PrepareSockets().
*/
- bool AddSocket(SocketDescriptor fd, unsigned events) noexcept {
- fds.emplace_front(*this, fd);
- bool success = fds.front().Schedule(events);
- if (!success) {
- fds.pop_front();
- }
-
- return success;
- }
+ bool AddSocket(SocketDescriptor fd, unsigned events) noexcept;
/**
* Remove all sockets.