Mercurial > jwe > octave
changeset 24115:8e3aeaf49551
maint: delete unused static function
* help.cc (file_is_in_dir): Delete static function that has been unused since
Octave 3.2.0. Silences clang compiler warning -Wunused-function.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 28 Sep 2017 15:51:20 -0700 |
parents | 90932304969a |
children | e1020353fff5 |
files | libinterp/corefcn/help.cc |
diffstat | 1 files changed, 0 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/help.cc Thu Sep 28 15:49:36 2017 -0700 +++ b/libinterp/corefcn/help.cc Thu Sep 28 15:51:20 2017 -0700 @@ -150,28 +150,6 @@ return (p2 != std::string::npos); } -// FIXME: Are we sure this function always does the right thing? -static inline bool -file_is_in_dir (const std::string filename, const std::string dir) -{ - if (filename.find (dir) == 0) - { - const int dir_len = dir.size (); - const int filename_len = filename.size (); - const int max_allowed_seps = - (octave::sys::file_ops::is_dir_sep (dir[dir_len-1]) ? 0 : 1); - - int num_seps = 0; - for (int i = dir_len; i < filename_len; i++) - if (octave::sys::file_ops::is_dir_sep (filename[i])) - num_seps++; - - return (num_seps <= max_allowed_seps); - } - else - return false; -} - namespace octave { octave_value