comparison liboctave/CSparse.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 542015fada9e
children 5d46c4a894e8
comparison
equal deleted inserted replaced
8998:a48fba01e4ac 8999:dc07bc4157b8
7468 { 7468 {
7469 octave_idx_type nr = a.rows (); 7469 octave_idx_type nr = a.rows ();
7470 octave_idx_type nc = a.cols (); 7470 octave_idx_type nc = a.cols ();
7471 octave_idx_type nz = a.nzmax (); 7471 octave_idx_type nz = a.nzmax ();
7472 7472
7473 if (nr < 1 || nc < 1) 7473 if (nr > 0 && nc > 0)
7474 is.clear (std::ios::badbit);
7475 else
7476 { 7474 {
7477 octave_idx_type itmp, jtmp, jold = 0; 7475 octave_idx_type itmp, jtmp, jold = 0;
7478 Complex tmp; 7476 Complex tmp;
7479 octave_idx_type ii = 0; 7477 octave_idx_type ii = 0;
7480 7478