Mercurial > octave-nkf
comparison src/ov-cx-mat.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 | a48fba01e4ac |
children | f80c566bc751 |
comparison
equal
deleted
inserted
replaced
8998:a48fba01e4ac | 8999:dc07bc4157b8 |
---|---|
351 | 351 |
352 if (is) | 352 if (is) |
353 { | 353 { |
354 ComplexNDArray tmp(dv); | 354 ComplexNDArray tmp(dv); |
355 | 355 |
356 if (tmp.is_empty ()) | 356 is >> tmp; |
357 matrix = tmp; | 357 |
358 else | 358 if (is) |
359 { | 359 matrix = tmp; |
360 is >> tmp; | 360 else |
361 | 361 { |
362 if (is) | 362 error ("load: failed to load matrix constant"); |
363 matrix = tmp; | 363 success = false; |
364 else | 364 } |
365 { | |
366 error ("load: failed to load matrix constant"); | |
367 success = false; | |
368 } | |
369 } | |
370 } | 365 } |
371 else | 366 else |
372 { | 367 { |
373 error ("load: failed to read dimensions"); | 368 error ("load: failed to read dimensions"); |
374 success = false; | 369 success = false; |