diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-18 07:07:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-18 08:04:07 +0300 |
commit | ab7ebf2b10f67b002447fb0e2cb352c2c178e128 (patch) | |
tree | 8ca38116cf22d8a5e8c6b788f93a84ba1963cb4c /source/blender/makesrna/intern/rna_object_force.c | |
parent | 92611dada67fcc151c894462749031be1de27191 (diff) |
Cleanup: Use const for RNA EnumPropertyItem args
Practically all access to enum data is read-only.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 514fca1b011..366de586fa5 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -41,7 +41,7 @@ #include "WM_api.h" #include "WM_types.h" -static EnumPropertyItem effector_shape_items[] = { +static const EnumPropertyItem effector_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""}, @@ -55,20 +55,20 @@ static EnumPropertyItem effector_shape_items[] = { /* type specific return values only used from functions */ -static EnumPropertyItem curve_shape_items[] = { +static const 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} }; -static EnumPropertyItem empty_shape_items[] = { +static const EnumPropertyItem empty_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem vortex_shape_items[] = { +static const EnumPropertyItem vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface falloff (New)", ""}, @@ -76,14 +76,14 @@ static EnumPropertyItem vortex_shape_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem curve_vortex_shape_items[] = { +static const 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} }; -static EnumPropertyItem empty_vortex_shape_items[] = { +static const EnumPropertyItem empty_vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {0, NULL, 0, NULL, NULL} @@ -736,7 +736,7 @@ static void rna_softbody_dependency_update(Main *bmain, Scene *scene, PointerRNA rna_softbody_update(bmain, scene, ptr); } -static EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr, +static const EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { Object *ob = NULL; @@ -795,7 +795,7 @@ static void rna_def_pointcache(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem point_cache_compress_items[] = { + static const EnumPropertyItem point_cache_compress_items[] = { {PTCACHE_COMPRESS_NO, "NO", 0, "No", "No compression"}, {PTCACHE_COMPRESS_LZO, "LIGHT", 0, "Light", "Fast but not so effective compression"}, {PTCACHE_COMPRESS_LZMA, "HEAVY", 0, "Heavy", "Effective but slow compression"}, @@ -1123,7 +1123,7 @@ static void rna_def_field(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem field_type_items[] = { + static const EnumPropertyItem field_type_items[] = { {0, "NONE", 0, "None", ""}, {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", "Radial field toward the center of object"}, {PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", "Constant force along the force object's local Z axis"}, @@ -1146,28 +1146,28 @@ static void rna_def_field(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem falloff_items[] = { + static const EnumPropertyItem falloff_items[] = { {PFIELD_FALL_SPHERE, "SPHERE", 0, "Sphere", ""}, {PFIELD_FALL_TUBE, "TUBE", 0, "Tube", ""}, {PFIELD_FALL_CONE, "CONE", 0, "Cone", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem texture_items[] = { + static const EnumPropertyItem texture_items[] = { {PFIELD_TEX_RGB, "RGB", 0, "RGB", ""}, {PFIELD_TEX_GRAD, "GRADIENT", 0, "Gradient", ""}, {PFIELD_TEX_CURL, "CURL", 0, "Curl", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem zdirection_items[] = { + static const EnumPropertyItem zdirection_items[] = { {PFIELD_Z_BOTH, "BOTH", 0, "Both Z", ""}, {PFIELD_Z_POS, "POSITIVE", 0, "+Z", ""}, {PFIELD_Z_NEG, "NEGATIVE", 0, "-Z", ""}, {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem guide_kink_items[] = { + static const EnumPropertyItem guide_kink_items[] = { {0, "NONE", 0, "Nothing", ""}, {1, "CURL", 0, "Curl", ""}, {2, "RADIAL", 0, "Radial", ""}, @@ -1565,7 +1565,7 @@ static void rna_def_softbody(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem collision_type_items[] = { + static const EnumPropertyItem collision_type_items[] = { {SBC_MODE_MANUAL, "MANUAL", 0, "Manual", "Manual adjust"}, {SBC_MODE_AVG, "AVERAGE", 0, "Average", "Average Spring length * Ball Size"}, {SBC_MODE_MIN, "MINIMAL", 0, "Minimal", "Minimal Spring length * Ball Size"}, @@ -1574,7 +1574,7 @@ static void rna_def_softbody(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem aerodynamics_type[] = { + static const EnumPropertyItem aerodynamics_type[] = { {0, "SIMPLE", 0, "Simple", "Edges receive a drag force from surrounding media"}, {1, "LIFT_FORCE", 0, "Lift Force", "Edges receive a lift force when passing through surrounding media"}, {0, NULL, 0, NULL, NULL} |