changeset 12439:b03fe57893ae release-3-4-x

use correct type for std::string length
author John W. Eaton <jwe@octave.org>
date Fri, 11 Feb 2011 14:27:26 -0500
parents 36ebbc3e82aa
children bb29b58e650c
files src/ChangeLog src/load-path.cc
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-11  John W. Eaton  <jwe@octave.org>
+
+	* load-path.cc (strip_trailing_separators): Declare K as size_t
+	rather than octave_idx_type.
+
 2011-02-10  John W. Eaton  <jwe@octave.org>
 
 	* DLD-FUNCTIONS/regexp.cc (octregexp_list): Avoid deprecated
--- a/src/load-path.cc
+++ b/src/load-path.cc
@@ -613,7 +613,8 @@
 {
   std::string dir = dir_arg;
 
-  octave_idx_type k = dir.length ();
+  size_t k = dir.length ();
+
   while (k > 1 && file_ops::is_dir_sep (dir[k-1]))
     k--;