Mercurial > hg > octave-lyh
comparison liboctave/fCRowVector.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 | 3d6a9aea2aea |
comparison
equal
deleted
inserted
replaced
8998:a48fba01e4ac | 8999:dc07bc4157b8 |
---|---|
432 std::istream& | 432 std::istream& |
433 operator >> (std::istream& is, FloatComplexRowVector& a) | 433 operator >> (std::istream& is, FloatComplexRowVector& a) |
434 { | 434 { |
435 octave_idx_type len = a.length(); | 435 octave_idx_type len = a.length(); |
436 | 436 |
437 if (len < 1) | 437 if (len > 0) |
438 is.clear (std::ios::badbit); | |
439 else | |
440 { | 438 { |
441 FloatComplex tmp; | 439 FloatComplex tmp; |
442 for (octave_idx_type i = 0; i < len; i++) | 440 for (octave_idx_type i = 0; i < len; i++) |
443 { | 441 { |
444 is >> tmp; | 442 is >> tmp; |