浏览代码

COMP: Remove compile warning

Andy Cedilnik 21 年之前
父节点
当前提交
95f67dca9e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/kwsys/SystemTools.cxx

+ 1 - 1
Source/kwsys/SystemTools.cxx

@@ -2079,7 +2079,7 @@ kwsys_stl::string SystemTools::FileExistsInParentDirectories(const char* fname,
   SystemTools::ConvertToUnixSlashes(file);
   kwsys_stl::string dir = directory;
   SystemTools::ConvertToUnixSlashes(dir);
-  while ( 1 )
+  while ( !dir.empty() )
     {
     kwsys_stl::string path = dir + "/" + file;
     if ( SystemTools::FileExists(path.c_str()) )