From 00ed1d30cfde05b921de1e61e7be1b5396a30e5e Mon Sep 17 00:00:00 2001 From: wmin0 Date: Mon, 26 Feb 2024 22:42:27 +0800 Subject: [PATCH] python,util: Fix SimObjectParams default constructor and destructor (#880) The empty constructor prevent zero-initialization working correctly. In this change we fix the issue by removing the unwanted empty constructor. We also change the default destructor specification with c++11 style. Change-Id: I869a93ca5283f811c2aa58406f1478459e0d7022 --- build_tools/sim_object_param_struct_hh.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_tools/sim_object_param_struct_hh.py b/build_tools/sim_object_param_struct_hh.py index c82c25921c..23e10a9bfa 100644 --- a/build_tools/sim_object_param_struct_hh.py +++ b/build_tools/sim_object_param_struct_hh.py @@ -211,8 +211,7 @@ code.indent() if sim_object == SimObject: code( """ -SimObjectParams() {} -virtual ~SimObjectParams() {} +virtual ~SimObjectParams() = default; std::string name; """