浏览代码

fix compiler warning ( signed against unsigned ).

Signed-off-by: Kim Kulling <[email protected]>
Kim Kulling 10 年之前
父节点
当前提交
ca4385fcf2
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      code/PlyLoader.cpp

+ 3 - 2
code/PlyLoader.cpp

@@ -74,8 +74,9 @@ namespace
 	template <class T>
 	const T &GetProperty(const std::vector<T> &props, int idx)
 	{
-		if (idx >= props.size())
-			throw DeadlyImportError("Invalid .ply file: Property index is out of range.");
+        if( static_cast< size_t >( idx ) >= props.size() ) {
+            throw DeadlyImportError( "Invalid .ply file: Property index is out of range." );
+        }
 
 		return props[idx];
 	}