mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
More fixes and improved clang-tidy checkers (#93213)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/93213 Approved by: https://github.com/Skylion007
This commit is contained in:
@ -197,8 +197,8 @@ class class_ : public ::torch::detail::class_base {
|
||||
GetterFunc getter_func,
|
||||
SetterFunc setter_func,
|
||||
std::string doc_string = "") {
|
||||
torch::jit::Function* getter;
|
||||
torch::jit::Function* setter;
|
||||
torch::jit::Function* getter{};
|
||||
torch::jit::Function* setter{};
|
||||
|
||||
auto wrapped_getter =
|
||||
detail::wrap_func<CurClass, GetterFunc>(std::move(getter_func));
|
||||
@ -218,7 +218,7 @@ class class_ : public ::torch::detail::class_base {
|
||||
const std::string& name,
|
||||
GetterFunc getter_func,
|
||||
std::string doc_string = "") {
|
||||
torch::jit::Function* getter;
|
||||
torch::jit::Function* getter{};
|
||||
|
||||
auto wrapped_getter =
|
||||
detail::wrap_func<CurClass, GetterFunc>(std::move(getter_func));
|
||||
@ -321,7 +321,7 @@ class class_ : public ::torch::detail::class_base {
|
||||
c10::guts::infer_function_traits_t<std::decay_t<SetStateFn>>;
|
||||
using SetStateArg = typename c10::guts::typelist::head_t<
|
||||
typename SetStateTraits::parameter_types>;
|
||||
auto setstate_wrapper = [set_state = std::move(set_state)](
|
||||
auto setstate_wrapper = [set_state = std::forward<SetStateFn>(set_state)](
|
||||
c10::tagged_capsule<CurClass> self,
|
||||
SetStateArg&& arg) {
|
||||
c10::intrusive_ptr<CurClass> classObj =
|
||||
|
Reference in New Issue
Block a user