diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-07 15:36:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-07 15:37:39 +0300 |
commit | b134434224254d4ac3fc73d023f2f6d914746690 (patch) | |
tree | b67d2c5aee982495d55848414c362665a37476b0 /source/blender/editors/curve | |
parent | 3db67fd670535c0a709ec6e8204fcb730cd3eb0d (diff) |
Cleanup: declare arrays arrays where possible
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve_add.c | 8 | ||||
-rw-r--r-- | source/blender/editors/curve/editfont.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index bacdd5b69b5..75d90df3291 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -397,8 +397,8 @@ Nurb *ED_curve_add_nurbs_primitive( break; case CU_PRIM_SPHERE: /* sphere */ if (cutype == CU_NURBS) { - float tmp_cent[3] = {0.f, 0.f, 0.f}; - float tmp_vec[3] = {0.f, 0.f, 1.f}; + const float tmp_cent[3] = {0.f, 0.f, 0.f}; + const float tmp_vec[3] = {0.f, 0.f, 1.f}; nu->pntsu = 5; nu->pntsv = 1; @@ -451,8 +451,8 @@ Nurb *ED_curve_add_nurbs_primitive( break; case CU_PRIM_DONUT: /* torus */ if (cutype == CU_NURBS) { - float tmp_cent[3] = {0.f, 0.f, 0.f}; - float tmp_vec[3] = {0.f, 0.f, 1.f}; + const float tmp_cent[3] = {0.f, 0.f, 0.f}; + const float tmp_vec[3] = {0.f, 0.f, 1.f}; xzproj = 1; nu = ED_curve_add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index d78c543f94b..4529209b297 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -648,7 +648,7 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, const int nchars = 0, nbytes = 0; char *s; int a; - float rot[3] = {0.f, 0.f, 0.f}; + const float rot[3] = {0.f, 0.f, 0.f}; obedit = BKE_object_add(bmain, scene, view_layer, OB_FONT, NULL); base = view_layer->basact; |