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>2011-02-13 13:52:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-13 13:52:18 +0300
commit0955c664aa7c5fc5f0bd345c58219c40f04ab9c1 (patch)
tree20b6a2ab2e1130d75d119eba09f3b195a33a9434 /source/blender/blenkernel/intern/brush.c
parentf3bd89b1b7a86778ff4c633a6b4115309a1b3c7e (diff)
fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO). - set static variables and functions (exposed some unused vars/funcs). - use func(void) rather then func() for definitions.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index b1931ebe0a7..4ad3b8bb3cf 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -186,13 +186,13 @@ void make_local_brush(Brush *brush)
Scene *scene;
int local= 0, lib= 0;
- if(brush->id.lib==0) return;
+ if(brush->id.lib==NULL) return;
if(brush->clone.image) {
/* special case: ima always local immediately */
- brush->clone.image->id.lib= 0;
+ brush->clone.image->id.lib= NULL;
brush->clone.image->id.flag= LIB_LOCAL;
- new_id(0, (ID *)brush->clone.image, 0);
+ new_id(NULL, (ID *)brush->clone.image, NULL);
}
for(scene= G.main->scene.first; scene; scene=scene->id.next)
@@ -202,9 +202,9 @@ void make_local_brush(Brush *brush)
}
if(local && lib==0) {
- brush->id.lib= 0;
+ brush->id.lib= NULL;
brush->id.flag= LIB_LOCAL;
- new_id(0, (ID *)brush, 0);
+ new_id(NULL, (ID *)brush, NULL);
/* enable fake user by default */
if (!(brush->id.flag & LIB_FAKEUSER)) {
@@ -219,7 +219,7 @@ void make_local_brush(Brush *brush)
for(scene= G.main->scene.first; scene; scene=scene->id.next)
if(paint_brush(&scene->toolsettings->imapaint.paint)==brush)
- if(scene->id.lib==0) {
+ if(scene->id.lib==NULL) {
paint_brush_set(&scene->toolsettings->imapaint.paint, brushn);
brushn->id.us++;
brush->id.us--;
@@ -227,10 +227,10 @@ void make_local_brush(Brush *brush)
}
}
-void brush_debug_print_state(Brush *br)
+static void brush_debug_print_state(Brush *br)
{
/* create a fake brush and set it to the defaults */
- Brush def= {{0}};
+ Brush def= {{NULL}};
brush_set_defaults(&def);
#define BR_TEST(field, t) \
@@ -424,7 +424,7 @@ int brush_texture_set_nr(Brush *brush, int nr)
id= (ID *)brush->mtex.tex;
idtest= (ID*)BLI_findlink(&G.main->tex, nr-1);
- if(idtest==0) { /* new tex */
+ if(idtest==NULL) { /* new tex */
if(id) idtest= (ID *)copy_texture((Tex *)id);
else idtest= (ID *)add_texture("Tex");
idtest->us--;