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>2013-10-22 03:35:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-10-22 03:35:08 +0400
commit7c8c49a34a32bdd67e9da27d4b5166f59d45ed70 (patch)
tree8c4a250bc4947d8a13f4e4692324548bc57bc0cf /source
parent4b0ff02aebc82e15d83c57c4e7b46c9b2c664672 (diff)
style cleanup
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c4
-rw-r--r--source/blender/blenlib/intern/BLI_mempool.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c8
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers_impl.c2
-rw-r--r--source/blender/bmesh/operators/bmo_fill_grid.c4
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp22
-rw-r--r--source/blender/editors/interface/interface.c9
-rw-r--r--source/blender/editors/screen/screen_ops.c3
-rw-r--r--source/blender/makesrna/intern/makesrna.c2
-rw-r--r--source/blender/python/intern/bpy_app_ffmpeg.c4
10 files changed, 35 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index f71bc83f5d3..6dd0efc9ab4 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -902,7 +902,7 @@ static void emdm_pass_attrib_vertex_glsl(DMVertexAttribs *attribs, BMLoop *loop,
for (i = 0; i < attribs->tottface; i++) {
const float *uv;
- if(attribs->tface[i].em_offset != -1) {
+ if (attribs->tface[i].em_offset != -1) {
const MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(loop, attribs->tface[i].em_offset);
uv = luv->uv;
}
@@ -917,7 +917,7 @@ static void emdm_pass_attrib_vertex_glsl(DMVertexAttribs *attribs, BMLoop *loop,
}
for (i = 0; i < attribs->totmcol; i++) {
GLubyte col[4];
- if(attribs->mcol[i].em_offset != -1) {
+ if (attribs->mcol[i].em_offset != -1) {
const MLoopCol *cp = BM_ELEM_CD_GET_VOID_P(loop, attribs->mcol[i].em_offset);
col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
}
diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c
index 261e53f0f55..28539d9ca34 100644
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@ -584,7 +584,7 @@ void BLI_mempool_clear_ex(BLI_mempool *pool, const int totelem_reserve)
/* free all after pool->maxchunks */
- for (mpchunk = BLI_findlink(&pool->chunks, (int)maxchunks); mpchunk; mpchunk = mpchunk_next) {
+ for (mpchunk = BLI_findlink(&pool->chunks, (int)maxchunks); mpchunk; mpchunk = mpchunk_next) {
mpchunk_next = mpchunk->next;
BLI_remlink(&pool->chunks, mpchunk);
mempool_chunk_free(mpchunk, pool->flag);
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 8a3abcb9b5e..12ec3da9b69 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -944,7 +944,7 @@ void BM_face_triangulate(BMesh *bm, BMFace *f,
}
- if ((!use_beauty) || (!r_faces_new)){
+ if ((!use_beauty) || (!r_faces_new)) {
/* we can't delete the real face, because some of the callers expect it to remain valid.
* so swap data and delete the last created tri */
bmesh_face_swap_data(bm, f, f_new);
@@ -979,7 +979,8 @@ void BM_face_triangulate(BMesh *bm, BMFace *f,
if (nf_i < edge_array_len) {
r_faces_new[nf_i++] = f_a;
- } else {
+ }
+ else {
f_new = f_a;
break;
}
@@ -990,7 +991,8 @@ void BM_face_triangulate(BMesh *bm, BMFace *f,
if (nf_i < edge_array_len) {
r_faces_new[nf_i++] = f_b;
- } else {
+ }
+ else {
f_new = f_b;
break;
}
diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c
index 238b7b4aaaa..aca2f96dc18 100644
--- a/source/blender/bmesh/intern/bmesh_walkers_impl.c
+++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c
@@ -37,7 +37,7 @@
#include "intern/bmesh_walkers_private.h"
/* pop into stack memory (common operation) */
-#define BMW_state_remove_r(walker, owalk) { \
+#define BMW_state_remove_r(walker, owalk) { \
memcpy(owalk, BMW_current_state(walker), sizeof(*(owalk))); \
BMW_state_remove(walker); \
} (void)0
diff --git a/source/blender/bmesh/operators/bmo_fill_grid.c b/source/blender/bmesh/operators/bmo_fill_grid.c
index a4b1237bc5d..4e302a8ff63 100644
--- a/source/blender/bmesh/operators/bmo_fill_grid.c
+++ b/source/blender/bmesh/operators/bmo_fill_grid.c
@@ -142,11 +142,11 @@ static void bm_loop_pair_from_verts(BMVert *v_a, BMVert *v_b,
static void bm_loop_pair_test_copy(BMLoop *l_pair_a[2], BMLoop *l_pair_b[2])
{
/* if the first one is set, we know the second is too */
- if (l_pair_a[0] && l_pair_b[0] == NULL) {
+ if (l_pair_a[0] && l_pair_b[0] == NULL) {
l_pair_b[0] = l_pair_a[1];
l_pair_b[1] = l_pair_a[0];
}
- else if (l_pair_b[0] && l_pair_a[0] == NULL) {
+ else if (l_pair_b[0] && l_pair_a[0] == NULL) {
l_pair_a[0] = l_pair_b[1];
l_pair_a[1] = l_pair_b[0];
}
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index aec1e1387c3..fd201fcbc11 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -116,9 +116,10 @@ void FastGaussianBlurOperation::deinitExecution()
void *FastGaussianBlurOperation::initializeTileData(rcti *rect)
{
-/* lockMutex();
- if (!this->m_iirgaus) {
- MemoryBuffer *newBuf = (MemoryBuffer *)this->m_inputProgram->initializeTileData(rect);
+#if 0
+ lockMutex();
+ if (!this->m_iirgaus) {
+ MemoryBuffer *newBuf = (MemoryBuffer *)this->m_inputProgram->initializeTileData(rect);
MemoryBuffer *copy = newBuf->duplicate();
updateSize();
@@ -144,9 +145,9 @@ void *FastGaussianBlurOperation::initializeTileData(rcti *rect)
}
unlockMutex();
return this->m_iirgaus;
-}*/
+#else
- lockMutex();
+ lockMutex();
if (this->m_iirgaus) {
// if this->m_iirgaus is set, we don't do tile rendering, so
// we can return the already calculated cache
@@ -159,7 +160,7 @@ void *FastGaussianBlurOperation::initializeTileData(rcti *rect)
if (use_tiles) {
unlockMutex();
}
-
+
MemoryBuffer *buffer = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL);
rcti *buf_rect = buffer->getRect();
@@ -181,19 +182,20 @@ void *FastGaussianBlurOperation::initializeTileData(rcti *rect)
}
else {
if (sx > 0.0f) {
- for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
+ for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
IIR_gauss(tile, sx, c, 1);
- }
+ }
if (sy > 0.0f) {
for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
IIR_gauss(tile, sy, c, 2);
- }
- }
+ }
+ }
if (!use_tiles) {
this->m_iirgaus = tile;
unlockMutex();
}
return tile;
+#endif
}
void FastGaussianBlurOperation::deinitializeTileData(rcti *rect, void *data)
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 9f6d326cd95..16e92f2bc18 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3158,9 +3158,14 @@ uiBut *uiDefBut(uiBlock *block, int type, int retval, const char *str, int x, in
return but;
}
-/* if _x_ is a power of two (only one bit) return the power,
+/**
+ * if \a _x_ is a power of two (only one bit) return the power,
* otherwise return -1.
- * (1<<findBitIndex(x))==x for powers of two.
+ *
+ * for powers of two:
+ * \code{.c}
+ * ((1 << findBitIndex(x)) == x);
+ * \endcode
*/
static int findBitIndex(unsigned int x)
{
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index a325183dd78..3cecbbb767d 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2142,7 +2142,8 @@ static int marker_jump_exec(bContext *C, wmOperator *op)
closest = marker->frame;
found = true;
}
- } else {
+ }
+ else {
if (marker->frame < CFRA && (!found || closest < marker->frame)) {
closest = marker->frame;
found = true;
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 71e4fd4efd5..b4b3fea09c7 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -3695,7 +3695,7 @@ static const char *cpp_classes = ""
" typename Tcollection_funcs>\n"
"class Collection : public Tcollection_funcs {\n"
"public:\n"
-" Collection(const PointerRNA &p) : Tcollection_funcs(p), ptr(p) {}\n"
+" Collection(const PointerRNA &p) : Tcollection_funcs(p), ptr(p) {}\n"
"\n"
" void begin(CollectionIterator<T, Tbegin, Tnext, Tend>& iter)\n"
" { iter.begin(ptr); }\n"
diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c
index 61e12c1cea0..2f7577928c5 100644
--- a/source/blender/python/intern/bpy_app_ffmpeg.c
+++ b/source/blender/python/intern/bpy_app_ffmpeg.c
@@ -89,7 +89,7 @@ static PyObject *make_ffmpeg_info(void)
PyStructSequence_SET_ITEM(ffmpeg_info, pos++, obj)
#ifdef WITH_FFMPEG
-# define FFMPEG_LIB_VERSION(lib) { \
+# define FFMPEG_LIB_VERSION(lib) { \
curversion = lib ## _version(); \
SetObjItem(Py_BuildValue("(iii)", \
curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \
@@ -97,7 +97,7 @@ static PyObject *make_ffmpeg_info(void)
curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \
} (void)0
#else
-# define FFMPEG_LIB_VERSION(lib) { \
+# define FFMPEG_LIB_VERSION(lib) { \
SetStrItem("Unknown"); \
SetStrItem("Unknown"); \
} (void)0