Mercurial > hg > octave-lyh
changeset 6379:41c1deed5613
[project @ 2007-03-02 18:43:20 by jwe]
author | jwe |
---|---|
date | Fri, 02 Mar 2007 18:43:21 +0000 |
parents | 625b31d2c67d |
children | ac3d67504f85 |
files | liboctave/ChangeLog liboctave/str-vec.h src/ChangeLog src/parse.y src/utils.cc |
diffstat | 5 files changed, 21 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2007-03-02 John W. Eaton <jwe@octave.org> + + * str-vec.h (string_vector::empty): Return bool, not int. + 2007-03-01 David Bateman <dbateman@free.fr> * md5.h, md5.c: New files from libmd5-rfc sourceforge project for
--- a/liboctave/str-vec.h +++ b/liboctave/str-vec.h @@ -62,7 +62,7 @@ ~string_vector (void) { } - int empty (void) const { return length () == 0; } + bool empty (void) const { return length () == 0; } octave_idx_type max_length (void) const {
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2007-03-02 John W. Eaton <jwe@octave.org> + + * parse.y (Fautoload): Undo previous change. + + * utils.cc (make_absolute): Make copy of arg before + 2007-03-01 John W. Eaton <jwe@octave.org> * ov-base-mat.h (octave_base_matrix::octave_base_matrix (const MT&),
--- a/src/parse.y +++ b/src/parse.y @@ -3541,13 +3541,7 @@ string_vector argv = args.make_argv ("autoload"); if (! error_state) - { - if (autoload_map.find (argv[1]) != autoload_map.end ()) - warning ("autoload: not replacing existing entry for %s => %s", - argv[1].c_str (), argv[2].c_str ()); - else - autoload_map[argv[1]] = argv[2]; - } + autoload_map[argv[1]] = argv[2]; } else print_usage ();
--- a/src/utils.cc +++ b/src/utils.cc @@ -259,9 +259,9 @@ string_vector sv = p.find_all_first_of (names); - int len = sv.length (); + octave_idx_type len = sv.length (); - for (int i = 0; i < len; i++) + for (octave_idx_type i = 0; i < len; i++) sv[i] = octave_env::make_absolute (sv[i], octave_env::getcwd ()); return sv; @@ -270,12 +270,14 @@ static string_vector make_absolute (const string_vector& sv) { - int len = sv.length (); + octave_idx_type len = sv.length (); + + string_vector retval (len); - for (int i = 0; i < len; i++) - sv[i] = octave_env::make_absolute (sv[i], octave_env::getcwd ()); - - return sv; + for (octave_idx_type i = 0; i < len; i++) + retval[i] = octave_env::make_absolute (sv[i], octave_env::getcwd ()); + + return retval; } DEFUN (file_in_loadpath, args, ,