From 35cf545e3a9018650f7b529aececb88072974083 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 26 Nov 2015 18:04:41 +1100 Subject: Fix recent c99 cleanup w/ openmp --- source/blender/blenkernel/intern/pbvh.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index ab377416995..b3cb8fbf3f6 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -954,8 +954,9 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes, * can only update vertices marked with ME_VERT_PBVH_UPDATE. */ + int n; #pragma omp parallel for private(n) schedule(static) if (totnode > PBVH_OMP_LIMIT) - for (int n = 0; n < totnode; n++) { + for (n = 0; n < totnode; n++) { PBVHNode *node = nodes[n]; if ((node->flag & PBVH_UpdateNormals)) { @@ -1004,7 +1005,7 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes, } #pragma omp parallel for private(n) schedule(static) if (totnode > PBVH_OMP_LIMIT) - for (int n = 0; n < totnode; n++) { + for (n = 0; n < totnode; n++) { PBVHNode *node = nodes[n]; if (node->flag & PBVH_UpdateNormals) { @@ -1036,8 +1037,9 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes, void pbvh_update_BB_redraw(PBVH *bvh, PBVHNode **nodes, int totnode, int flag) { /* update BB, redraw flag */ + int n; #pragma omp parallel for private(n) schedule(static) if (totnode > PBVH_OMP_LIMIT) - for (int n = 0; n < totnode; n++) { + for (n = 0; n < totnode; n++) { PBVHNode *node = nodes[n]; if ((flag & PBVH_UpdateBB) && (node->flag & PBVH_UpdateBB)) -- cgit v1.2.3