Skip to content

Commit b4f5350

Browse files
rwgkSkylion007
andauthored
chore: use member initializer (#3704)
Co-authored-by: Aaron Gokaslan <[email protected]>
1 parent ddbc74c commit b4f5350

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

include/pybind11/detail/type_caster_base.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ class loader_life_support {
6262

6363
public:
6464
/// A new patient frame is created when a function is entered
65-
loader_life_support() {
66-
parent = get_stack_top();
67-
set_stack_top(this);
68-
}
65+
loader_life_support() : parent{get_stack_top()} { set_stack_top(this); }
6966

7067
/// ... and destroyed after it returns
7168
~loader_life_support() {

0 commit comments

Comments
 (0)