Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-01-23 17:59:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-01-23 17:59:09 +0300
commit6d78936c43741b74f1226af9c096d7253f8fb266 (patch)
tree61d95ce39f24f0428a3e0d89d483c93300c692fb /source
parente40387b1e2af2b2810b2062b1c68491c22911505 (diff)
cleanup: style
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/effect.c2
-rw-r--r--source/blender/blenkernel/intern/tracking_auto.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/blenloader/intern/versioning_270.c4
-rw-r--r--source/blender/collada/EffectExporter.cpp2
-rw-r--r--source/blender/collada/MeshImporter.cpp6
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp19
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.h10
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.cpp6
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.h2
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp21
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp3
-rw-r--r--source/blender/editors/armature/armature_relations.c4
-rw-r--r--source/blender/gpu/intern/gpu_select.c4
-rw-r--r--source/blender/render/intern/source/render_result.c2
17 files changed, 48 insertions, 47 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 9c3e78d7bb3..1aaacda1484 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 22a380ea835..4cb3f2ca493 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 8d41682334b..5893c2275be 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 c652f56bd93..652a4525a7e 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 3c35618a4cd..1f0e00b3bd6 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 a4bf1d28366..571faf8c2e9 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 58767960cc8..37035c50d2c 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 320de3d67cd..e0c542108a1 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 7fc4fd38abd..5960082c2fd 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 f8a8841ef47..a513954ee0d 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 cee39994aed..6d15ef3395b 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 922441a68b6..18611c051d3 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_COLOR];
+ y * width * COM_NUM_CHANNELS_COLOR +
+ x * COM_NUM_CHANNELS_COLOR];
}
int InpaintSimpleOperation::mdist(int x, int y)
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index 709c30f4015..ad4084a7092 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -60,18 +60,17 @@ void ReadBufferOperation::executePixelSampled(float output[4], float x, float y,
}
else {
switch (sampler) {
- case COM_PS_NEAREST:
- m_buffer->read(output, x, y);
- break;
- case COM_PS_BILINEAR:
- default:
- m_buffer->readBilinear(output, x, y);
- break;
- case COM_PS_BICUBIC:
- m_buffer->readBilinear(output, x, y);
- break;
+ case COM_PS_NEAREST:
+ m_buffer->read(output, x, y);
+ break;
+ case COM_PS_BILINEAR:
+ default:
+ m_buffer->readBilinear(output, x, y);
+ break;
+ case COM_PS_BICUBIC:
+ m_buffer->readBilinear(output, x, y);
+ break;
}
-
}
}
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index 8e778e44a79..4c6d5c24781 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -142,7 +142,8 @@ void RenderLayersBaseProg::executePixelSampled(float output[4], float x, float y
}
else if (elemsize == 3) {
zero_v3(output);
- } else {
+ }
+ else {
BLI_assert(elemsize == 4);
zero_v4(output);
}
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 7a7adc58252..41f528bc5e2 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -153,7 +153,7 @@ static void joined_armature_fix_animdata_cb(ID *id, AnimData *adt, void *user_da
/* only remap if changed; this still means there will be some waste if there aren't many drivers/keys */
if (strcmp(old_name, new_name) && strstr(fcu->rna_path, old_name)) {
fcu->rna_path = BKE_animsys_fix_rna_path_rename(id, fcu->rna_path, "pose.bones",
- old_name, new_name, 0, 0, false);
+ old_name, new_name, 0, 0, false);
/* we don't want to apply a second remapping on this driver now,
* so stop trying names, but keep fixing drivers
@@ -193,7 +193,7 @@ static void joined_armature_fix_animdata_cb(ID *id, AnimData *adt, void *user_da
if ((dtar->rna_path) && strstr(dtar->rna_path, old_name)) {
/* Fix up path */
dtar->rna_path = BKE_animsys_fix_rna_path_rename(id, dtar->rna_path, "pose.bones",
- old_name, new_name, 0, 0, false);
+ old_name, new_name, 0, 0, false);
break; /* no need to try any more names for bone path */
}
else if (strcmp(dtar->pchan_name, old_name) == 0) {
diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c
index d8e1fab9f80..0515334feec 100644
--- a/source/blender/gpu/intern/gpu_select.c
+++ b/source/blender/gpu/intern/gpu_select.c
@@ -135,7 +135,7 @@ void GPU_select_begin(unsigned int *buffer, unsigned int bufsize, rctf *input, c
bool GPU_select_load_id(unsigned int id)
{
/* if no selection mode active, ignore */
- if(!g_query_state.select_is_active)
+ if (!g_query_state.select_is_active)
return true;
if (!g_query_state.use_gpu_select) {
@@ -191,7 +191,7 @@ unsigned int GPU_select_end(void)
glGetQueryObjectuivARB(g_query_state.queries[i], GL_QUERY_RESULT_ARB, &result);
if (result > 0) {
if (g_query_state.mode != GPU_SELECT_NEAREST_SECOND_PASS) {
- if(hits < g_query_state.bufsize) {
+ if (hits < g_query_state.bufsize) {
g_query_state.buffer[hits * 4] = 1;
g_query_state.buffer[hits * 4 + 1] = 0xFFFF;
g_query_state.buffer[hits * 4 + 2] = 0xFFFF;
diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c
index 154c0c8570c..0d859f81e0c 100644
--- a/source/blender/render/intern/source/render_result.c
+++ b/source/blender/render/intern/source/render_result.c
@@ -611,7 +611,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf
render_layer_add_pass(rr, rl, 3, SCE_PASS_SUBSURFACE_COLOR);
#ifdef WITH_CYCLES_DEBUG
- if(BKE_scene_use_new_shading_nodes(re->scene)) {
+ if (BKE_scene_use_new_shading_nodes(re->scene)) {
render_layer_add_debug_pass(rr, rl, 1, SCE_PASS_DEBUG,
RENDER_PASS_DEBUG_BVH_TRAVERSAL_STEPS);
}