Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/mikktspace/mikktspace.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index 479443805bf..2e8e58d37d4 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -1677,6 +1677,19 @@ static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int
}
return;
}
+ else if(iElems < 16) {
+ int i, j;
+ for (i = 0; i < iElems - 1; i++) {
+ for (j = 0; j < iElems - i - 1; j++) {
+ int index = iLeft + j;
+ if (pSortBuffer[index].array[channel] > pSortBuffer[index + 1].array[channel]) {
+ sTmp = pSortBuffer[index];
+ pSortBuffer[index] = pSortBuffer[index];
+ pSortBuffer[index + 1] = sTmp;
+ }
+ }
+ }
+ }
// Random
t=uSeed&31;