Mercurial > hg > octave-max
comparison src/load-path.cc @ 12025:9d85d6561573 release-3-2-x
load-path.cc (Faddpath): preserve order of prepended elements
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 29 Jun 2009 14:15:59 +0200 |
parents | 2ed8d2d92507 |
children |
comparison
equal
deleted
inserted
replaced
12024:6d6e703f467c | 12025:9d85d6561573 |
---|---|
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; |