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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_batch.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c
index 6194e720156..391a3812073 100644
--- a/source/blender/gpu/intern/gpu_batch.c
+++ b/source/blender/gpu/intern/gpu_batch.c
@@ -215,13 +215,12 @@ Gwn_Batch *GPU_batch_wire_from_poly_2d_encoded(
{
qsort(lines, lines_len, sizeof(int32_t), BLI_sortutil_cmp_int);
lines_step = lines;
-
- if (lines[0] != lines[1]) {
- *lines_step++ = lines[0];
- }
for (uint i_prev = 0, i = 1; i < lines_len; i_prev = i++) {
if (lines[i] != lines[i_prev]) {
- *lines_step++ = lines[i];
+ *lines_step++ = lines[i_prev];
+ }
+ else {
+ i++;
}
}
lines_len = lines_step - lines;