Browse Source

fix compiler warning ( signed against unsigned ).

Signed-off-by: Kim Kulling <[email protected]>
Kim Kulling 10 years ago
parent
commit
ca4385fcf2
1 changed files with 3 additions and 2 deletions
  1. 3 2
      code/PlyLoader.cpp

+ 3 - 2
code/PlyLoader.cpp

@@ -74,8 +74,9 @@ namespace
 	template <class T>
 	template <class T>
 	const T &GetProperty(const std::vector<T> &props, int idx)
 	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];
 		return props[idx];
 	}
 	}