diff --git a/tests/test_classh_wip.cpp b/tests/test_classh_wip.cpp index e0652c038..5c9fcdb9d 100644 --- a/tests/test_classh_wip.cpp +++ b/tests/test_classh_wip.cpp @@ -190,8 +190,9 @@ struct type_caster : smart_holder_type_caster_load { // type_caster_base END // Originally type_caster_generic::cast. - // clang-format off - PYBIND11_NOINLINE static handle cast(const void *_src, return_value_policy policy, handle parent, + PYBIND11_NOINLINE static handle cast(const void *_src, + return_value_policy policy, + handle parent, const detail::type_info *tinfo, void *(*copy_constructor)(const void *), void *(*move_constructor)(const void *), @@ -211,21 +212,21 @@ struct type_caster : smart_holder_type_caster_load { } } - auto inst = reinterpret_steal(make_new_instance(tinfo->type)); - auto wrapper = reinterpret_cast(inst.ptr()); - wrapper->owned = false; + auto inst = reinterpret_steal(make_new_instance(tinfo->type)); + auto wrapper = reinterpret_cast(inst.ptr()); + wrapper->owned = false; void *&valueptr = values_and_holders(wrapper).begin()->value_ptr(); switch (policy) { case return_value_policy::automatic: case return_value_policy::take_ownership: - valueptr = src; + valueptr = src; wrapper->owned = true; break; case return_value_policy::automatic_reference: case return_value_policy::reference: - valueptr = src; + valueptr = src; wrapper->owned = false; break; @@ -239,8 +240,8 @@ struct type_caster : smart_holder_type_caster_load { #else std::string type_name(tinfo->cpptype->name()); detail::clean_type_id(type_name); - throw cast_error("return_value_policy = copy, but type " + - type_name + " is non-copyable!"); + throw cast_error("return_value_policy = copy, but type " + type_name + + " is non-copyable!"); #endif } wrapper->owned = true; @@ -259,15 +260,15 @@ struct type_caster : smart_holder_type_caster_load { #else std::string type_name(tinfo->cpptype->name()); detail::clean_type_id(type_name); - throw cast_error("return_value_policy = move, but type " + - type_name + " is neither movable nor copyable!"); + throw cast_error("return_value_policy = move, but type " + type_name + + " is neither movable nor copyable!"); #endif } wrapper->owned = true; break; case return_value_policy::reference_internal: - valueptr = src; + valueptr = src; wrapper->owned = false; keep_alive_impl(inst, parent); break; @@ -280,7 +281,6 @@ struct type_caster : smart_holder_type_caster_load { return inst.release(); } - // clang-format on }; template <>