浏览代码

Use size_t

Kim Kulling 3 年之前
父节点
当前提交
234e55fbb1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      code/Common/FileSystemFilter.h

+ 2 - 2
code/Common/FileSystemFilter.h

@@ -300,10 +300,10 @@ private:
 
         const char separator = getOsSeparator();
         for (it = in.begin(); it != in.end(); ++it) {
-            int remaining = (int)std::distance(in.end(), it);
+            const size_t remaining = std::distance(in.end(), it);
             // Exclude :// and \\, which remain untouched.
             // https://sourceforge.net/tracker/?func=detail&aid=3031725&group_id=226462&atid=1067632
-            if (remaining >= 3 && !strncmp(&*it, "://", 3 )) {
+            if (remaining >= 3u && !strncmp(&*it, "://", 3 )) {
                 it += 3;
                 continue;
             }