浏览代码

Fix sign comparison error in lightmap_raycaster.cpp

Compiling with latest clang on macOS produces this error:

comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]

This file is not present in 4.0/master.
Andy Maloney 4 年之前
父节点
当前提交
95cc19d320
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/raycast/lightmap_raycaster.cpp

+ 1 - 1
modules/raycast/lightmap_raycaster.cpp

@@ -144,7 +144,7 @@ void LightmapRaycasterEmbree::add_mesh(const Vector<Vector3> &p_vertices, const
 		embree_normals = (Vec3fa *)rtcSetNewGeometryBuffer(embree_mesh, RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE, 1, RTC_FORMAT_FLOAT3, sizeof(Vec3fa), vertex_count);
 		embree_normals = (Vec3fa *)rtcSetNewGeometryBuffer(embree_mesh, RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE, 1, RTC_FORMAT_FLOAT3, sizeof(Vec3fa), vertex_count);
 	}
 	}
 
 
-	for (uint32_t i = 0; i < vertex_count; i++) {
+	for (int i = 0; i < vertex_count; i++) {
 		embree_vertices[i] = Vec3fa(p_vertices[i].x, p_vertices[i].y, p_vertices[i].z);
 		embree_vertices[i] = Vec3fa(p_vertices[i].x, p_vertices[i].y, p_vertices[i].z);
 		embree_light_uvs[i] = Vec2fa(p_uv2s[i].x, p_uv2s[i].y);
 		embree_light_uvs[i] = Vec2fa(p_uv2s[i].x, p_uv2s[i].y);
 		if (embree_normals != nullptr) {
 		if (embree_normals != nullptr) {