From 1365f2d15e6f1e02592a5cf5b5f5d07a0eb7f99c Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Thu, 17 Aug 2017 14:37:03 +0800 Subject: [PATCH] Remove R-Value reference in AddOp Fit Google C++ Style --- paddle/operators/net_op.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/operators/net_op.h b/paddle/operators/net_op.h index e8720c96099..885ac6eeca6 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"); -- GitLab