[Bf-blender-cvs] [1080a7d] master: Cleanup: style

Campbell Barton noreply at git.blender.org
Tue Aug 25 01:08:06 CEST 2015


Commit: 1080a7d5e132c162c80f3fc461885b483f8ac722
Author: Campbell Barton
Date:   Tue Aug 25 08:50:53 2015 +1000
Branches: master
https://developer.blender.org/rB1080a7d5e132c162c80f3fc461885b483f8ac722

Cleanup: style

===================================================================

M	source/blender/blenkernel/intern/DerivedMesh.c
M	source/blender/blenkernel/intern/colortools.c
M	source/blender/blenlib/BLI_mempool.h
M	source/blender/blenlib/intern/math_statistics.c
M	source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
M	source/blender/compositor/operations/COM_MixOperation.cpp
M	source/blender/makesrna/intern/rna_mesh_utils.h
M	source/blender/python/mathutils/mathutils.h

===================================================================

diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index c11d8c3..6249e10 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -3331,7 +3331,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
 			a = attribs->tottface++;
 
 			if (layer != -1) {
-				attribs->tface[a].array = is_editmesh ? NULL: ldata->layers[layer].data;
+				attribs->tface[a].array = is_editmesh ? NULL : ldata->layers[layer].data;
 				attribs->tface[a].em_offset = ldata->layers[layer].offset;
 			}
 			else {
@@ -3351,7 +3351,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
 			a = attribs->totmcol++;
 
 			if (layer != -1) {
-				attribs->mcol[a].array = is_editmesh ? NULL: ldata->layers[layer].data;
+				attribs->mcol[a].array = is_editmesh ? NULL : ldata->layers[layer].data;
 				/* odd, store the offset for a different layer type here, but editmode draw code expects it */
 				attribs->mcol[a].em_offset = ldata->layers[layer].offset;
 			}
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 3c70bd4..aad6681 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -1126,7 +1126,7 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings *
 	}
 
 	/* Keep number of threads in sync with the merge parts below. */
-#pragma omp parallel for private(y) schedule(static) num_threads(num_threads) if(ibuf->y > 256)
+#pragma omp parallel for private(y) schedule(static) num_threads(num_threads) if (ibuf->y > 256)
 	for (y = 0; y < ibuf->y; y++) {
 #ifdef _OPENMP
 		const int thread_idx = omp_get_thread_num();
diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h
index 37d1fb4..0c754f5 100644
--- a/source/blender/blenlib/BLI_mempool.h
+++ b/source/blender/blenlib/BLI_mempool.h
@@ -78,8 +78,8 @@ enum {
 	BLI_MEMPOOL_NOP = 0,
 	/** allow iterating on this mempool.
 	 *
-	 * \note this requires that the first four bytes of the elements never begin with 'free'
- 	 * \note order of iteration is only assured to be the order of allocation when no chunks have been freed.
+	 * \note this requires that the first four bytes of the elements never begin with 'free' (FREEWORD).
+	 * \note order of iteration is only assured to be the order of allocation when no chunks have been freed.
 	 */
 	BLI_MEMPOOL_ALLOW_ITER = (1 << 0),
 };
diff --git a/source/blender/blenlib/intern/math_statistics.c b/source/blender/blenlib/intern/math_statistics.c
index f7a6bc4..3f1bae5 100644
--- a/source/blender/blenlib/intern/math_statistics.c
+++ b/source/blender/blenlib/intern/math_statistics.c
@@ -60,7 +60,7 @@ void BLI_covariance_m_vn_ex(
 
 	memset(r_covmat, 0, sizeof(*r_covmat) * (size_t)(n * n));
 
-#pragma omp parallel for default(shared) private(i, j, k) schedule(static) if((nbr_cos_vn * n) >= 10000)
+#pragma omp parallel for default(shared) private(i, j, k) schedule(static) if ((nbr_cos_vn * n) >= 10000)
 	for (i = 0; i < n; i++) {
 		for (j = i; j < n; j++) {
 			r_covmat[i * n + j] = 0.0f;
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
index 732e731..14881eb 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
@@ -60,7 +60,7 @@ void DirectionalBlurOperation::initExecution()
 	this->m_center_y_pix = center_y * height;
 
 	this->m_tx  =  itsc * D * cosf(a);
-	this->m_ty  = -itsc *D *sinf(a);
+	this->m_ty  = -itsc * D * sinf(a);
 	this->m_sc  =  itsc * zoom;
 	this->m_rot =  itsc * spin;
 
diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp
index 0402532..d379839 100644
--- a/source/blender/compositor/operations/COM_MixOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixOperation.cpp
@@ -322,9 +322,9 @@ void MixDifferenceOperation::executePixelSampled(float output[4], float x, float
 		value *= inputColor2[3];
 	}
 	float valuem = 1.0f - value;
-	output[0] = valuem * inputColor1[0] + value *fabsf(inputColor1[0] - inputColor2[0]);
-	output[1] = valuem * inputColor1[1] + value *fabsf(inputColor1[1] - inputColor2[1]);
-	output[2] = valuem * inputColor1[2] + value *fabsf(inputColor1[2] - inputColor2[2]);
+	output[0] = valuem * inputColor1[0] + value * fabsf(inputColor1[0] - inputColor2[0]);
+	output[1] = valuem * inputColor1[1] + value * fabsf(inputColor1[1] - inputColor2[1]);
+	output[2] = valuem * inputColor1[2] + value * fabsf(inputColor1[2] - inputColor2[2]);
 	output[3] = inputColor1[3];
 
 	clampIfNeeded(output);
diff --git a/source/blender/makesrna/intern/rna_mesh_utils.h b/source/blender/makesrna/intern/rna_mesh_utils.h
index f68a48c..0f42596 100644
--- a/source/blender/makesrna/intern/rna_mesh_utils.h
+++ b/source/blender/makesrna/intern/rna_mesh_utils.h
@@ -81,7 +81,7 @@
 		CustomDataLayer *layer;                                                                 \
 		if (data) {                                                                             \
 			int index = CustomData_get_##active_type##_layer_index(data, layer_type);           \
-			layer = (index == -1) ? NULL: &data->layers[index];                                 \
+			layer = (index == -1) ? NULL : &data->layers[index];                                \
 		}                                                                                       \
 		else {                                                                                  \
 			layer = NULL;                                                                       \
diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h
index 80130e6..6ac7556 100644
--- a/source/blender/python/mathutils/mathutils.h
+++ b/source/blender/python/mathutils/mathutils.h
@@ -113,13 +113,13 @@ void _BaseMathObject_RaiseNotFrozenExc(const BaseMathObject *self);
 
 /* since this is called so often avoid where possible */
 #define BaseMath_ReadCallback(_self) \
-	(((_self)->cb_user ?	_BaseMathObject_ReadCallback((BaseMathObject *)_self):0))
+	(((_self)->cb_user ?	_BaseMathObject_ReadCallback((BaseMathObject *)_self) : 0))
 #define BaseMath_WriteCallback(_self) \
-	(((_self)->cb_user ?_BaseMathObject_WriteCallback((BaseMathObject *)_self):0))
+	(((_self)->cb_user ?_BaseMathObject_WriteCallback((BaseMathObject *)_self) : 0))
 #define BaseMath_ReadIndexCallback(_self, _index) \
-	(((_self)->cb_user ?	_BaseMathObject_ReadIndexCallback((BaseMathObject *)_self, _index):0))
+	(((_self)->cb_user ?	_BaseMathObject_ReadIndexCallback((BaseMathObject *)_self, _index) : 0))
 #define BaseMath_WriteIndexCallback(_self, _index) \
-	(((_self)->cb_user ?	_BaseMathObject_WriteIndexCallback((BaseMathObject *)_self, _index):0))
+	(((_self)->cb_user ?	_BaseMathObject_WriteIndexCallback((BaseMathObject *)_self, _index) : 0))
 
 /* support BASE_MATH_FLAG_IS_FROZEN */
 #define BaseMath_ReadCallback_ForWrite(_self) \




More information about the Bf-blender-cvs mailing list