Mercurial > hg > octave-lyh
changeset 9807:645c478aa89d
load-path.cc (load_path::do_find_all_first_of): take advantage of string_vector (std::list<std:string>) constructor
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 11 Nov 2009 15:18:28 -0500 |
parents | 8e345f2fe4d6 |
children | 873ec09e387a |
files | src/ChangeLog src/load-path.cc |
diffstat | 2 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-11-11 John W. Eaton <jwe@octave.org> + + * load-path.cc (load_path::do_find_all_first_of): Take advantage + of string_vector (std::list<std:string>) constructor. + 2009-11-11 John W. Eaton <jwe@octave.org> * help.cc (do_get_help_text_from_file, Fget_help_text_from_file):
--- a/src/load-path.cc +++ b/src/load-path.cc @@ -1349,18 +1349,7 @@ } } - size_t retsize = retlist.size (); - - string_vector retval (retsize); - - for (size_t i = 0; i < retsize; i++) - { - retval[i] = retlist.front (); - - retlist.pop_front (); - } - - return retval; + return retlist; } string_vector