From b4f5350d0d3cc8813202becad31de06bb17112b3 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 8 Feb 2022 19:08:31 -0800 Subject: [PATCH] chore: use member initializer (#3704) Co-authored-by: Aaron Gokaslan --- include/pybind11/detail/type_caster_base.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/pybind11/detail/type_caster_base.h b/include/pybind11/detail/type_caster_base.h index 212a944a..071de23b 100644 --- a/include/pybind11/detail/type_caster_base.h +++ b/include/pybind11/detail/type_caster_base.h @@ -62,10 +62,7 @@ private: public: /// A new patient frame is created when a function is entered - loader_life_support() { - parent = get_stack_top(); - set_stack_top(this); - } + loader_life_support() : parent{get_stack_top()} { set_stack_top(this); } /// ... and destroyed after it returns ~loader_life_support() {