further simplifications to shared_ptr caster

This commit is contained in:
Wenzel Jakob 2016-04-30 23:01:06 +02:00
parent e44e56fafc
commit 8edfa0c10f

View File

@ -680,8 +680,6 @@ public:
using type_caster_base<type>::typeinfo; using type_caster_base<type>::typeinfo;
using type_caster_base<type>::value; using type_caster_base<type>::value;
using type_caster_base<type>::temp; using type_caster_base<type>::temp;
using type_caster_base<type>::copy_constructor;
using type_caster_base<type>::move_constructor;
bool load(handle src, bool convert) { bool load(handle src, bool convert) {
if (!src || !typeinfo) { if (!src || !typeinfo) {
@ -718,11 +716,11 @@ public:
explicit operator holder_type&() { return holder; } explicit operator holder_type&() { return holder; }
#endif #endif
static handle cast(const holder_type &src, return_value_policy policy, handle parent) { static handle cast(const holder_type &src, return_value_policy, handle) {
return type_caster_generic::cast( return type_caster_generic::cast(
src.get(), return_value_policy::take_ownership, parent, src.get(), return_value_policy::take_ownership, handle(),
src.get() ? &typeid(*src.get()) : nullptr, &typeid(type), src.get() ? &typeid(*src.get()) : nullptr, &typeid(type),
&copy_constructor, &move_constructor, &src); nullptr, nullptr, &src);
} }
protected: protected: