# HG changeset patch # User Rik # Date 1391100582 28800 # Node ID f74c6aaa6d0f968fe113a56236c78e8ae7f32937 # Parent 073fbe7e6a3a75852686026ea0de904182c84a99 Use size_t instead of int in cset 073fbe7e6a3a. * file-ops.cc (native_separator_path): Return type of length() on C++ string is size_t, rather than int. diff -r 073fbe7e6a3a -r f74c6aaa6d0f liboctave/system/file-ops.cc --- a/liboctave/system/file-ops.cc Wed Jan 29 19:25:13 2014 -0500 +++ b/liboctave/system/file-ops.cc Thu Jan 30 08:49:42 2014 -0800 @@ -363,22 +363,24 @@ } std::string -file_ops::native_separator_path(const std::string& path) +file_ops::native_separator_path (const std::string& path) { std::string retval; - if (dir_sep_char() == '/') + + if (dir_sep_char () == '/') retval = path; else { - int n = path.length (); - for (int i = 0; i < n; i++) + size_t n = path.length (); + for (size_t i = 0; i < n; i++) { - if (path[i] == '/') + if (path[i] == '/') retval += dir_sep_char(); else retval += path[i]; } } + return retval; }