comparison src/load-path.cc @ 9401:6c421f2355b5

load-path.cc (Faddpath): preserve order of prepended elements
author John W. Eaton <jwe@octave.org>
date Fri, 26 Jun 2009 09:15:31 -0400
parents 610bf90fce2a
children 0c7d84a65386
comparison
equal deleted inserted replaced
9400:df1ea906c1c4 9401:6c421f2355b5
2022 2022
2023 if (! error_state) 2023 if (! error_state)
2024 { 2024 {
2025 std::list<std::string> dir_elts = split_path (arg); 2025 std::list<std::string> dir_elts = split_path (arg);
2026 2026
2027 if (! append)
2028 std::reverse (dir_elts.begin (), dir_elts.end ());
2029
2027 for (std::list<std::string>::const_iterator p = dir_elts.begin (); 2030 for (std::list<std::string>::const_iterator p = dir_elts.begin ();
2028 p != dir_elts.end (); 2031 p != dir_elts.end ();
2029 p++) 2032 p++)
2030 { 2033 {
2031 std::string dir = *p; 2034 std::string dir = *p;