diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-14 20:05:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-14 20:05:44 +0400 |
commit | 49ccf975f25c11d217e6db462986998991383291 (patch) | |
tree | 2d6119e1c59bf6cb11ab530d1e2ddcaa8ec88819 /source/blender/editors | |
parent | 5b5f776eae79811b7c807b4a7eabfc7727d764cf (diff) |
minor cleanup
- use NULL rather then 0 for pointers
- use static functions where possible
- add own includes to ensure func's and their declarations don't get out of sync.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 2 | ||||
-rw-r--r-- | source/blender/editors/physics/dynamicpaint_ops.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_toolbar.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_info/info_stats.c | 2 |
7 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index ce4e052bd53..be8bee7452d 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -3582,7 +3582,7 @@ void UI_init_userdef(void) uiStyleInit(); } -void UI_reinit_font() +void UI_reinit_font(void) { uiStyleInit(); } diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 5803054caa7..2a75c2a26c1 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -494,7 +494,7 @@ struct uiEditSourceButStore { } uiEditSourceButStore; /* should only ever be set while the edit source operator is running */ -struct uiEditSourceStore *ui_editsource_info= NULL; +static struct uiEditSourceStore *ui_editsource_info= NULL; int UI_editsource_enable_check(void) { diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 0fbf5a8bd92..3c84b2df1d2 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -736,7 +736,7 @@ static int childof_set_inverse_exec (bContext *C, wmOperator *op) where_is_pose(scene, ob); } else if (ob) { - Object workob = {{0}}; + Object workob = {{NULL}}; /* use what_does_parent to find inverse - just like for normal parenting */ what_does_parent(scene, ob, &workob); diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 0d210fa83eb..936da90e8b7 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -799,7 +799,7 @@ static int* getSurroundingVerts(Mesh *me, int vert, int *count) } } if(!length) { - return 0; + return NULL; } tverts = MEM_mallocN(sizeof(int)*length, "tempSurroundingVerts"); mf = me->mface; diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index f30ff9c08e9..6739e297309 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -53,9 +53,11 @@ #include "WM_types.h" #include "WM_api.h" +#include "physics_intern.h" /* own include */ + static int surface_slot_add_exec(bContext *C, wmOperator *UNUSED(op)) { - DynamicPaintModifierData *pmd = 0; + DynamicPaintModifierData *pmd = NULL; Object *cObject = CTX_data_pointer_get_type(C, "object", &RNA_Object).data; DynamicPaintCanvasSettings *canvas; DynamicPaintSurface *surface; @@ -97,7 +99,7 @@ void DPAINT_OT_surface_slot_add(wmOperatorType *ot) static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op)) { - DynamicPaintModifierData *pmd = 0; + DynamicPaintModifierData *pmd = NULL; Object *cObject = CTX_data_pointer_get_type(C, "object", &RNA_Object).data; DynamicPaintCanvasSettings *canvas; DynamicPaintSurface *surface; @@ -336,9 +338,9 @@ static int dynamicPaint_bakeImageSequence(bContext *C, DynamicPaintSurface *surf /* -* Bake Dynamic Paint image sequence surface -*/ -int dynamicPaint_initBake(struct bContext *C, struct wmOperator *op) + * Bake Dynamic Paint image sequence surface + */ +static int dynamicPaint_initBake(struct bContext *C, struct wmOperator *op) { DynamicPaintModifierData *pmd = NULL; DynamicPaintCanvasSettings *canvas; diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c index c8113c5ea7b..fe09c5cd829 100644 --- a/source/blender/editors/space_clip/clip_toolbar.c +++ b/source/blender/editors/space_clip/clip_toolbar.c @@ -50,6 +50,8 @@ #include "UI_interface.h" #include "UI_resources.h" +#include "clip_intern.h" /* own include */ + /* ************************ header area region *********************** */ /************************** properties ******************************/ diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 25e1d2f2816..52e6a8808ae 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -40,6 +40,7 @@ #include "BLI_utildefines.h" #include "BKE_anim.h" +#include "BKE_blender.h" #include "BKE_curve.h" #include "BKE_displist.h" #include "BKE_DerivedMesh.h" @@ -362,7 +363,6 @@ static void stats_update(Scene *scene) static void stats_string(Scene *scene) { - extern char versionstr[]; /* from blender.c */ SceneStats *stats= scene->stats; Object *ob= (scene->basact)? scene->basact->object: NULL; uintptr_t mem_in_use, mmap_in_use; |