Problem: non-modifying member functions not marked as const/static

Solution: add const/static
This commit is contained in:
Simon Giesecke
2019-12-25 15:51:26 +01:00
parent 41e3f14d6a
commit 78961eeab7
33 changed files with 76 additions and 72 deletions

View File

@@ -76,19 +76,19 @@ class socket_poller_t
int modify_fd (fd_t fd_, short events_);
int remove_fd (fd_t fd_);
// Returns the signaler's fd if there is one, otherwise errors.
int signaler_fd (fd_t *fd_);
int signaler_fd (fd_t *fd_) const;
int wait (event_t *events_, int n_events_, long timeout_);
inline int size () { return static_cast<int> (_items.size ()); };
inline int size () const { return static_cast<int> (_items.size ()); };
// Return false if object is not a socket.
bool check_tag ();
bool check_tag () const;
private:
void zero_trail_events (zmq::socket_poller_t::event_t *events_,
int n_events_,
int found_);
static void zero_trail_events (zmq::socket_poller_t::event_t *events_,
int n_events_,
int found_);
#if defined ZMQ_POLL_BASED_ON_POLL
int check_events (zmq::socket_poller_t::event_t *events_, int n_events_);
#elif defined ZMQ_POLL_BASED_ON_SELECT
@@ -98,11 +98,11 @@ class socket_poller_t
fd_set &outset_,
fd_set &errset_);
#endif
int adjust_timeout (zmq::clock_t &clock_,
long timeout_,
uint64_t &now_,
uint64_t &end_,
bool &first_pass_);
static int adjust_timeout (zmq::clock_t &clock_,
long timeout_,
uint64_t &now_,
uint64_t &end_,
bool &first_pass_);
int rebuild ();
// Used to check whether the object is a socket_poller.