mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[PyTorch] Use std::move() in a couple places in function_schema_parser.cpp (#66114)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/66114 ghstack-source-id: 139712533 Test Plan: Build Reviewed By: swolchok Differential Revision: D31387502 fbshipit-source-id: e850cb7df397a7c5b31df995b23ad6e5c004ac86
This commit is contained in:
committed by
Facebook GitHub Bot
parent
aa80f05d2d
commit
9c3eb50b7b
@ -334,7 +334,7 @@ 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) {
|
||||
@ -342,7 +342,7 @@ C10_EXPORT OperatorName parseName(const std::string& 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
|
||||
|
Reference in New Issue
Block a user