diff --git a/paddle/operators/net_op.h b/paddle/operators/net_op.h index e8720c9609979215b19e525fdc7beb7563365e01..885ac6eeca65998dea62c1db40b9261cceb97805 100644 --- a/paddle/operators/net_op.h +++ b/paddle/operators/net_op.h @@ -89,13 +89,13 @@ class NetOp : public framework::OperatorBase { /** * @brief Add an operator by ptr */ - void AddOp(std::unique_ptr&& op) { + void AddOp(std::unique_ptr op) { PADDLE_ENFORCE(!add_op_done_, "Cannot AddOp when this network is sealed"); PADDLE_ENFORCE_NOT_NULL(op, "Cannot Insert Null op"); ops_.push_back(std::move(op)); } - void InsertOp(size_t pos, std::unique_ptr&& op) { + void InsertOp(size_t pos, std::unique_ptr op) { PADDLE_ENFORCE(!add_op_done_, "Cannot InsertOp when this network is sealed"); PADDLE_ENFORCE_NOT_NULL(op, "Cannot Insert Null op");