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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-01-28 05:59:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-28 05:59:59 +0400
commit774ff1c2468a33d113cab605b37d0c5fc93c9868 (patch)
tree7a4c08e1ae5c2d0b53a703633feae6a4d75dce8a
parentd57846e80db32f72564aff702590acd6b3c3aef0 (diff)
style cleanup: also remove unneeded NULL check.
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_log.c3
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp40
-rw-r--r--source/blender/editors/interface/interface_templates.c2
-rw-r--r--source/blender/editors/object/object_ops.c2
5 files changed, 25 insertions, 24 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 2e10407bee8..e03100280d6 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -1712,7 +1712,7 @@ static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes)
if (ccgdm->pbvh && ccgdm->multires.mmd && !fast) {
if (dm->numTessFaceData) {
BKE_pbvh_draw(ccgdm->pbvh, partial_redraw_planes, NULL,
- setMaterial, FALSE);
+ setMaterial, FALSE);
glShadeModel(GL_FLAT);
}
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c
index 68f8f38fb26..2b81bfaacfe 100644
--- a/source/blender/bmesh/intern/bmesh_log.c
+++ b/source/blender/bmesh/intern/bmesh_log.c
@@ -452,7 +452,8 @@ BMLog *BM_log_from_existing_entries_create(BMesh *bm, BMLogEntry *entry)
/* Let BMLog manage the entry list again */
log->entries.first = log->entries.last = entry;
- if (entry) {
+
+ {
while (entry->prev) {
entry = entry->prev;
log->entries.first = entry;
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index 07b958cc335..ecc618a5346 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -345,8 +345,8 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
*/
int half_window = this->m_iterations;
int window = half_window * 2 + 1;
- float *temp = (float *)MEM_mallocN((2*window - 1) * sizeof(float), "dilate erode temp");
- float *buf = (float *)MEM_mallocN((max(bwidth, bheight) + 5*half_window) * sizeof(float), "dilate erode buf");
+ float *temp = (float *)MEM_mallocN((2 * window - 1) * sizeof(float), "dilate erode temp");
+ float *buf = (float *)MEM_mallocN((max(bwidth, bheight) + 5 * half_window) * sizeof(float), "dilate erode buf");
for (y = 0; y < bheight; y++) {
for (x = 0; x < window - 1; x++) {
@@ -355,11 +355,11 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
for (x = 0; x < bwidth; x++) {
buf[x + window - 1] = rectf[bwidth * y + x];
}
- for (x = bwidth + window - 1; x < bwidth + 5*half_window; x++) {
+ for (x = bwidth + window - 1; x < bwidth + 5 * half_window; x++) {
buf[x] = -MAXFLOAT;
}
- for(i = 0; i < (bwidth + 3*half_window) / window; i++) {
+ for (i = 0; i < (bwidth + 3 * half_window) / window; i++) {
int start = (i + 1) * window - 1;
temp[window - 1] = buf[start];
@@ -368,8 +368,8 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
temp[window - 1 + x] = max(temp[window + x - 2], buf[start + x]);
}
- start = half_window + (i-1) * window + 1;
- for (x = -min(0, start); x < window - max(0, start+window - bwidth); x++) {
+ start = half_window + (i - 1) * window + 1;
+ for (x = -min(0, start); x < window - max(0, start + window - bwidth); x++) {
rectf[bwidth * y + (start + x)] = max(temp[x], temp[x + window - 1]);
}
}
@@ -382,11 +382,11 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
for (y = 0; y < bheight; y++) {
buf[y + window - 1] = rectf[bwidth * y + x];
}
- for (y = bheight + window - 1; y < bheight + 5*half_window; y++) {
+ for (y = bheight + window - 1; y < bheight + 5 * half_window; y++) {
buf[y] = -MAXFLOAT;
}
- for(i = 0; i < (bheight + 3*half_window) / window; i++) {
+ for (i = 0; i < (bheight + 3 * half_window) / window; i++) {
int start = (i + 1) * window - 1;
temp[window - 1] = buf[start];
@@ -395,8 +395,8 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
temp[window - 1 + y] = max(temp[window + y - 2], buf[start + y]);
}
- start = half_window + (i-1) * window + 1;
- for (y = -min(0, start); y < window - max(0, start+window - bheight); y++) {
+ start = half_window + (i - 1) * window + 1;
+ for (y = -min(0, start); y < window - max(0, start + window - bheight); y++) {
rectf[bwidth * (y + start) + x] = max(temp[y], temp[y + window - 1]);
}
}
@@ -464,8 +464,8 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
int half_window = this->m_iterations;
int window = half_window * 2 + 1;
- float *temp = (float *)MEM_mallocN((2*window - 1) * sizeof(float), "dilate erode temp");
- float *buf = (float *)MEM_mallocN((max(bwidth, bheight) + 5*half_window) * sizeof(float), "dilate erode buf");
+ float *temp = (float *)MEM_mallocN((2 * window - 1) * sizeof(float), "dilate erode temp");
+ float *buf = (float *)MEM_mallocN((max(bwidth, bheight) + 5 * half_window) * sizeof(float), "dilate erode buf");
for (y = 0; y < bheight; y++) {
for (x = 0; x < window - 1; x++) {
@@ -474,11 +474,11 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
for (x = 0; x < bwidth; x++) {
buf[x + window - 1] = rectf[bwidth * y + x];
}
- for (x = bwidth + window - 1; x < bwidth + 5*half_window; x++) {
+ for (x = bwidth + window - 1; x < bwidth + 5 * half_window; x++) {
buf[x] = MAXFLOAT;
}
- for(i = 0; i < (bwidth + 3*half_window) / window; i++) {
+ for (i = 0; i < (bwidth + 3 * half_window) / window; i++) {
int start = (i + 1) * window - 1;
temp[window - 1] = buf[start];
@@ -487,8 +487,8 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
temp[window - 1 + x] = min(temp[window + x - 2], buf[start + x]);
}
- start = half_window + (i-1) * window + 1;
- for (x = -min(0, start); x < window - max(0, start+window - bwidth); x++) {
+ start = half_window + (i - 1) * window + 1;
+ for (x = -min(0, start); x < window - max(0, start + window - bwidth); x++) {
rectf[bwidth * y + (start + x)] = min(temp[x], temp[x + window - 1]);
}
}
@@ -501,11 +501,11 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
for (y = 0; y < bheight; y++) {
buf[y + window - 1] = rectf[bwidth * y + x];
}
- for (y = bheight + window - 1; y < bheight + 5*half_window; y++) {
+ for (y = bheight + window - 1; y < bheight + 5 * half_window; y++) {
buf[y] = MAXFLOAT;
}
- for(i = 0; i < (bheight + 3*half_window) / window; i++) {
+ for (i = 0; i < (bheight + 3 * half_window) / window; i++) {
int start = (i + 1) * window - 1;
temp[window - 1] = buf[start];
@@ -514,8 +514,8 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
temp[window - 1 + y] = min(temp[window + y - 2], buf[start + y]);
}
- start = half_window + (i-1) * window + 1;
- for (y = -min(0, start); y < window - max(0, start+window - bheight); y++) {
+ start = half_window + (i - 1) * window + 1;
+ for (y = -min(0, start); y < window - max(0, start + window - bheight); y++) {
rectf[bwidth * (y + start) + x] = min(temp[y], temp[y + window - 1]);
}
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 83bd07a7c5d..26a8f703545 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -544,7 +544,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
but = uiDefIconButO(block, BUT, "FILE_OT_unpack_item", WM_OP_INVOKE_REGION_WIN, ICON_PACKAGE, 0, 0, UI_UNIT_X, UI_UNIT_Y, "Packed File");
uiButGetOperatorPtrRNA(but);
- RNA_string_set(but->opptr, "id_name", id->name+2);
+ RNA_string_set(but->opptr, "id_name", id->name + 2);
RNA_int_set(but->opptr, "id_type", GS(id->name));
}
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 5c65e543cc9..d26ea89bd1e 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -399,7 +399,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
RNA_enum_set(kmi->ptr, "type", 0); /* active */
kmi = WM_keymap_add_item(keymap, "RIGIDBODY_OT_objects_add", RKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "type", 1); /* passive */
- kmi = WM_keymap_add_item(keymap, "RIGIDBODY_OT_objects_remove", RKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
+ WM_keymap_add_item(keymap, "RIGIDBODY_OT_objects_remove", RKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_object_specials", WKEY, KM_PRESS, 0, 0);