summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurélien Brooke <aurelien@bahiasoft.fr>2022-12-20 21:47:00 +0100
committerAurélien Brooke <aurelien@bahiasoft.fr>2022-12-21 17:31:37 +0100
commit0c692e4af36a9ad86c9da31ae8e83495ff086668 (patch)
tree3f20852c2312ece6fba452566a6f669e3a1837d8 /src
parent5dd5a6b4b8b586015880705e1b638ba745db7865 (diff)
downloadqt3d-0c692e4af36a9ad86c9da31ae8e83495ff086668.tar.gz
Assimp importer: ensure loop variable has enough width
loop variable has narrower type 'ushort' (aka 'unsigned short') than iteration's upper bound 'unsigned int' [bugprone-too-small-loop- variable] Change-Id: Id6ab16316f9eb40e47d8494bf70621792284a7b4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/sceneparsers/assimp/assimpimporter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/sceneparsers/assimp/assimpimporter.cpp b/src/plugins/sceneparsers/assimp/assimpimporter.cpp
index 3af127273..91763d156 100644
--- a/src/plugins/sceneparsers/assimp/assimpimporter.cpp
+++ b/src/plugins/sceneparsers/assimp/assimpimporter.cpp
@@ -786,7 +786,7 @@ QGeometryRenderer *AssimpImporter::loadMesh(uint meshIndex)
for (uint i = 0; i < mesh->mNumFaces; i++) {
aiFace face = mesh->mFaces[i];
Q_ASSERT(face.mNumIndices == 3);
- for (ushort j = 0; j < face.mNumIndices; j++)
+ for (uint j = 0; j < face.mNumIndices; j++)
reinterpret_cast<quint16*>(ibufferContent.data())[i * 3 + j] = face.mIndices[j];
}
}