Skip to content

Commit

Permalink
[PyTorch] Use std::move() in a couple places in function_schema_parse…
Browse files Browse the repository at this point in the history
…r.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
  • Loading branch information
dhruvbird authored and facebook-github-bot committed Oct 5, 2021
1 parent aa80f05 commit 9c3eb50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch/csrc/jit/frontend/function_schema_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,15 @@ C10_EXPORT FunctionSchema parseSchema(const std::string& schema) {
TORCH_CHECK(
parsed.is_right(),
"Tried to parse a function schema but only the operator name was given");
return parsed.right();
return std::move(parsed.right());
}

C10_EXPORT OperatorName parseName(const std::string& name) {
auto parsed = parseSchemaOrName(name);
TORCH_CHECK(
parsed.is_left(),
"Tried to parse an operator name but function schema was given");
return parsed.left();
return std::move(parsed.left());
}

} // namespace jit
Expand Down

0 comments on commit 9c3eb50

Please sign in to comment.