# HG changeset patch # User John W. Eaton # Date 1257970708 18000 # Node ID 645c478aa89d38a78fb95ae3b3287378de97f3d4 # Parent 8e345f2fe4d60cc48355d130d14a18292f8f0126 load-path.cc (load_path::do_find_all_first_of): take advantage of string_vector (std::list) constructor diff -r 8e345f2fe4d6 -r 645c478aa89d src/ChangeLog --- a/src/ChangeLog Wed Nov 11 15:11:14 2009 -0500 +++ b/src/ChangeLog Wed Nov 11 15:18:28 2009 -0500 @@ -1,3 +1,8 @@ +2009-11-11 John W. Eaton + + * load-path.cc (load_path::do_find_all_first_of): Take advantage + of string_vector (std::list) constructor. + 2009-11-11 John W. Eaton * help.cc (do_get_help_text_from_file, Fget_help_text_from_file): diff -r 8e345f2fe4d6 -r 645c478aa89d src/load-path.cc --- a/src/load-path.cc Wed Nov 11 15:11:14 2009 -0500 +++ b/src/load-path.cc Wed Nov 11 15:18:28 2009 -0500 @@ -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