diff --git a/code/PlyLoader.cpp b/code/PlyLoader.cpp index deb7da094..f1864b0f6 100644 --- a/code/PlyLoader.cpp +++ b/code/PlyLoader.cpp @@ -74,8 +74,9 @@ namespace template const T &GetProperty(const std::vector &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]; }