From 735515a3f9e4c41738bf714d682b13db64adb638 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Apr 2019 09:39:35 +1000 Subject: Cleanup: style, use braces for blenkernel --- .../blender/blenkernel/intern/CCGSubSurf_inline.h | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'source/blender/blenkernel/intern/CCGSubSurf_inline.h') diff --git a/source/blender/blenkernel/intern/CCGSubSurf_inline.h b/source/blender/blenkernel/intern/CCGSubSurf_inline.h index 44e27cb89da..86012bd2a43 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_inline.h +++ b/source/blender/blenkernel/intern/CCGSubSurf_inline.h @@ -144,18 +144,22 @@ BLI_INLINE float *ccg_face_getIFNo( BLI_INLINE int ccg_face_getVertIndex(CCGFace *f, CCGVert *v) { int i; - for (i = 0; i < f->numVerts; i++) - if (FACE_getVerts(f)[i] == v) + for (i = 0; i < f->numVerts; i++) { + if (FACE_getVerts(f)[i] == v) { return i; + } + } return -1; } BLI_INLINE int ccg_face_getEdgeIndex(CCGFace *f, CCGEdge *e) { int i; - for (i = 0; i < f->numVerts; i++) - if (FACE_getEdges(f)[i] == e) + for (i = 0; i < f->numVerts; i++) { + if (FACE_getEdges(f)[i] == e) { return i; + } + } return -1; } @@ -214,8 +218,9 @@ BLI_INLINE int VertDataEqual(const float a[], const float b[], const CCGSubSurf { int i; for (i = 0; i < ss->meshIFC.numLayers; i++) { - if (a[i] != b[i]) + if (a[i] != b[i]) { return 0; + } } return 1; } @@ -228,29 +233,33 @@ BLI_INLINE void VertDataZero(float v[], const CCGSubSurf *ss) BLI_INLINE void VertDataCopy(float dst[], const float src[], const CCGSubSurf *ss) { int i; - for (i = 0; i < ss->meshIFC.numLayers; i++) + for (i = 0; i < ss->meshIFC.numLayers; i++) { dst[i] = src[i]; + } } BLI_INLINE void VertDataAdd(float a[], const float b[], const CCGSubSurf *ss) { int i; - for (i = 0; i < ss->meshIFC.numLayers; i++) + for (i = 0; i < ss->meshIFC.numLayers; i++) { a[i] += b[i]; + } } BLI_INLINE void VertDataSub(float a[], const float b[], const CCGSubSurf *ss) { int i; - for (i = 0; i < ss->meshIFC.numLayers; i++) + for (i = 0; i < ss->meshIFC.numLayers; i++) { a[i] -= b[i]; + } } BLI_INLINE void VertDataMulN(float v[], float f, const CCGSubSurf *ss) { int i; - for (i = 0; i < ss->meshIFC.numLayers; i++) + for (i = 0; i < ss->meshIFC.numLayers; i++) { v[i] *= f; + } } BLI_INLINE void VertDataAvg4(float v[], @@ -261,8 +270,9 @@ BLI_INLINE void VertDataAvg4(float v[], const CCGSubSurf *ss) { int i; - for (i = 0; i < ss->meshIFC.numLayers; i++) + for (i = 0; i < ss->meshIFC.numLayers; i++) { v[i] = (a[i] + b[i] + c[i] + d[i]) * 0.25f; + } } #endif /* __CCGSUBSURF_INLINE_H__ */ -- cgit v1.2.3