[SmartHolder] fix(clang-tidy): apply clang-tidy performance fixes (#3048)

* Apply clang-tidy performance fixes

* Fix bug introduced by double insert

* Revert all non-smart-holder changes
This commit is contained in:
Aaron Gokaslan 2021-06-18 15:43:31 -04:00 committed by GitHub
parent cc0402ef19
commit c44b41e7c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ public:
}
// type_caster_generic::load_value END
}
loaded_v_h = std::move(v_h);
loaded_v_h = v_h;
loaded_v_h.type = typeinfo;
}

View File

@ -53,7 +53,7 @@ struct trampoline_self_life_support {
// For the next two, the default implementations generate undefined behavior (ASAN failures
// manually verified). The reason is that v_h needs to be kept default-initialized.
trampoline_self_life_support(const trampoline_self_life_support &) {}
trampoline_self_life_support(trampoline_self_life_support &&) {}
trampoline_self_life_support(trampoline_self_life_support &&) noexcept {}
// These should never be needed (please provide test cases if you think they are).
trampoline_self_life_support &operator=(const trampoline_self_life_support &) = delete;