0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-31 01:43:02 +08:00

Simplify ypipe_t and ypipe_base_t template parameters

This commit is contained in:
Martin Hurton 2014-01-06 11:19:56 +01:00
parent c7e3efba6b
commit 96f5fddc45
5 changed files with 7 additions and 7 deletions

View File

@ -32,8 +32,8 @@ int zmq::pipepair (class object_t *parents_ [2], class pipe_t* pipes_ [2],
// Creates two pipe objects. These objects are connected by two ypipes,
// each to pass messages in one direction.
typedef ypipe_t <msg_t, message_pipe_granularity> upipe_normal_t;
typedef ypipe_conflate_t <msg_t, message_pipe_granularity> upipe_conflate_t;
typedef ypipe_t <msg_t, message_pipe_granularity> upipe_normal_t;
typedef ypipe_conflate_t <msg_t> upipe_conflate_t;
pipe_t::upipe_t *upipe1;
if(conflate_ [0])
@ -469,7 +469,7 @@ void zmq::pipe_t::hiccup ()
ypipe_t <msg_t, message_pipe_granularity> ();
else
inpipe = new (std::nothrow)
ypipe_conflate_t <msg_t, message_pipe_granularity> ();
ypipe_conflate_t <msg_t> ();
alloc_assert (inpipe);
in_active = true;

View File

@ -118,7 +118,7 @@ namespace zmq
private:
// Type of the underlying lock-free pipe.
typedef ypipe_base_t <msg_t, message_pipe_granularity> upipe_t;
typedef ypipe_base_t <msg_t> upipe_t;
// Command handlers.
void process_activate_read ();

View File

@ -35,7 +35,7 @@ namespace zmq
// N is granularity of the pipe, i.e. how many items are needed to
// perform next memory allocation.
template <typename T, int N> class ypipe_t : public ypipe_base_t<T,N>
template <typename T, int N> class ypipe_t : public ypipe_base_t <T>
{
public:

View File

@ -28,7 +28,7 @@ namespace zmq
// classes, one is selected according to a the conflate
// socket option
template <typename T, int N> class ypipe_base_t
template <typename T> class ypipe_base_t
{
public:
virtual ~ypipe_base_t () {}

View File

@ -34,7 +34,7 @@ namespace zmq
// reader_awake flag is needed here to mimic ypipe delicate behaviour
// around the reader being asleep (see 'c' pointer being NULL in ypipe.hpp)
template <typename T, int N> class ypipe_conflate_t : public ypipe_base_t<T,N>
template <typename T> class ypipe_conflate_t : public ypipe_base_t <T>
{
public: