mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-13 09:03:54 +00:00
Pure clang-format cleanup (after #2904), NO other changes.
This commit is contained in:
parent
784092dfd2
commit
2ada792085
@ -716,7 +716,8 @@ struct smart_holder_type_caster<std::unique_ptr<T, D>> : smart_holder_type_caste
|
|||||||
|
|
||||||
return inst.release();
|
return inst.release();
|
||||||
}
|
}
|
||||||
static handle cast(const std::unique_ptr<T, D> &src, return_value_policy policy, handle parent) {
|
static handle
|
||||||
|
cast(const std::unique_ptr<T, D> &src, return_value_policy policy, handle parent) {
|
||||||
if (!src)
|
if (!src)
|
||||||
return none().release();
|
return none().release();
|
||||||
if (policy == return_value_policy::automatic)
|
if (policy == return_value_policy::automatic)
|
||||||
|
@ -71,7 +71,9 @@ std::string get_mtxt(atyp const &obj) { return obj.mtxt; }
|
|||||||
std::ptrdiff_t get_ptr(atyp const &obj) { return reinterpret_cast<std::ptrdiff_t>(&obj); }
|
std::ptrdiff_t get_ptr(atyp const &obj) { return reinterpret_cast<std::ptrdiff_t>(&obj); }
|
||||||
|
|
||||||
std::unique_ptr<atyp> unique_ptr_roundtrip(std::unique_ptr<atyp> obj) { return obj; }
|
std::unique_ptr<atyp> unique_ptr_roundtrip(std::unique_ptr<atyp> obj) { return obj; }
|
||||||
const std::unique_ptr<atyp>& unique_ptr_cref_roundtrip(const std::unique_ptr<atyp>& obj) { return obj; }
|
const std::unique_ptr<atyp> &unique_ptr_cref_roundtrip(const std::unique_ptr<atyp> &obj) {
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
struct SharedPtrStash {
|
struct SharedPtrStash {
|
||||||
std::vector<std::shared_ptr<const atyp>> stash;
|
std::vector<std::shared_ptr<const atyp>> stash;
|
||||||
|
Loading…
Reference in New Issue
Block a user