mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-28 07:58:14 +08:00
Merge pull request #4146 from gummif/gfa/unused-vars
Problem: Unused member variables _last_in
This commit is contained in:
commit
31ebe35144
@ -39,7 +39,6 @@
|
||||
zmq::dgram_t::dgram_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
|
||||
socket_base_t (parent_, tid_, sid_),
|
||||
_pipe (NULL),
|
||||
_last_in (NULL),
|
||||
_more_out (false)
|
||||
{
|
||||
options.type = ZMQ_DGRAM;
|
||||
@ -71,9 +70,6 @@ void zmq::dgram_t::xattach_pipe (pipe_t *pipe_,
|
||||
void zmq::dgram_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
if (pipe_ == _pipe) {
|
||||
if (_last_in == _pipe) {
|
||||
_last_in = NULL;
|
||||
}
|
||||
_pipe = NULL;
|
||||
}
|
||||
}
|
||||
@ -147,7 +143,6 @@ int zmq::dgram_t::xrecv (msg_t *msg_)
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
_last_in = _pipe;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -62,8 +62,6 @@ class dgram_t ZMQ_FINAL : public socket_base_t
|
||||
private:
|
||||
zmq::pipe_t *_pipe;
|
||||
|
||||
zmq::pipe_t *_last_in;
|
||||
|
||||
// If true, more outgoing message parts are expected.
|
||||
bool _more_out;
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "err.hpp"
|
||||
#include "msg.hpp"
|
||||
|
||||
zmq::fq_t::fq_t () : _active (0), _last_in (NULL), _current (0), _more (false)
|
||||
zmq::fq_t::fq_t () : _active (0), _current (0), _more (false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -62,10 +62,6 @@ void zmq::fq_t::pipe_terminated (pipe_t *pipe_)
|
||||
_current = 0;
|
||||
}
|
||||
_pipes.erase (pipe_);
|
||||
|
||||
if (_last_in == pipe_) {
|
||||
_last_in = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void zmq::fq_t::activated (pipe_t *pipe_)
|
||||
@ -100,7 +96,6 @@ int zmq::fq_t::recvpipe (msg_t *msg_, pipe_t **pipe_)
|
||||
*pipe_ = _pipes[_current];
|
||||
_more = (msg_->flags () & msg_t::more) != 0;
|
||||
if (!_more) {
|
||||
_last_in = _pipes[_current];
|
||||
_current = (_current + 1) % _active;
|
||||
}
|
||||
return 0;
|
||||
|
@ -65,11 +65,6 @@ class fq_t
|
||||
// beginning of the pipes array.
|
||||
pipes_t::size_type _active;
|
||||
|
||||
// Pointer to the last pipe we received message from.
|
||||
// NULL when no message has been received or the pipe
|
||||
// has terminated.
|
||||
pipe_t *_last_in;
|
||||
|
||||
// Index of the next bound pipe to read a message from.
|
||||
pipes_t::size_type _current;
|
||||
|
||||
|
@ -36,8 +36,7 @@
|
||||
|
||||
zmq::pair_t::pair_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
|
||||
socket_base_t (parent_, tid_, sid_),
|
||||
_pipe (NULL),
|
||||
_last_in (NULL)
|
||||
_pipe (NULL)
|
||||
{
|
||||
options.type = ZMQ_PAIR;
|
||||
}
|
||||
@ -67,9 +66,6 @@ void zmq::pair_t::xattach_pipe (pipe_t *pipe_,
|
||||
void zmq::pair_t::xpipe_terminated (pipe_t *pipe_)
|
||||
{
|
||||
if (pipe_ == _pipe) {
|
||||
if (_last_in == _pipe) {
|
||||
_last_in = NULL;
|
||||
}
|
||||
_pipe = NULL;
|
||||
}
|
||||
}
|
||||
@ -117,7 +113,6 @@ int zmq::pair_t::xrecv (msg_t *msg_)
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
_last_in = _pipe;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,6 @@ class pair_t ZMQ_FINAL : public socket_base_t
|
||||
private:
|
||||
zmq::pipe_t *_pipe;
|
||||
|
||||
zmq::pipe_t *_last_in;
|
||||
|
||||
ZMQ_NON_COPYABLE_NOR_MOVABLE (pair_t)
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user