Skip to content

Commit d09564b

Browse files
author
Peng Li
committed
change std::vector<int> to const reference
1 parent 8bd4752 commit d09564b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

paddle/gserver/tests/LayerGradUtil.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ struct InputDef {
6666
bool isStatic;
6767
std::vector<int> labelInitValue;
6868
std::vector<int> labelSeqStartPositions;
69+
6970
InputDef(InputType type, string nameIn, size_t dimIn, size_t sizeIn) {
7071
inputType = type;
7172
name = nameIn;
@@ -79,8 +80,8 @@ struct InputDef {
7980
string nameIn,
8081
size_t dimIn,
8182
size_t sizeIn,
82-
std::vector<int> labelInitValue,
83-
std::vector<int> labelSeqStartPositions)
83+
const std::vector<int>& labelInitValue,
84+
const std::vector<int>& labelSeqStartPositions)
8485
: labelInitValue(labelInitValue),
8586
labelSeqStartPositions(labelSeqStartPositions) {
8687
inputType = type;

0 commit comments

Comments
 (0)