Commit ecb97709 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #809 from hurtonm/master

Simplify ypipe_t and ypipe_base_t template parameters
parents c7e3efba 96f5fddc
...@@ -33,7 +33,7 @@ int zmq::pipepair (class object_t *parents_ [2], class pipe_t* pipes_ [2], ...@@ -33,7 +33,7 @@ int zmq::pipepair (class object_t *parents_ [2], class pipe_t* pipes_ [2],
// each to pass messages in one direction. // each to pass messages in one direction.
typedef ypipe_t <msg_t, message_pipe_granularity> upipe_normal_t; 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_conflate_t <msg_t> upipe_conflate_t;
pipe_t::upipe_t *upipe1; pipe_t::upipe_t *upipe1;
if(conflate_ [0]) if(conflate_ [0])
...@@ -469,7 +469,7 @@ void zmq::pipe_t::hiccup () ...@@ -469,7 +469,7 @@ void zmq::pipe_t::hiccup ()
ypipe_t <msg_t, message_pipe_granularity> (); ypipe_t <msg_t, message_pipe_granularity> ();
else else
inpipe = new (std::nothrow) inpipe = new (std::nothrow)
ypipe_conflate_t <msg_t, message_pipe_granularity> (); ypipe_conflate_t <msg_t> ();
alloc_assert (inpipe); alloc_assert (inpipe);
in_active = true; in_active = true;
......
...@@ -118,7 +118,7 @@ namespace zmq ...@@ -118,7 +118,7 @@ namespace zmq
private: private:
// Type of the underlying lock-free pipe. // 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. // Command handlers.
void process_activate_read (); void process_activate_read ();
......
...@@ -35,7 +35,7 @@ namespace zmq ...@@ -35,7 +35,7 @@ namespace zmq
// N is granularity of the pipe, i.e. how many items are needed to // N is granularity of the pipe, i.e. how many items are needed to
// perform next memory allocation. // 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: public:
......
...@@ -28,7 +28,7 @@ namespace zmq ...@@ -28,7 +28,7 @@ namespace zmq
// classes, one is selected according to a the conflate // classes, one is selected according to a the conflate
// socket option // socket option
template <typename T, int N> class ypipe_base_t template <typename T> class ypipe_base_t
{ {
public: public:
virtual ~ypipe_base_t () {} virtual ~ypipe_base_t () {}
......
...@@ -34,7 +34,7 @@ namespace zmq ...@@ -34,7 +34,7 @@ namespace zmq
// reader_awake flag is needed here to mimic ypipe delicate behaviour // reader_awake flag is needed here to mimic ypipe delicate behaviour
// around the reader being asleep (see 'c' pointer being NULL in ypipe.hpp) // 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: public:
......
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