diff libinterp/operators/op-cm-cm.cc @ 20833:9c4c87679985

restructure calls to error * op-bm-bm.cc, op-cell.cc, op-class.cc, op-cm-cm.cc, op-fcm-fcm.cc, op-fm-fm.cc, op-m-m.cc, op-str-str.cc, op-struct.cc: Restructure calls to error to avoid excess indentation.
author John W. Eaton <jwe@octave.org>
date Wed, 09 Dec 2015 14:32:04 -0500
parents 4197fc428c7d
children 384ff5aa9437
line wrap: on
line diff
--- a/libinterp/operators/op-cm-cm.cc	Wed Dec 09 14:18:52 2015 -0500
+++ b/libinterp/operators/op-cm-cm.cc	Wed Dec 09 14:32:04 2015 -0500
@@ -46,12 +46,9 @@
   CAST_UNOP_ARG (const octave_complex_matrix&);
 
   if (v.ndims () > 2)
-    {
-      error ("transpose not defined for N-d objects");
-      return octave_value ();
-    }
-  else
-    return octave_value (v.complex_matrix_value ().transpose ());
+    error ("transpose not defined for N-d objects");
+
+  return octave_value (v.complex_matrix_value ().transpose ());
 }
 
 DEFUNOP (hermitian, complex_matrix)
@@ -59,12 +56,9 @@
   CAST_UNOP_ARG (const octave_complex_matrix&);
 
   if (v.ndims () > 2)
-    {
-      error ("complex-conjugate transpose not defined for N-d objects");
-      return octave_value ();
-    }
-  else
-    return octave_value (v.complex_matrix_value ().hermitian ());
+    error ("complex-conjugate transpose not defined for N-d objects");
+
+  return octave_value (v.complex_matrix_value ().hermitian ());
 }
 
 DEFNCUNOP_METHOD (incr, complex_matrix, increment)