changeset 18412:f74c6aaa6d0f gui-release

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.
author Rik <rik@octave.org>
date Thu, 30 Jan 2014 08:49:42 -0800
parents 073fbe7e6a3a
children f8f37595c29f 888cd8f62c67
files liboctave/system/file-ops.cc
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }