Skip to content

Commit a2bbae2

Browse files
committed
Use member initializer
1 parent aab27e5 commit a2bbae2

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)