Mercurial > octave-nkf
comparison libinterp/corefcn/load-save.cc @ 20478:610c74748518
maint: Clean up code based on static analysis suggestions.
* __dispatch__.cc (F__dispatch__): Eliminate unnecessary double check on
(nargin > 0).
* cellfun.cc (Fnum2cell): Eliminate duplicate else-if branch for
array.is_object().
* load-save.cc: Eliminate unreachable else branch. Simplify else-if to simple
else since condition is always true at this point.
* matrix_type.cc (Fmatrix_type): Eliminate unnecessary check on 'str_type ==
upper' and just mark matrix as permuted when permutation matrix was given as
input.
* kpse.cc (set_end): remove unused variable and its usage in conditional.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 14 Aug 2015 13:28:30 -0700 |
parents | 6bc09e953927 |
children | c6224b4e7774 |
comparison
equal
deleted
inserted
replaced
20476:b22528fd3deb | 20478:610c74748518 |
---|---|
398 break; | 398 break; |
399 } | 399 } |
400 | 400 |
401 if (error_state || stream.eof () || name.empty ()) | 401 if (error_state || stream.eof () || name.empty ()) |
402 break; | 402 break; |
403 else if (! error_state && ! name.empty ()) | 403 else |
404 { | 404 { |
405 if (tc.is_defined ()) | 405 if (tc.is_defined ()) |
406 { | 406 { |
407 if (format == LS_MAT_ASCII && argv_idx < argc) | 407 if (format == LS_MAT_ASCII && argv_idx < argc) |
408 warning ("load: loaded ASCII file '%s' -- ignoring extra args", | 408 warning ("load: loaded ASCII file '%s' -- ignoring extra args", |
453 break; | 453 break; |
454 } | 454 } |
455 else | 455 else |
456 error ("load: unable to load variable '%s'", name.c_str ()); | 456 error ("load: unable to load variable '%s'", name.c_str ()); |
457 } | 457 } |
458 else | |
459 { | |
460 if (count == 0) | |
461 error ("load: are you sure '%s' is an Octave data file?", | |
462 orig_fname.c_str ()); | |
463 | |
464 break; | |
465 } | |
466 } | 458 } |
467 | 459 |
468 if (list_only && count) | 460 if (list_only && count) |
469 { | 461 { |
470 if (verbose) | 462 if (verbose) |