Mercurial > hg > octave-nkf
comparison src/load-path.cc @ 10446:ba932ad87a04
load_path::add_to_fcn_map: style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 24 Mar 2010 09:53:14 -0400 |
parents | db540cb0e959 |
children | 4d1fc073fbb7 |
comparison
equal
deleted
inserted
replaced
10445:62f8ae5ab2cc | 10446:ba932ad87a04 |
---|---|
1686 if (at_end) | 1686 if (at_end) |
1687 file_info_list.push_back (fi); | 1687 file_info_list.push_back (fi); |
1688 else | 1688 else |
1689 { | 1689 { |
1690 // Warn if a built-in or library function is being shadowed. | 1690 // Warn if a built-in or library function is being shadowed. |
1691 | |
1691 if (! file_info_list.empty ()) | 1692 if (! file_info_list.empty ()) |
1692 { | 1693 { |
1693 file_info& old = file_info_list.front (); | 1694 file_info& old = file_info_list.front (); |
1694 if (sys_path.find (old.dir_name) != std::string::npos) | 1695 |
1695 if (in_path_list (sys_path, old.dir_name)) | 1696 // FIXME -- do we need to be more careful about the |
1697 // way we look for old.dir_name in sys_path to avoid | |
1698 // partial matches? | |
1699 | |
1700 if (sys_path.find (old.dir_name) != std::string::npos | |
1701 && in_path_list (sys_path, old.dir_name)) | |
1696 { | 1702 { |
1697 std::string fcn_path = file_ops::concat (dir_name, fname); | 1703 std::string fcn_path = file_ops::concat (dir_name, fname); |
1704 | |
1698 warning_with_id ("Octave:shadowed-function", | 1705 warning_with_id ("Octave:shadowed-function", |
1699 "function %s shadows a core library function", | 1706 "function %s shadows a core library function", |
1700 fcn_path.c_str ()); | 1707 fcn_path.c_str ()); |
1701 } | 1708 } |
1702 } | 1709 } |