Commit ae442842 authored by Alex Landau's avatar Alex Landau Committed by Dave Watson

Make EventHandler::isPending const

Summary: Because it just queries state

Test Plan: fbmake

Reviewed By: haijunz@fb.com

Subscribers: folly@lists

FB internal diff: D1332397
parent 2728ed9f
...@@ -156,7 +156,7 @@ void EventHandler::setEventBase(EventBase* eventBase) { ...@@ -156,7 +156,7 @@ void EventHandler::setEventBase(EventBase* eventBase) {
eventBase_ = eventBase; eventBase_ = eventBase;
} }
bool EventHandler::isPending() { bool EventHandler::isPending() const {
if (event_.ev_flags & EVLIST_ACTIVE) { if (event_.ev_flags & EVLIST_ACTIVE) {
if (event_.ev_res & EV_READ) { if (event_.ev_res & EV_READ) {
return true; return true;
......
...@@ -167,7 +167,7 @@ class EventHandler : private boost::noncopyable { ...@@ -167,7 +167,7 @@ class EventHandler : private boost::noncopyable {
return registerImpl(events, true); return registerImpl(events, true);
} }
bool isPending(); bool isPending() const;
private: private:
bool registerImpl(uint16_t events, bool internal); bool registerImpl(uint16_t events, bool internal);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment