[Bf-blender-cvs] [6d78936] master: cleanup: style
Campbell Barton
noreply at git.blender.org
Fri Jan 23 15:59:46 CET 2015
Commit: 6d78936c43741b74f1226af9c096d7253f8fb266
Author: Campbell Barton
Date: Sat Jan 24 01:59:09 2015 +1100
Branches: master
https://developer.blender.org/rB6d78936c43741b74f1226af9c096d7253f8fb266
cleanup: style
===================================================================
M source/blender/blenkernel/intern/effect.c
M source/blender/blenkernel/intern/tracking_auto.c
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/versioning_270.c
M source/blender/collada/EffectExporter.cpp
M source/blender/collada/MeshImporter.cpp
M source/blender/compositor/intern/COM_MemoryBuffer.cpp
M source/blender/compositor/intern/COM_MemoryBuffer.h
M source/blender/compositor/intern/COM_OpenCLDevice.cpp
M source/blender/compositor/intern/COM_OpenCLDevice.h
M source/blender/compositor/operations/COM_DilateErodeOperation.cpp
M source/blender/compositor/operations/COM_InpaintOperation.cpp
M source/blender/compositor/operations/COM_ReadBufferOperation.cpp
M source/blender/compositor/operations/COM_RenderLayersProg.cpp
M source/blender/editors/armature/armature_relations.c
M source/blender/gpu/intern/gpu_select.c
M source/blender/render/intern/source/render_result.c
===================================================================
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 9c3e78d..1aaacda 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -1175,7 +1175,7 @@ void BKE_sim_debug_data_clear_category(const char *category)
if (_sim_debug_data->gh) {
GHashIterator iter;
BLI_ghashIterator_init(&iter, _sim_debug_data->gh);
- while(!BLI_ghashIterator_done(&iter)) {
+ while (!BLI_ghashIterator_done(&iter)) {
SimDebugElement *elem = BLI_ghashIterator_getValue(&iter);
BLI_ghashIterator_step(&iter); /* removing invalidates the current iterator, so step before removing */
diff --git a/source/blender/blenkernel/intern/tracking_auto.c b/source/blender/blenkernel/intern/tracking_auto.c
index 22a380e..4cb3f2c 100644
--- a/source/blender/blenkernel/intern/tracking_auto.c
+++ b/source/blender/blenkernel/intern/tracking_auto.c
@@ -373,7 +373,7 @@ bool BKE_autotrack_context_step(AutoTrackContext *context)
bool ok = false;
int track;
-#pragma omp parallel for if(context->num_tracks > 1)
+#pragma omp parallel for if (context->num_tracks > 1)
for (track = 0; track < context->num_tracks; ++track) {
AutoTrackOptions *options = &context->options[track];
libmv_Marker libmv_current_marker,
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 8d41682..5893c22 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4549,7 +4549,7 @@ static void lib_link_object(FileData *fd, Main *main)
steeringa->target = newlibadr(fd, ob->id.lib, steeringa->target);
steeringa->navmesh = newlibadr(fd, ob->id.lib, steeringa->navmesh);
}
- else if(act->type == ACT_MOUSE) {
+ else if (act->type == ACT_MOUSE) {
/* bMouseActuator *moa= act->data; */
}
}
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index c652f56..652a452 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -479,11 +479,11 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
for (ob = main->object.first; ob; ob = ob->id.next) {
for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_Cloth) {
- ClothModifierData *clmd = (ClothModifierData*) md;
+ ClothModifierData *clmd = (ClothModifierData *)md;
clmd->sim_parms->bending_damping = 0.5f;
}
else if (md->type == eModifierType_ParticleSystem) {
- ParticleSystemModifierData *pmd = (ParticleSystemModifierData*) md;
+ ParticleSystemModifierData *pmd = (ParticleSystemModifierData *)md;
if (pmd->psys->clmd) {
pmd->psys->clmd->sim_parms->bending_damping = 0.5f;
}
diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp
index 3c35618..1f0e00b 100644
--- a/source/blender/collada/EffectExporter.cpp
+++ b/source/blender/collada/EffectExporter.cpp
@@ -387,7 +387,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
std::set<Image *>::iterator uv_t_iter;
int idx;
for (idx = 0, uv_t_iter = uv_textures.begin(); uv_t_iter != uv_textures.end(); uv_t_iter++, idx++ ) {
- if(active_uv_layer>-1 && idx==active_uv_layer) {
+ if (active_uv_layer>-1 && idx==active_uv_layer) {
Image *ima = *uv_t_iter;
std::string key(id_name(ima));
key = translate_id(key);
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index a4bf1d2..571faf8 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -227,8 +227,7 @@ void MeshImporter::set_vcol(MLoopCol *mlc, VCOLDataWrapper &vob, int loop_index,
{
COLLADAFW::UIntValuesArray& indices =index_list.getIndices();
int index;
- for(index = 0; index < count; index++,mlc++)
- {
+ for (index = 0; index < count; index++, mlc++) {
int v_index = indices[index+loop_index];
vob.get_vcol(v_index,mlc);
}
@@ -708,8 +707,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
mpoly->flag |= ME_SMOOTH;
}
- for(unsigned int vcolor_index = 0 ; vcolor_index < index_list_array_vcolor.getCount();vcolor_index++)
- {
+ for (unsigned int vcolor_index = 0 ; vcolor_index < index_list_array_vcolor.getCount();vcolor_index++) {
COLLADAFW::IndexList& index_list = *index_list_array_vcolor[vcolor_index];
COLLADAFW::String colname = extract_vcolname(index_list.getName());
MLoopCol *mloopcol = (MLoopCol *)CustomData_get_layer_named(&me->ldata, CD_MLOOPCOL, colname.c_str());
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index 5876796..37035c5 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -27,15 +27,16 @@
using std::min;
using std::max;
-static unsigned int determine_num_channels(DataType datatype) {
+static unsigned int determine_num_channels(DataType datatype)
+{
switch (datatype) {
- case COM_DT_VALUE:
- return COM_NUM_CHANNELS_VALUE;
- case COM_DT_VECTOR:
- return COM_NUM_CHANNELS_VECTOR;
- case COM_DT_COLOR:
- default:
- return COM_NUM_CHANNELS_COLOR;
+ case COM_DT_VALUE:
+ return COM_NUM_CHANNELS_VALUE;
+ case COM_DT_VECTOR:
+ return COM_NUM_CHANNELS_VECTOR;
+ case COM_DT_COLOR:
+ default:
+ return COM_NUM_CHANNELS_COLOR;
}
}
@@ -226,7 +227,7 @@ static void read_ewa_pixel_sampled(void *userdata, int x, int y, float result[4]
void MemoryBuffer::readEWA(float *result, const float uv[2], const float derivatives[2][2], PixelSampler sampler)
{
- BLI_assert(this->m_datatype==COM_DT_COLOR);
+ BLI_assert(this->m_datatype == COM_DT_COLOR);
ReadEWAData data;
data.buffer = this;
data.sampler = sampler;
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h
index 320de3d..e0c5421 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.h
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.h
@@ -215,7 +215,7 @@ public:
bool clip_y = (extend_y == COM_MB_CLIP && (y < m_rect.ymin || y >= m_rect.ymax));
if (clip_x || clip_y) {
/* clip result outside rect is zero */
- memset(result, 0, this->m_num_channels*sizeof(float));
+ memset(result, 0, this->m_num_channels * sizeof(float));
}
else {
int u = x;
@@ -223,7 +223,7 @@ public:
this->wrap_pixel(u, v, extend_x, extend_y);
const int offset = (this->m_width * y + x) * this->m_num_channels;
float* buffer = &this->m_buffer[offset];
- memcpy(result, buffer, sizeof(float)*this->m_num_channels);
+ memcpy(result, buffer, sizeof(float) * this->m_num_channels);
}
}
@@ -240,14 +240,14 @@ public:
BLI_assert(offset >= 0);
BLI_assert(offset < this->determineBufferSize() * this->m_num_channels);
BLI_assert(!(extend_x == COM_MB_CLIP && (u < m_rect.xmin || u >= m_rect.xmax)) &&
- !(extend_y == COM_MB_CLIP && (v < m_rect.ymin || v >= m_rect.ymax)));
+ !(extend_y == COM_MB_CLIP && (v < m_rect.ymin || v >= m_rect.ymax)));
#if 0
/* always true */
BLI_assert((int)(MEM_allocN_len(this->m_buffer) / sizeof(*this->m_buffer)) ==
(int)(this->determineBufferSize() * COM_NUMBER_OF_CHANNELS));
#endif
- float* buffer = &this->m_buffer[offset];
- memcpy(result, buffer, sizeof(float)*this->m_num_channels);
+ float *buffer = &this->m_buffer[offset];
+ memcpy(result, buffer, sizeof(float) * this->m_num_channels);
}
void writePixel(int x, int y, const float color[4]);
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cpp b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
index 7fc4fd3..5960082 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.cpp
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
@@ -90,9 +90,11 @@ const cl_image_format* OpenCLDevice::determineImageFormat(MemoryBuffer *memoryBu
int num_channels = memoryBuffer->get_num_channels();
if (num_channels == 1) {
imageFormat = &IMAGE_FORMAT_VALUE;
- } else if (num_channels == 3) {
+ }
+ else if (num_channels == 3) {
imageFormat = &IMAGE_FORMAT_VECTOR;
- } else {
+ }
+ else {
imageFormat = &IMAGE_FORMAT_COLOR;
}
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.h b/source/blender/compositor/intern/COM_OpenCLDevice.h
index f8a8841..a513954 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.h
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.h
@@ -98,7 +98,7 @@ public:
* @brief determine an image format
* @param memorybuffer
*/
- static const cl_image_format* determineImageFormat(MemoryBuffer *memoryBuffer);
+ static const cl_image_format *determineImageFormat(MemoryBuffer *memoryBuffer);
cl_context getContext() { return this->m_context; }
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index cee3999..6d15ef3 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -72,7 +72,7 @@ void DilateErodeThresholdOperation::executePixel(float output[4], int x, int y,
const float inset = this->m_inset;
float mindist = rd * 2;
- MemoryBuffer *inputBuffer = (MemoryBuffer*)data;
+ MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();
rcti *rect = inputBuffer->getRect();
const int minx = max(x - this->m_scope, rect->xmin);
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index 922441a..18611c0 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -83,8 +83,8 @@ float *InpaintSimpleOperation::get_pixel(int x, int y)
ASSERT_XY_RANGE(x, y);
return &this->m_cached_buffer[
- y * width * COM_NUM_CHANNELS_COLOR +
- x * COM_NUM_CHANNELS_C
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list