Mercurial > octave
changeset 26912:b54d9581b1ac
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.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 14 Mar 2019 16:48:56 +0000 |
parents | ae9f8906e2cb |
children | 8efea0dcccd4 |
files | libinterp/corefcn/stack-frame.h |
diffstat | 1 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);