Skip to content

Commit

Permalink
Use the move rvalue macroes
Browse files Browse the repository at this point in the history
  • Loading branch information
antialize committed Mar 13, 2015
1 parent aaa507a commit 4b47616
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions tpie/pipelining/virtual.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,13 @@ class virtsrc_impl : public virtsrc<typename push_type<dest_t>::type> {
dest_t dest;

public:
#ifndef TPIE_CPP_RVALUE_REFERENCE
virtsrc_impl(const dest_t & dest)
: dest(dest)
{
node::add_push_destination(dest);
this->set_name("Virtual source", PRIORITY_INSIGNIFICANT);
this->set_plot_options(node::PLOT_BUFFERED | node::PLOT_SIMPLIFIED_HIDE);
}
#else // TPIE_CPP_RVALUE_REFERENCE
virtsrc_impl(dest_t dest)
: dest(std::move(dest))
virtsrc_impl(TPIE_RREF(dest_t) dest)
: dest(TPIE_MOVE(dest))
{
node::add_push_destination(this->dest);
this->set_name("Virtual source", PRIORITY_INSIGNIFICANT);
this->set_plot_options(node::PLOT_BUFFERED | node::PLOT_SIMPLIFIED_HIDE);
}
#endif // TPIE_CPP_RVALUE_REFERENCE

const node_token & get_token() {
return node::get_token();
Expand Down Expand Up @@ -610,10 +600,10 @@ class vfork_node {
public:
typedef T item_type;

type(dest_t dest, virtual_chunk_end<T> out)
type(TPIE_RREF(dest_t) dest, virtual_chunk_end<T> out)
: vnode(out.get_node())
, dest2(bits::access::get_source(out))
, dest(dest)
, dest(TPIE_MOVE(dest))
{
add_push_destination(dest);
add_push_destination(*dest2);
Expand Down

0 comments on commit 4b47616

Please sign in to comment.