# HG changeset patch # User John W. Eaton # Date 1552582136 0 # Node ID b54d9581b1ac1ceb1d29afc8223f1de0fa5b2d92 # Parent ae9f8906e2cb98616946e7e8421aa9652eec9156 avoid some overloaded virtual warnings (bug #55741) * stack-frame.h (compiled_fcn_stack_frame, script_stack_frame, base_value_stack_frame, user_fcn_stack_frame, scope_stack_frame): Add using declarations for the base class virtual varval and varref functions since we are only partially overloading them. diff -r ae9f8906e2cb -r b54d9581b1ac libinterp/corefcn/stack-frame.h --- a/libinterp/corefcn/stack-frame.h Thu Mar 14 15:26:38 2019 +0000 +++ b/libinterp/corefcn/stack-frame.h Thu Mar 14 16:48:56 2019 +0000 @@ -627,6 +627,12 @@ return m_static_link->get_auto_fcn_var (avt); } + // We only need to override one of each of these functions. The + // using declaration will avoid warnings about partially-overloaded + // virtual functions. + using stack_frame::varval; + using stack_frame::varref; + octave_value varval (const symbol_record& sym) const { // Look in closest stack frame that contains values (either the @@ -756,6 +762,12 @@ return m_access_link->get_auto_fcn_var (avt); } + // We only need to override one of each of these functions. The + // using declaration will avoid warnings about partially-overloaded + // virtual functions. + using stack_frame::varval; + using stack_frame::varref; + octave_value varval (const symbol_record& sym) const; octave_value& varref (const symbol_record& sym); @@ -841,6 +853,12 @@ m_auto_vars.at (avt) = val; } + // We only need to override one of each of these functions. The + // using declaration will avoid warnings about partially-overloaded + // virtual functions. + using stack_frame::varval; + using stack_frame::varref; + octave_value varval (size_t data_offset) const { return m_values.at (data_offset); @@ -939,6 +957,12 @@ scope_flags scope_flag (const symbol_record& sym) const; + // We only need to override one of each of these functions. The + // using declaration will avoid warnings about partially-overloaded + // virtual functions. + using base_value_stack_frame::varval; + using base_value_stack_frame::varref; + octave_value varval (const symbol_record& sym) const; octave_value& varref (const symbol_record& sym); @@ -1001,6 +1025,12 @@ scope_flags scope_flag (const symbol_record& sym) const; + // We only need to override one of each of these functions. The + // using declaration will avoid warnings about partially-overloaded + // virtual functions. + using base_value_stack_frame::varval; + using base_value_stack_frame::varref; + octave_value varval (const symbol_record& sym) const; octave_value& varref (const symbol_record& sym);