Skip to content

Commit c44b41e

Browse files
authored
[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
1 parent cc0402e commit c44b41e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/pybind11/detail/smart_holder_type_casters.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class modified_type_caster_generic_load_impl {
7979
}
8080
// type_caster_generic::load_value END
8181
}
82-
loaded_v_h = std::move(v_h);
82+
loaded_v_h = v_h;
8383
loaded_v_h.type = typeinfo;
8484
}
8585

include/pybind11/trampoline_self_life_support.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct trampoline_self_life_support {
5353
// For the next two, the default implementations generate undefined behavior (ASAN failures
5454
// manually verified). The reason is that v_h needs to be kept default-initialized.
5555
trampoline_self_life_support(const trampoline_self_life_support &) {}
56-
trampoline_self_life_support(trampoline_self_life_support &&) {}
56+
trampoline_self_life_support(trampoline_self_life_support &&) noexcept {}
5757

5858
// These should never be needed (please provide test cases if you think they are).
5959
trampoline_self_life_support &operator=(const trampoline_self_life_support &) = delete;

0 commit comments

Comments
 (0)