diff libinterp/parse-tree/pt-idx.cc @ 25383:d3a035528c9a

use reference to tree_evaluator instead of pointer Always use a reference to the evaluator instead of a pointer because it is required to and will always exist everywhere it is used. Files affected: ov-fcn-handle.cc, ov-fcn-handle.h, pt-decl.h, pt-eval.cc, pt-exp.cc, pt-exp.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-tm-const.cc, pt-tm-const.h.
author John W. Eaton <jwe@octave.org>
date Tue, 15 May 2018 18:09:04 -0400
parents 749d9e858553
children 8fb0df0c8772
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-idx.cc	Tue May 15 17:05:47 2018 -0400
+++ b/libinterp/parse-tree/pt-idx.cc	Tue May 15 18:09:04 2018 -0400
@@ -145,7 +145,7 @@
   }
 
   static inline octave_value_list
-  make_value_list (tree_evaluator *tw,
+  make_value_list (tree_evaluator& tw,
                    tree_argument_list *m_args,
                    const string_vector& m_arg_nm, const octave_value *object,
                    bool rvalue = true)
@@ -158,7 +158,7 @@
             && object->is_undefined ())
           err_invalid_inquiry_subscript ();
 
-        retval = tw->convert_to_const_vector (m_args, object);
+        retval = tw.convert_to_const_vector (m_args, object);
       }
 
     octave_idx_type n = retval.length ();
@@ -171,7 +171,7 @@
 
   std::string
   tree_index_expression::get_struct_index
-  (tree_evaluator *tw,
+  (tree_evaluator& tw,
    std::list<string_vector>::const_iterator p_arg_nm,
    std::list<tree_expression *>::const_iterator p_dyn_field) const
   {
@@ -183,7 +183,7 @@
 
         if (df)
           {
-            octave_value t = tw->evaluate (df);
+            octave_value t = tw.evaluate (df);
 
             fn = t.xstring_value ("dynamic structure field names must be strings");
           }
@@ -231,7 +231,7 @@
   }
 
   octave_lvalue
-  tree_index_expression::lvalue (tree_evaluator *tw)
+  tree_index_expression::lvalue (tree_evaluator& tw)
   {
     octave_lvalue retval;