From f3206eba55d61b3b834fdb57dd6b5fa6f6f58c11 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Thu, 3 Feb 2022 14:30:25 -0500 Subject: [PATCH] Use member initializer --- 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 212a944afe..071de23b56 100644 --- a/include/pybind11/detail/type_caster_base.h +++ b/include/pybind11/detail/type_caster_base.h @@ -62,10 +62,7 @@ class loader_life_support { 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() {