mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 16:37:13 +00:00
Pure clang-format change (applied to original type_caster_generic::cast).
This commit is contained in:
parent
ee6d15647d
commit
6294eb26e5
@ -190,8 +190,9 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
|
|||||||
// type_caster_base END
|
// type_caster_base END
|
||||||
|
|
||||||
// Originally type_caster_generic::cast.
|
// Originally type_caster_generic::cast.
|
||||||
// clang-format off
|
PYBIND11_NOINLINE static handle cast(const void *_src,
|
||||||
PYBIND11_NOINLINE static handle cast(const void *_src, return_value_policy policy, handle parent,
|
return_value_policy policy,
|
||||||
|
handle parent,
|
||||||
const detail::type_info *tinfo,
|
const detail::type_info *tinfo,
|
||||||
void *(*copy_constructor)(const void *),
|
void *(*copy_constructor)(const void *),
|
||||||
void *(*move_constructor)(const void *),
|
void *(*move_constructor)(const void *),
|
||||||
@ -239,8 +240,8 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
|
|||||||
#else
|
#else
|
||||||
std::string type_name(tinfo->cpptype->name());
|
std::string type_name(tinfo->cpptype->name());
|
||||||
detail::clean_type_id(type_name);
|
detail::clean_type_id(type_name);
|
||||||
throw cast_error("return_value_policy = copy, but type " +
|
throw cast_error("return_value_policy = copy, but type " + type_name
|
||||||
type_name + " is non-copyable!");
|
+ " is non-copyable!");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
wrapper->owned = true;
|
wrapper->owned = true;
|
||||||
@ -259,8 +260,8 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
|
|||||||
#else
|
#else
|
||||||
std::string type_name(tinfo->cpptype->name());
|
std::string type_name(tinfo->cpptype->name());
|
||||||
detail::clean_type_id(type_name);
|
detail::clean_type_id(type_name);
|
||||||
throw cast_error("return_value_policy = move, but type " +
|
throw cast_error("return_value_policy = move, but type " + type_name
|
||||||
type_name + " is neither movable nor copyable!");
|
+ " is neither movable nor copyable!");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
wrapper->owned = true;
|
wrapper->owned = true;
|
||||||
@ -280,7 +281,6 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
|
|||||||
|
|
||||||
return inst.release();
|
return inst.release();
|
||||||
}
|
}
|
||||||
// clang-format on
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
Loading…
Reference in New Issue
Block a user