Skip to content

Commit ab9693b

Browse files
committed
Undo changes in type_caster_base.h (the file is now identical to the version master again)
1 parent 32db87a commit ab9693b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/pybind11/detail/type_caster_base.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,7 @@ handle smart_holder_from_unique_ptr(std::unique_ptr<T, D> &&src,
604604
auto *inst_raw_ptr = reinterpret_cast<instance *>(inst.ptr());
605605
inst_raw_ptr->owned = true;
606606
void *&valueptr = values_and_holders(inst_raw_ptr).begin()->value_ptr();
607-
if (valueptr) {
608-
}
607+
valueptr = src_raw_void_ptr;
609608

610609
if (static_cast<void *>(src.get()) == src_raw_void_ptr) {
611610
// This is a multiple-inheritance situation that is incompatible with the current
@@ -672,8 +671,7 @@ handle smart_holder_from_shared_ptr(const std::shared_ptr<T> &src,
672671
auto *inst_raw_ptr = reinterpret_cast<instance *>(inst.ptr());
673672
inst_raw_ptr->owned = true;
674673
void *&valueptr = values_and_holders(inst_raw_ptr).begin()->value_ptr();
675-
if (valueptr) {
676-
}
674+
valueptr = src_raw_void_ptr;
677675

678676
auto smhldr
679677
= smart_holder::from_shared_ptr(std::shared_ptr<void>(src, const_cast<void *>(st.first)));

0 commit comments

Comments
 (0)