changeset 20953:758b71e964ce

maint: Eliminate more useless statements after error(). * ov-base-diag.cc, ov-base-int.cc, ov-base-sparse.cc, ov-fcn-handle.cc, ov-perm.cc, ov-str-mat.cc: maint: Eliminate more useless statements after error().
author Rik <rik@octave.org>
date Sun, 20 Dec 2015 08:16:36 -0800
parents 072559bd31f2
children 6982def1d416
files libinterp/octave-value/ov-base-diag.cc libinterp/octave-value/ov-base-int.cc libinterp/octave-value/ov-base-sparse.cc libinterp/octave-value/ov-fcn-handle.cc libinterp/octave-value/ov-perm.cc libinterp/octave-value/ov-str-mat.cc
diffstat 6 files changed, 7 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base-diag.cc	Sun Dec 20 07:42:17 2015 -0800
+++ b/libinterp/octave-value/ov-base-diag.cc	Sun Dec 20 08:16:36 2015 -0800
@@ -510,10 +510,7 @@
       is >> tmp;
 
       if (!is)
-        {
-          error ("load: failed to load diagonal matrix constant");
-          success = false;
-        }
+        error ("load: failed to load diagonal matrix constant");
       else
         {
           // This is a little tricky, as we have the Matrix type, but
--- a/libinterp/octave-value/ov-base-int.cc	Sun Dec 20 07:42:17 2015 -0800
+++ b/libinterp/octave-value/ov-base-int.cc	Sun Dec 20 08:16:36 2015 -0800
@@ -222,10 +222,7 @@
           is >> tmp;
 
           if (!is)
-            {
-              error ("load: failed to load matrix constant");
-              success = false;
-            }
+            error ("load: failed to load matrix constant");
 
           this->matrix = tmp;
         }
--- a/libinterp/octave-value/ov-base-sparse.cc	Sun Dec 20 07:42:17 2015 -0800
+++ b/libinterp/octave-value/ov-base-sparse.cc	Sun Dec 20 08:16:36 2015 -0800
@@ -456,10 +456,7 @@
       is >> tmp;
 
       if (!is)
-        {
-          error ("load: failed to load matrix constant");
-          success = false;
-        }
+        error ("load: failed to load matrix constant");
 
       matrix = tmp;
     }
--- a/libinterp/octave-value/ov-fcn-handle.cc	Sun Dec 20 07:42:17 2015 -0800
+++ b/libinterp/octave-value/ov-fcn-handle.cc	Sun Dec 20 08:16:36 2015 -0800
@@ -333,10 +333,7 @@
           fcn = symbol_table::find_function (nm);
 
           if (! fcn.is_function ())
-            {
-              error ("function handle points to non-existent function");
-              success = false;
-            }
+            error ("function handle points to non-existent function");
         }
     }
 
@@ -1145,10 +1142,7 @@
           H5Gclose (data_hid);
 
           if (num_obj != static_cast<hsize_t>(len))
-            {
-              error ("load: failed to load anonymous function handle");
-              success = false;
-            }
+            error ("load: failed to load anonymous function handle");
 
           hdf5_callback_data dsub;
           int current_item = 0;
--- a/libinterp/octave-value/ov-perm.cc	Sun Dec 20 07:42:17 2015 -0800
+++ b/libinterp/octave-value/ov-perm.cc	Sun Dec 20 08:16:36 2015 -0800
@@ -293,10 +293,7 @@
       ColumnVector tmp (n);
       is >> tmp;
       if (!is)
-        {
-          error ("load: failed to load permutation matrix constant");
-          success = false;
-        }
+        error ("load: failed to load permutation matrix constant");
       else
         {
           Array<octave_idx_type> pvec (dim_vector (n, 1));
--- a/libinterp/octave-value/ov-str-mat.cc	Sun Dec 20 07:42:17 2015 -0800
+++ b/libinterp/octave-value/ov-str-mat.cc	Sun Dec 20 08:16:36 2015 -0800
@@ -371,10 +371,7 @@
                       skip_preceeding_newline (is);
 
                       if (! is.read (ftmp, dv.numel ()) || !is)
-                        {
-                          error ("load: failed to load string constant");
-                          success = false;
-                        }
+                        error ("load: failed to load string constant");
                       else
                         matrix = tmp;
                     }