Make some fdevent member functions pure virtual.
...because that makes our coverage numbers look better. But since there are only two concrete classes anyway, we weren't gaining much from the default implementation and it's arguably more intention-revealing now. Test: treehugger Change-Id: I7a8a3195023048b1a84277358b857222692d96ee
This commit is contained in:
parent
a269c7c3d1
commit
631fe1e6df
3 changed files with 9 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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*) {}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue