[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54216] trunk/blender/source/blender: style cleanup
Campbell Barton
ideasman42 at gmail.com
Wed Jan 30 22:17:39 CET 2013
Revision: 54216
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54216
Author: campbellbarton
Date: 2013-01-30 21:17:38 +0000 (Wed, 30 Jan 2013)
Log Message:
-----------
style cleanup
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/BLI_mempool.h
trunk/blender/source/blender/bmesh/tools/bmesh_triangulate.h
trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
trunk/blender/source/blender/makesrna/intern/rna_particle.c
Modified: trunk/blender/source/blender/blenlib/BLI_mempool.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_mempool.h 2013-01-30 21:17:09 UTC (rev 54215)
+++ trunk/blender/source/blender/blenlib/BLI_mempool.h 2013-01-30 21:17:38 UTC (rev 54216)
@@ -92,6 +92,13 @@
#endif
;
+void *BLI_mempool_as_arrayN(BLI_mempool *pool, const char *allocstr)
+#ifdef __GNUC__
+__attribute__((warn_unused_result))
+__attribute__((nonnull(1, 2)))
+#endif
+;
+
/** iteration stuff. note: this may easy to produce bugs with **/
/* private structure */
typedef struct BLI_mempool_iter {
Modified: trunk/blender/source/blender/bmesh/tools/bmesh_triangulate.h
===================================================================
--- trunk/blender/source/blender/bmesh/tools/bmesh_triangulate.h 2013-01-30 21:17:09 UTC (rev 54215)
+++ trunk/blender/source/blender/bmesh/tools/bmesh_triangulate.h 2013-01-30 21:17:38 UTC (rev 54216)
@@ -20,7 +20,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/bmesh/tools/bmesh_triangulate.c
+/** \file blender/bmesh/tools/bmesh_triangulate.h
* \ingroup bmesh
*
* Triangulate.
Modified: trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp 2013-01-30 21:17:09 UTC (rev 54215)
+++ trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp 2013-01-30 21:17:38 UTC (rev 54216)
@@ -383,7 +383,7 @@
buf[x] = -MAXFLOAT;
}
for (x = xmin; x < xmax; ++x) {
- buf[x - rect->xmin + window - 1] = buffer[4*(y * width + x)];
+ buf[x - rect->xmin + window - 1] = buffer[4 * (y * width + x)];
}
for (i = 0; i < (bwidth + 3 * half_window) / window; i++) {
@@ -397,7 +397,7 @@
start = half_window + (i - 1) * window + 1;
for (x = -min(0, start); x < window - max(0, start + window - bwidth); x++) {
- rectf[bwidth * (y-ymin) + (start + x)] = max(temp[x], temp[x + window - 1]);
+ rectf[bwidth * (y - ymin) + (start + x)] = max(temp[x], temp[x + window - 1]);
}
}
}
@@ -408,7 +408,7 @@
buf[y] = -MAXFLOAT;
}
for (y = ymin; y < ymax; y++) {
- buf[y - rect->ymin + window - 1] = rectf[(y-ymin) * bwidth + x];
+ buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
}
for (i = 0; i < (bheight + 3 * half_window) / window; i++) {
@@ -422,7 +422,7 @@
start = half_window + (i - 1) * window + 1;
for (y = -min(0, start); y < window - max(0, start + window - bheight); y++) {
- rectf[bwidth * (y + start + (rect->ymin-ymin)) + x] = max(temp[y], temp[y + window - 1]);
+ rectf[bwidth * (y + start + (rect->ymin - ymin)) + x] = max(temp[y], temp[y + window - 1]);
}
}
}
@@ -510,7 +510,7 @@
buf[x] = MAXFLOAT;
}
for (x = xmin; x < xmax; ++x) {
- buf[x - rect->xmin + window - 1] = buffer[4*(y * width + x)];
+ buf[x - rect->xmin + window - 1] = buffer[4 * (y * width + x)];
}
for (i = 0; i < (bwidth + 3 * half_window) / window; i++) {
@@ -524,7 +524,7 @@
start = half_window + (i - 1) * window + 1;
for (x = -min(0, start); x < window - max(0, start + window - bwidth); x++) {
- rectf[bwidth * (y-ymin) + (start + x)] = min(temp[x], temp[x + window - 1]);
+ rectf[bwidth * (y - ymin) + (start + x)] = min(temp[x], temp[x + window - 1]);
}
}
}
@@ -535,7 +535,7 @@
buf[y] = MAXFLOAT;
}
for (y = ymin; y < ymax; y++) {
- buf[y - rect->ymin + window - 1] = rectf[(y-ymin) * bwidth + x];
+ buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
}
for (i = 0; i < (bheight + 3 * half_window) / window; i++) {
@@ -549,7 +549,7 @@
start = half_window + (i - 1) * window + 1;
for (y = -min(0, start); y < window - max(0, start + window - bheight); y++) {
- rectf[bwidth * (y + start + (rect->ymin-ymin)) + x] = min(temp[y], temp[y + window - 1]);
+ rectf[bwidth * (y + start + (rect->ymin - ymin)) + x] = min(temp[y], temp[y + window - 1]);
}
}
}
Modified: trunk/blender/source/blender/makesrna/intern/rna_particle.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_particle.c 2013-01-30 21:17:09 UTC (rev 54215)
+++ trunk/blender/source/blender/makesrna/intern/rna_particle.c 2013-01-30 21:17:38 UTC (rev 54216)
@@ -289,8 +289,8 @@
}
}
-static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object, ParticleSystemModifierData *modifier, int particle_no, int step,
- float n_co[3])
+static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object, ParticleSystemModifierData *modifier,
+ int particle_no, int step, float n_co[3])
{
ParticleSettings *part = 0;
ParticleData *pars = 0;
@@ -307,7 +307,7 @@
part = particlesystem->part;
pars = particlesystem->particles;
- if(particlesystem->renderdata) {
+ if (particlesystem->renderdata) {
step_nbr = part->ren_step;
totchild = particlesystem->totchild;
}
@@ -381,10 +381,12 @@
part = particlesystem->part;
- if(particlesystem->renderdata)
+ if (particlesystem->renderdata) {
totchild = particlesystem->totchild;
- else
+ }
+ else {
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
+ }
/* can happen for disconnected/global hair */
if (part->type == PART_HAIR && !particlesystem->childcache)
@@ -466,10 +468,11 @@
}
}
-static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier, ParticleData *particle, int particle_no, int vcol_no,
- float n_mcol[3])
+static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier,
+ ParticleData *particle, int particle_no, int vcol_no,
+ float n_mcol[3])
{
- ParticleSettings *part = 0;
+ ParticleSettings *part;
int totpart;
int totchild = 0;
int num;
@@ -481,10 +484,12 @@
part = particlesystem->part;
- if(particlesystem->renderdata)
+ if (particlesystem->renderdata) {
totchild = particlesystem->totchild;
- else
+ }
+ else {
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
+ }
/* can happen for disconnected/global hair */
if (part->type == PART_HAIR && !particlesystem->childcache)
@@ -495,7 +500,7 @@
if (particle_no >= totpart + totchild)
return;
-/* 3. start creating renderable things */
+ /* 3. start creating renderable things */
/* setup per particle individual stuff */
if (particle_no < totpart) {
More information about the Bf-blender-cvs
mailing list