event/DeferEvent: explicitly forbid copying

This commit is contained in:
Max Kellermann 2020-12-01 16:26:30 +01:00
parent fd8e38f8cd
commit 1ecbc2ff0f

View File

@ -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();
}