Mercurial > octave-nkf
comparison liboctave/fCColVector.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 |
---|---|
522 std::istream& | 522 std::istream& |
523 operator >> (std::istream& is, FloatComplexColumnVector& a) | 523 operator >> (std::istream& is, FloatComplexColumnVector& a) |
524 { | 524 { |
525 octave_idx_type len = a.length(); | 525 octave_idx_type len = a.length(); |
526 | 526 |
527 if (len < 1) | 527 if (len > 0) |
528 is.clear (std::ios::badbit); | |
529 else | |
530 { | 528 { |
531 float tmp; | 529 float tmp; |
532 for (octave_idx_type i = 0; i < len; i++) | 530 for (octave_idx_type i = 0; i < len; i++) |
533 { | 531 { |
534 is >> tmp; | 532 is >> tmp; |