diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-28 09:06:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-28 09:06:30 +0400 |
commit | fa2ba5fbf5848e4d61b697c624af9b9e9456eb20 (patch) | |
tree | 8c7f0bcfc6af77f1bb491d4e4d230493f9d897c0 /source/blender/makesrna/intern/rna_object_force.c | |
parent | c73d5b939dd9dcc68ed1d1316115c2c7cded9cab (diff) |
- use static vars and functions where possible.
- use NULL rather than 0 when used as pointers.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 463f65fd3d5..490d9c38840 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -43,7 +43,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem effector_shape_items[] = { +static EnumPropertyItem effector_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""}, @@ -51,20 +51,23 @@ EnumPropertyItem effector_shape_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem curve_shape_items[] = { +#ifdef RNA_RUNTIME + +/* type spesific return values only used from functions */ +static EnumPropertyItem curve_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem empty_shape_items[] = { +static EnumPropertyItem empty_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem vortex_shape_items[] = { +static EnumPropertyItem vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface falloff (New)", ""}, @@ -72,21 +75,19 @@ EnumPropertyItem vortex_shape_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem curve_vortex_shape_items[] = { +static EnumPropertyItem curve_vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve (New)", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem empty_vortex_shape_items[] = { +static EnumPropertyItem empty_vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {0, NULL, 0, NULL, NULL} }; -#ifdef RNA_RUNTIME - #include "MEM_guardedalloc.h" #include "DNA_modifier_types.h" |