comparison libinterp/octave-value/ov-base-diag.cc @ 21124:95f8c8cdbffe

maint: Eliminate 'bool success' variable where possible. * ov-base-diag.cc (load_ascii): Remove success var, return true. * ov-base-int.cc (load_ascii): Remove success var, return true. * ov-base-sparse.cc (load_ascii): Remove success var, return true. * ov-bool-mat.cc (load_ascii): Remove success var, return true. * ov-cx-mat.cc (load_ascii): Remove success var, return true. * ov-fcn-handle.cc (set_fcn): Remove success var, return true. * ov-flt-cx-mat.cc (load_ascii): Remove success var, return true. * ov-flt-re-mat.cc (load_ascii): Remove success var, return true. * ov-perm.cc (load_ascii): Remove success var, return true. * ov-re-mat.cc (load_ascii): Remove success var, return true. * ov-str-mat.cc (load_ascii): Remove success var, return true. * ov-struct.cc (load_ascii): Remove success var, return true.
author Rik <rik@octave.org>
date Wed, 20 Jan 2016 21:54:36 -0800
parents 3ac9f47fb04b
children 538b57866b90
comparison
equal deleted inserted replaced
21123:71408ab5071e 21124:95f8c8cdbffe
488 bool 488 bool
489 octave_base_diag<DMT, MT>::load_ascii (std::istream& is) 489 octave_base_diag<DMT, MT>::load_ascii (std::istream& is)
490 { 490 {
491 octave_idx_type r = 0; 491 octave_idx_type r = 0;
492 octave_idx_type c = 0; 492 octave_idx_type c = 0;
493 bool success = true;
494 493
495 if (! extract_keyword (is, "rows", r, true) 494 if (! extract_keyword (is, "rows", r, true)
496 || ! extract_keyword (is, "columns", c, true)) 495 || ! extract_keyword (is, "columns", c, true))
497 error ("load: failed to extract number of rows and columns"); 496 error ("load: failed to extract number of rows and columns");
498 497
511 matrix.resize (r, c); 510 matrix.resize (r, c);
512 511
513 // Invalidate cache. Probably not necessary, but safe. 512 // Invalidate cache. Probably not necessary, but safe.
514 dense_cache = octave_value (); 513 dense_cache = octave_value ();
515 514
516 return success; 515 return true;
517 } 516 }
518 517
519 template <class DMT, class MT> 518 template <class DMT, class MT>
520 void 519 void
521 octave_base_diag<DMT, MT>::print_raw (std::ostream& os, 520 octave_base_diag<DMT, MT>::print_raw (std::ostream& os,