Skip to content

Commit 9c3eb50

Browse files
dhruvbirdfacebook-github-bot
authored andcommitted
[PyTorch] Use std::move() in a couple places in function_schema_parser.cpp (pytorch#66114)
Summary: Pull Request resolved: pytorch#66114 ghstack-source-id: 139712533 Test Plan: Build Reviewed By: swolchok Differential Revision: D31387502 fbshipit-source-id: e850cb7df397a7c5b31df995b23ad6e5c004ac86
1 parent aa80f05 commit 9c3eb50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch/csrc/jit/frontend/function_schema_parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,15 @@ C10_EXPORT FunctionSchema parseSchema(const std::string& schema) {
334334
TORCH_CHECK(
335335
parsed.is_right(),
336336
"Tried to parse a function schema but only the operator name was given");
337-
return parsed.right();
337+
return std::move(parsed.right());
338338
}
339339

340340
C10_EXPORT OperatorName parseName(const std::string& name) {
341341
auto parsed = parseSchemaOrName(name);
342342
TORCH_CHECK(
343343
parsed.is_left(),
344344
"Tried to parse an operator name but function schema was given");
345-
return parsed.left();
345+
return std::move(parsed.left());
346346
}
347347

348348
} // namespace jit

0 commit comments

Comments
 (0)