Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
eac5b49f
Commit
eac5b49f
authored
Jan 25, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
clang-tidy fixes.
parent
f19e8088
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
include/pybind11/detail/smart_holder_type_casters.h
include/pybind11/detail/smart_holder_type_casters.h
+10
-10
No files found.
include/pybind11/detail/smart_holder_type_casters.h
View file @
eac5b49f
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment