event/*, ...: make GetEventLoop() const

This commit is contained in:
Max Kellermann 2019-04-04 19:48:28 +02:00
parent 4f6144dc71
commit 093bf5d859
17 changed files with 17 additions and 19 deletions

View File

@ -66,7 +66,7 @@ public:
~UpdateService(); ~UpdateService();
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return defer.GetEventLoop(); return defer.GetEventLoop();
} }

View File

@ -50,7 +50,7 @@ public:
Cancel(); Cancel();
} }
EventLoop &GetEventLoop() noexcept { EventLoop &GetEventLoop() const noexcept {
return loop; return loop;
} }

View File

@ -44,7 +44,7 @@ public:
:defer(_loop, BIND_THIS_METHOD(RunDeferred)), :defer(_loop, BIND_THIS_METHOD(RunDeferred)),
callback(_callback), pending_mask(0) {} callback(_callback), pending_mask(0) {}
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return defer.GetEventLoop(); return defer.GetEventLoop();
} }

View File

@ -68,7 +68,7 @@ public:
~SocketMonitor() noexcept; ~SocketMonitor() noexcept;
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return loop; return loop;
} }

View File

@ -62,7 +62,7 @@ public:
Cancel(); Cancel();
} }
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return loop; return loop;
} }

View File

@ -76,7 +76,7 @@ public:
virtual ~AsyncInputStream() noexcept; virtual ~AsyncInputStream() noexcept;
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return deferred_resume.GetEventLoop(); return deferred_resume.GetEventLoop();
} }

View File

@ -102,7 +102,7 @@ public:
~TidalSessionManager() noexcept; ~TidalSessionManager() noexcept;
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return defer_invoke_handlers.GetEventLoop(); return defer_invoke_handlers.GetEventLoop();
} }

View File

@ -50,7 +50,7 @@ class CurlGlobal final {
public: public:
explicit CurlGlobal(EventLoop &_loop); explicit CurlGlobal(EventLoop &_loop);
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return timeout_event.GetEventLoop(); return timeout_event.GetEventLoop();
} }

View File

@ -42,7 +42,7 @@ public:
DisconnectIndirect(); DisconnectIndirect();
} }
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return watch.GetEventLoop(); return watch.GetEventLoop();
} }

View File

@ -102,7 +102,7 @@ public:
void Shutdown() noexcept; void Shutdown() noexcept;
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return defer_dispatch.GetEventLoop(); return defer_dispatch.GetEventLoop();
} }

View File

@ -161,9 +161,7 @@ public:
return export_name.c_str(); return export_name.c_str();
} }
EventLoop &GetEventLoop() noexcept { using SocketMonitor::GetEventLoop;
return SocketMonitor::GetEventLoop();
}
/** /**
* Ensure that the connection is established. The connection * Ensure that the connection is established. The connection

View File

@ -69,7 +69,7 @@ public:
NfsFileReader() noexcept; NfsFileReader() noexcept;
~NfsFileReader() noexcept; ~NfsFileReader() noexcept;
EventLoop &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return defer_open.GetEventLoop(); return defer_open.GetEventLoop();
} }

View File

@ -272,7 +272,7 @@ UPnPDeviceDirectory::~UPnPDeviceDirectory() noexcept
} }
inline EventLoop & inline EventLoop &
UPnPDeviceDirectory::GetEventLoop() noexcept UPnPDeviceDirectory::GetEventLoop() const noexcept
{ {
return curl->GetEventLoop(); return curl->GetEventLoop();
} }

View File

@ -168,7 +168,7 @@ public:
UPnPDeviceDirectory(const UPnPDeviceDirectory &) = delete; UPnPDeviceDirectory(const UPnPDeviceDirectory &) = delete;
UPnPDeviceDirectory& operator=(const UPnPDeviceDirectory &) = delete; UPnPDeviceDirectory& operator=(const UPnPDeviceDirectory &) = delete;
EventLoop &GetEventLoop() noexcept; EventLoop &GetEventLoop() const noexcept;
void Start(); void Start();

View File

@ -70,7 +70,7 @@ public:
NeighborListener &_listener) noexcept NeighborListener &_listener) noexcept
:NeighborExplorer(_listener), event_loop(_event_loop) {} :NeighborExplorer(_listener), event_loop(_event_loop) {}
auto &GetEventLoop() noexcept { auto &GetEventLoop() const noexcept {
return event_loop; return event_loop;
} }

View File

@ -129,7 +129,7 @@ public:
} }
private: private:
EventLoop &GetEventLoop() noexcept { EventLoop &GetEventLoop() const noexcept {
return defer_connect.GetEventLoop(); return defer_connect.GetEventLoop();
} }

View File

@ -94,7 +94,7 @@ public:
} }
} }
EventLoop &GetEventLoop() noexcept { EventLoop &GetEventLoop() const noexcept {
return defer_mount.GetEventLoop(); return defer_mount.GetEventLoop();
} }