comparison liboctave/boolSparse.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 eb63fbe60fab
children c6edba80dfae
comparison
equal deleted inserted replaced
8998:a48fba01e4ac 8999:dc07bc4157b8
182 { 182 {
183 octave_idx_type nr = a.rows (); 183 octave_idx_type nr = a.rows ();
184 octave_idx_type nc = a.cols (); 184 octave_idx_type nc = a.cols ();
185 octave_idx_type nz = a.nzmax (); 185 octave_idx_type nz = a.nzmax ();
186 186
187 if (nr < 1 || nc < 1) 187 if (nr > 0 && nc > 0)
188 is.clear (std::ios::badbit);
189 else
190 { 188 {
191 octave_idx_type itmp, jtmp, jold = 0; 189 octave_idx_type itmp, jtmp, jold = 0;
192 bool tmp; 190 bool tmp;
193 octave_idx_type ii = 0; 191 octave_idx_type ii = 0;
194 192