diff liboctave/dMatrix.cc @ 8999:dc07bc4157b8

allow empty matrices in stream input operators
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 20 Mar 2009 11:39:25 +0100
parents d91fa4b20bbb
children 8145f2255276
line wrap: on
line diff
--- a/liboctave/dMatrix.cc
+++ b/liboctave/dMatrix.cc
@@ -3058,9 +3058,7 @@
   octave_idx_type nr = a.rows ();
   octave_idx_type nc = a.cols ();
 
-  if (nr < 1 || nc < 1)
-    is.clear (std::ios::badbit);
-  else
+  if (nr > 0 && nc > 0)
     {
       double tmp;
       for (octave_idx_type i = 0; i < nr; i++)