diff libinterp/parse-tree/pt-idx.cc @ 20615:729a85dafba8

use new string_value method to handle value extraction errors * ov-class.cc, ov-classdef.cc, ov-fcn-handle.cc, ov-fcn-inline.cc, ov.cc, pt-idx.cc: Use new string_value method.
author John W. Eaton <jwe@octave.org>
date Thu, 08 Oct 2015 17:55:57 -0400
parents 1a0a433c8263
children
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-idx.cc	Thu Oct 08 18:15:56 2015 -0400
+++ b/libinterp/parse-tree/pt-idx.cc	Thu Oct 08 17:55:57 2015 -0400
@@ -209,10 +209,7 @@
         {
           octave_value t = df->rvalue1 ();
 
-          if (t.is_string () && t.rows () == 1)
-            fn = t.string_value ();
-          else
-            error ("dynamic structure field names must be strings");
+          fn = t.string_value ("dynamic structure field names must be strings");
         }
       else
         panic_impossible ();