From a9933d8c31e7a01ee776941e2f237496d466143e Mon Sep 17 00:00:00 2001 From: Amorilia <amorilia@users.sourceforge.net> Date: Sat, 24 Sep 2011 09:17:52 +0100 Subject: [PATCH] Another small simplification in match algorithm. --- src/obj/NiTriShapeData.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/obj/NiTriShapeData.cpp b/src/obj/NiTriShapeData.cpp index 6505f481..ec200bad 100644 --- a/src/obj/NiTriShapeData.cpp +++ b/src/obj/NiTriShapeData.cpp @@ -204,11 +204,11 @@ void NiTriShapeData::DoMatchDetection() { /* minimum number of groups of shared normals */ matchGroups.resize( 0 ); /* counting sharing */ - vector<unsigned short> sharing( vertices.size(), 0 ); + vector<bool> is_shared( vertices.size(), false ); for ( unsigned short i = 0; i < vertices.size() - 1; ++i ) { /* this index belongs to a group already */ - if ( sharing [i] != 0 ) + if ( is_shared[i] ) continue; /* we may find a valid group for this vertex */ @@ -235,7 +235,7 @@ void NiTriShapeData::DoMatchDetection() { /* mark all of the participating vertices to belong to a group */ unsigned short groupid = matchGroups.size() + 1; for ( unsigned short n = 0; n < group.numVertices; n++ ) - sharing[group.vertexIndices[n]] = groupid; + is_shared[group.vertexIndices[n]] = true; /* register the group */ matchGroups.push_back(group); -- GitLab