From 9fef35532cf8c1c06b889adcc02ce2aec4ac7802 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 22 May 2019 10:12:46 +0900 Subject: [PATCH] [moco] use make_unique (#3569) This will change to use make_unique instead of direct new Signed-off-by: SaeHie Park --- contrib/moco/lib/frontend/tf/src/Op/Identity.cpp | 3 ++- contrib/moco/lib/frontend/tf/src/Op/Relu.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/moco/lib/frontend/tf/src/Op/Identity.cpp b/contrib/moco/lib/frontend/tf/src/Op/Identity.cpp index e6b720b..2afdfc9 100644 --- a/contrib/moco/lib/frontend/tf/src/Op/Identity.cpp +++ b/contrib/moco/lib/frontend/tf/src/Op/Identity.cpp @@ -18,6 +18,7 @@ #include "GraphBuilderContext.h" #include +#include #include @@ -86,7 +87,7 @@ void IdentityGraphBuilder::build(const tensorflow::NodeDef &node, { names.emplace_back(node.input(i)); } - std::unique_ptr update(new IdentityGraphUpdate(forward_node, names)); + auto update = stdex::make_unique(forward_node, names); updates->enroll(std::move(update)); } diff --git a/contrib/moco/lib/frontend/tf/src/Op/Relu.cpp b/contrib/moco/lib/frontend/tf/src/Op/Relu.cpp index 650231b..46baf90 100644 --- a/contrib/moco/lib/frontend/tf/src/Op/Relu.cpp +++ b/contrib/moco/lib/frontend/tf/src/Op/Relu.cpp @@ -19,6 +19,7 @@ #include "GraphBuilderContext.h" #include +#include #include @@ -70,7 +71,7 @@ void ReluGraphBuilder::build(const tensorflow::NodeDef &node, GraphBuilderContex // Record all(should be 1) inputs to relu_node assert(node.input_size() == 1); - std::unique_ptr update(new ReLUGraphUpdate(relu_node, node.input(0))); + auto update = stdex::make_unique(relu_node, node.input(0)); updates->enroll(std::move(update)); } -- 2.7.4