From 2f4489e17b6d0640398fd7b635868cf76cae584a Mon Sep 17 00:00:00 2001 From: Bertho Stultiens Date: Fri, 17 Jan 2025 21:53:55 +0100 Subject: [PATCH] Fix cast function type warnings. Fix base-class constructor call from copy constructor. --- src/emc/rs274ngc/interp_array_types.hh | 12 +++++++++--- src/emc/rs274ngc/interp_g7x.cc | 2 +- src/emc/rs274ngc/pyinterp1.cc | 6 +++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/emc/rs274ngc/interp_array_types.hh b/src/emc/rs274ngc/interp_array_types.hh index 1683003e285..83843a6f91b 100644 --- a/src/emc/rs274ngc/interp_array_types.hh +++ b/src/emc/rs274ngc/interp_array_types.hh @@ -26,9 +26,15 @@ namespace pp = pyplusplus::containers::static_sized; typedef pp::array_1_t spindle_speed_array, (*spindle_speed_w)(Interp &); -typedef pp::array_1_t< int, ACTIVE_G_CODES> active_g_codes_array, (*active_g_codes_w)( Interp & ); -typedef pp::array_1_t< int, ACTIVE_M_CODES> active_m_codes_array, (*active_m_codes_w)( Interp & ); -typedef pp::array_1_t< double, ACTIVE_SETTINGS> active_settings_array, (*active_settings_w)( Interp & ); +typedef pp::array_1_t< int, ACTIVE_G_CODES> active_g_codes_array, + (*active_g_codes_w)( Interp & ), + (*active_g_codes_w_ctx)( context & ); +typedef pp::array_1_t< int, ACTIVE_M_CODES> active_m_codes_array, + (*active_m_codes_w)( Interp & ), + (*active_m_codes_w_ctx)( context & ); +typedef pp::array_1_t< double, ACTIVE_SETTINGS> active_settings_array, + (*active_settings_w)( Interp & ), + (*active_settings_w_ctx)( context & ); typedef pp::array_1_t< block, MAX_NESTED_REMAPS> blocks_array, (*blocks_w)( Interp & ); typedef pp::array_1_t< double, interp_param_global::RS274NGC_MAX_PARAMETERS > parameters_array, (*parameters_w)( Interp & ); diff --git a/src/emc/rs274ngc/interp_g7x.cc b/src/emc/rs274ngc/interp_g7x.cc index f97c407c340..bd715d84095 100644 --- a/src/emc/rs274ngc/interp_g7x.cc +++ b/src/emc/rs274ngc/interp_g7x.cc @@ -641,7 +641,7 @@ class g7x:public std::list> { public: g7x() = default; - g7x(g7x const &other) { + g7x(g7x const &other) : std::list>() { delta=other.delta; escape=other.escape; flip_state=other.flip_state; diff --git a/src/emc/rs274ngc/pyinterp1.cc b/src/emc/rs274ngc/pyinterp1.cc index 30a64ec7cb4..b90b3a18e1a 100644 --- a/src/emc/rs274ngc/pyinterp1.cc +++ b/src/emc/rs274ngc/pyinterp1.cc @@ -68,13 +68,13 @@ void export_Internals() bp::make_function( saved_params_w(&saved_params_wrapper), bp::with_custodian_and_ward_postcall< 0, 1 >())) .add_property( "saved_g_codes", - bp::make_function( active_g_codes_w(&saved_g_codes_wrapper), + bp::make_function( active_g_codes_w_ctx(&saved_g_codes_wrapper), bp::with_custodian_and_ward_postcall< 0, 1 >())) .add_property( "saved_m_codes", - bp::make_function( active_m_codes_w(&saved_m_codes_wrapper), + bp::make_function( active_m_codes_w_ctx(&saved_m_codes_wrapper), bp::with_custodian_and_ward_postcall< 0, 1 >())) .add_property( "saved_settings", - bp::make_function( active_settings_w(&saved_settings_wrapper), + bp::make_function( active_settings_w_ctx(&saved_settings_wrapper), bp::with_custodian_and_ward_postcall< 0, 1 >())) .def_readwrite("context_status", &context::context_status) .def_readwrite("named_params", &context::named_params)