From d09564b73f77e248748f5f07738b07e708275194 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Wed, 21 Dec 2016 15:10:42 +0800 Subject: [PATCH] change std::vector to const reference --- paddle/gserver/tests/LayerGradUtil.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/gserver/tests/LayerGradUtil.h b/paddle/gserver/tests/LayerGradUtil.h index 46cfcd29e0..4e88ac0e81 100644 --- a/paddle/gserver/tests/LayerGradUtil.h +++ b/paddle/gserver/tests/LayerGradUtil.h @@ -66,6 +66,7 @@ struct InputDef { bool isStatic; std::vector labelInitValue; std::vector labelSeqStartPositions; + InputDef(InputType type, string nameIn, size_t dimIn, size_t sizeIn) { inputType = type; name = nameIn; @@ -79,8 +80,8 @@ struct InputDef { string nameIn, size_t dimIn, size_t sizeIn, - std::vector labelInitValue, - std::vector labelSeqStartPositions) + const std::vector& labelInitValue, + const std::vector& labelSeqStartPositions) : labelInitValue(labelInitValue), labelSeqStartPositions(labelSeqStartPositions) { inputType = type; -- GitLab