From 1ecbc2ff0f7ab69f734622692288b7efeb1693c8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 1 Dec 2020 16:26:30 +0100 Subject: [PATCH] event/DeferEvent: explicitly forbid copying --- src/event/DeferEvent.hxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/event/DeferEvent.hxx b/src/event/DeferEvent.hxx index d1e3326d0..a9babaea6 100644 --- a/src/event/DeferEvent.hxx +++ b/src/event/DeferEvent.hxx @@ -45,6 +45,9 @@ public: DeferEvent(EventLoop &_loop, Callback _callback) noexcept :loop(_loop), callback(_callback) {} + DeferEvent(const DeferEvent &) = delete; + DeferEvent &operator=(const DeferEvent &) = delete; + ~DeferEvent() noexcept { Cancel(); }