Skip to content

Commit 39be69a

Browse files
committed
Updates related to clang-tidy upgrade (to version 18):
pybind/pybind11#5272
1 parent 939d37a commit 39be69a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/pybind11/detail/cross_extension_shared_state.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct cross_extension_shared_state {
110110
}
111111
*payload_pp() = new payload_type();
112112
get_python_state_dict()[AdapterType::abi_id()]
113-
= capsule(payload_pp(), AdapterType::abi_id());
113+
= capsule(reinterpret_cast<void *>(payload_pp()), AdapterType::abi_id());
114114
return **payload_pp();
115115
}
116116

tests/test_class_sh_property_stl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct FieldHolder {
2020

2121
struct VectorFieldHolder {
2222
std::vector<FieldHolder> vec_fld_hld;
23-
VectorFieldHolder() { vec_fld_hld.push_back(FieldHolder{Field{300}}); }
23+
VectorFieldHolder() { vec_fld_hld.emplace_back(Field{300}); }
2424
void reset_at(std::size_t index, int wrapped_int) {
2525
if (index < vec_fld_hld.size()) {
2626
vec_fld_hld[index].fld.wrapped_int = wrapped_int;

0 commit comments

Comments
 (0)