浏览代码

Fix: Fix compilation for clang 14.0.3 (#5223)

* Fix: Fix compilation for clang 14.0.3

- closes https://github.com/assimp/assimp/issues/5203

* Update mesh.h

* Update mesh.h

Fix a typo.
Kim Kulling 1 年之前
父节点
当前提交
2af4247260
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      include/assimp/mesh.h

+ 4 - 1
include/assimp/mesh.h

@@ -987,7 +987,10 @@ struct aiMesh {
 
         if (mTextureCoordsNames == nullptr) {
             // Construct and null-init array
-            mTextureCoordsNames = new aiString *[AI_MAX_NUMBER_OF_TEXTURECOORDS] {};
+            mTextureCoordsNames = new aiString *[AI_MAX_NUMBER_OF_TEXTURECOORDS];
+            for (size_t i=0; i<AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) {
+                mTextureCoordsNames[i] = nullptr;
+            }
         }
 
         if (texCoordsName.length == 0) {