Merge "Make some fdevent member functions pure virtual."

This commit is contained in:
Treehugger Robot 2020-05-13 03:31:03 +00:00 committed by Gerrit Code Review
commit b6a6023bda
3 changed files with 9 additions and 2 deletions

View file

@ -79,8 +79,8 @@ struct fdevent_context {
unique_fd Destroy(fdevent* fde);
protected:
virtual void Register(fdevent*) {}
virtual void Unregister(fdevent*) {}
virtual void Register(fdevent*) = 0;
virtual void Unregister(fdevent*) = 0;
public:
// Change which events should cause notifications.

View file

@ -211,3 +211,7 @@ void fdevent_context_poll::Interrupt() {
PLOG(FATAL) << "failed to write to fdevent interrupt fd";
}
}
void fdevent_context_poll::Register(fdevent*) {}
void fdevent_context_poll::Unregister(fdevent*) {}

View file

@ -48,6 +48,9 @@ struct fdevent_context_poll final : public fdevent_context {
fdevent_context_poll();
virtual ~fdevent_context_poll();
virtual void Register(fdevent* fde) final;
virtual void Unregister(fdevent* fde) final;
virtual void Set(fdevent* fde, unsigned events) final;
virtual void Loop() final;