diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-22 09:34:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-22 09:34:10 +0400 |
commit | a79e10157dc7a1c8a102bf88f236d325ecdd8d80 (patch) | |
tree | 2026c37ec8c7da9094bbb20d3aedcdd82d565765 /source/blender/editors | |
parent | dd0e2da7847d31cbaf02c665e2c55b5e8c384ed4 (diff) |
code cleanup: use NULL rather then 0 for pointers, and make vars static where possible.
also found unintentionally defined enum/struct variables that where only meant to be defining the type.
Diffstat (limited to 'source/blender/editors')
7 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 8c8e4878166..00af771e45d 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -323,7 +323,7 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) { - MultiresBakeRender bkr = {0}; + MultiresBakeRender bkr = {NULL}; ob = base->object; @@ -419,7 +419,7 @@ static void multiresbake_startjob(void *bkv, short *stop, short *do_update, floa } for (data = bkj->data.first; data; data = data->next) { - MultiresBakeRender bkr = {0}; + MultiresBakeRender bkr = {NULL}; /* copy data stored in job descriptor */ bkr.bake_filter = bkj->bake_filter; diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 58e51fa0603..b7303b2af51 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -439,7 +439,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else if (nr == OBJECT_SELECT_LINKED_OBDATA) { - if (ob->data == 0) + if (ob->data == NULL) return OPERATOR_CANCELLED; changed = object_select_all_by_obdata(C, ob->data); diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 9ba50e95d81..197231124fc 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -293,7 +293,7 @@ static void do_shared_vertexcol(Mesh *me, int do_tessface) /* if no mloopcol: do not do */ /* if mtexpoly: only the involved faces, otherwise all */ - if (me->mloopcol == 0 || me->totvert == 0 || me->totpoly == 0) return; + if (me->mloopcol == NULL || me->totvert == 0 || me->totpoly == 0) return; scol = MEM_callocN(sizeof(float) * me->totvert * 5, "scol"); diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index b1e43a2ef0c..30ba4108143 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -552,7 +552,7 @@ typedef enum eNodeGroupSeparateType { } eNodeGroupSeparateType; /* Operator Property */ -EnumPropertyItem node_group_separate_types[] = { +static EnumPropertyItem node_group_separate_types[] = { {NODE_GS_COPY, "COPY", 0, "Copy", "Copy to parent node tree, keep group intact"}, {NODE_GS_MOVE, "MOVE", 0, "Move", "Move to parent node tree, remove from group"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/editors/space_text/text_format_lua.c b/source/blender/editors/space_text/text_format_lua.c index f74d1cf8e8b..9972c570db7 100644 --- a/source/blender/editors/space_text/text_format_lua.c +++ b/source/blender/editors/space_text/text_format_lua.c @@ -307,7 +307,7 @@ static void txtfmt_lua_format_line(SpaceText *st, TextLine *line, const int do_n void ED_text_format_register_lua(void) { - static TextFormatType tft = {0}; + static TextFormatType tft = {NULL}; static const char *ext[] = {"lua", NULL}; tft.format_identifier = txtfmt_lua_format_identifier; diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c index c95929a720f..a4322fb310e 100644 --- a/source/blender/editors/space_text/text_format_osl.c +++ b/source/blender/editors/space_text/text_format_osl.c @@ -325,7 +325,7 @@ static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const int do_n void ED_text_format_register_osl(void) { - static TextFormatType tft = {0}; + static TextFormatType tft = {NULL}; static const char *ext[] = {"osl", NULL}; tft.format_identifier = txtfmt_osl_format_identifier; diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c index 9562d57041f..a401e5dcdac 100644 --- a/source/blender/editors/space_text/text_format_py.c +++ b/source/blender/editors/space_text/text_format_py.c @@ -314,7 +314,7 @@ static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const int do_ne void ED_text_format_register_py(void) { - static TextFormatType tft = {0}; + static TextFormatType tft = {NULL}; static const char *ext[] = {"py", NULL}; tft.format_identifier = txtfmt_py_format_identifier; |