clang-tidy fixes.

parent f19e8088
...@@ -517,8 +517,8 @@ struct smart_holder_type_caster<std::shared_ptr<T>> : smart_holder_type_caster_l ...@@ -517,8 +517,8 @@ struct smart_holder_type_caster<std::shared_ptr<T>> : smart_holder_type_caster_l
// MISSING: keep_alive. // MISSING: keep_alive.
return existing_inst.second; return existing_inst.second;
object inst = reinterpret_steal<object>(make_new_instance(tinfo->type)); auto inst = reinterpret_steal<object>(make_new_instance(tinfo->type));
instance *inst_raw_ptr = reinterpret_cast<instance *>(inst.ptr()); auto *inst_raw_ptr = reinterpret_cast<instance *>(inst.ptr());
inst_raw_ptr->owned = true; inst_raw_ptr->owned = true;
void *&valueptr = values_and_holders(inst_raw_ptr).begin()->value_ptr(); void *&valueptr = values_and_holders(inst_raw_ptr).begin()->value_ptr();
valueptr = src_raw_void_ptr; valueptr = src_raw_void_ptr;
...@@ -578,8 +578,8 @@ struct smart_holder_type_caster<std::unique_ptr<T>> : smart_holder_type_caster_l ...@@ -578,8 +578,8 @@ struct smart_holder_type_caster<std::unique_ptr<T>> : smart_holder_type_caster_l
if (existing_inst.first) if (existing_inst.first)
throw cast_error("Invalid unique_ptr: another instance owns this pointer already."); throw cast_error("Invalid unique_ptr: another instance owns this pointer already.");
object inst = reinterpret_steal<object>(make_new_instance(tinfo->type)); auto inst = reinterpret_steal<object>(make_new_instance(tinfo->type));
instance *inst_raw_ptr = reinterpret_cast<instance *>(inst.ptr()); auto *inst_raw_ptr = reinterpret_cast<instance *>(inst.ptr());
inst_raw_ptr->owned = true; inst_raw_ptr->owned = true;
void *&valueptr = values_and_holders(inst_raw_ptr).begin()->value_ptr(); void *&valueptr = values_and_holders(inst_raw_ptr).begin()->value_ptr();
valueptr = src_raw_void_ptr; valueptr = src_raw_void_ptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment