diff libinterp/octave-value/ov-struct.cc @ 20700:68e3a747ca02

rename octave_value value extractors that accept error message args * ov.h, ov.cc (octave_value::xcell_value, octave_value::xstring_value, octave_value::xcellstr_value): Rename functions that accept error message args. Handle error directly. Only forward to functions that don't attempt type conversion. Change all uses. * ov-base.h, ov-base.cc (octave_base_value::xstring_value): Don't do type conversion. (octave_base_value::cell_value, octave_base_value::cellstr_value): Delete versions that accept error message args. * ov-str-mat.h, ov-str-mat.cc (octave_char_matrix_str::string_value, octave_char_matrix_str::cell_value): Delete.
author John W. Eaton <jwe@octave.org>
date Fri, 13 Nov 2015 14:10:26 -0500
parents b0b37f0d7e6d
children 571508c1ed06
line wrap: on
line diff
--- a/libinterp/octave-value/ov-struct.cc	Thu Nov 12 19:27:25 2015 -0800
+++ b/libinterp/octave-value/ov-struct.cc	Fri Nov 13 14:10:26 2015 -0500
@@ -803,7 +803,7 @@
               if (!is)
                 break;
 
-              Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading struct elements") : Cell (t2);
+              Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2);
 
               m.setfield (nm, tcell);
             }
@@ -925,7 +925,7 @@
           if (!is)
             break;
 
-          Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading struct elements") : Cell (t2);
+          Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2);
 
           m.setfield (nm, tcell);
         }
@@ -1022,7 +1022,7 @@
     {
       octave_value t2 = dsub.tc;
 
-      Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading struct elements") : Cell (t2);
+      Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2);
 
       m.setfield (dsub.name, tcell);
 
@@ -1814,7 +1814,7 @@
 
       if (nargin == 2)
         {
-          Array<std::string> cstr = args(1).cellstr_value ("struct: expecting cell array of field names as second argument");
+          Array<std::string> cstr = args(1).xcellstr_value ("struct: expecting cell array of field names as second argument");
 
           retval = octave_map (args(0).dims (), cstr);
         }