Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/curve/editcurve.c')
-rw-r--r--source/blender/editors/curve/editcurve.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 91a8ea0fa3a..d113e0693a4 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -569,14 +569,14 @@ GHash *ED_curve_keyindex_hash_duplicate(GHash *keyindex)
static void key_to_bezt(float *key, BezTriple *basebezt, BezTriple *bezt)
{
memcpy(bezt, basebezt, sizeof(BezTriple));
- memcpy(bezt->vec, key, sizeof(float) * 9);
+ memcpy(bezt->vec, key, sizeof(float[9]));
bezt->tilt = key[9];
bezt->radius = key[10];
}
static void bezt_to_key(BezTriple *bezt, float *key)
{
- memcpy(key, bezt->vec, sizeof(float) * 9);
+ memcpy(key, bezt->vec, sizeof(float[9]));
key[9] = bezt->tilt;
key[10] = bezt->radius;
}
@@ -691,7 +691,7 @@ static void calc_shapeKeys(Object *obedit, ListBase *newnurbs)
nu = nu->next;
}
- ofs = MEM_callocN(sizeof(float) * 3 * totvec, "currkey->data");
+ ofs = MEM_callocN(sizeof(float[3]) * totvec, "currkey->data");
nu = editnurb->nurbs.first;
i = 0;
while (nu) {
@@ -1137,7 +1137,7 @@ int ED_curve_updateAnimPaths(Main *bmain, Curve *cu)
/** \name Edit Mode Conversion (Make & Load)
* \{ */
-static int *initialize_index_map(Object *obedit, int *r_old_totvert)
+static int *init_index_map(Object *obedit, int *r_old_totvert)
{
Curve *curve = (Curve *)obedit->data;
EditNurb *editnurb = curve->editnurb;
@@ -1225,7 +1225,7 @@ static void remap_hooks_and_vertex_parents(Main *bmain, Object *obedit)
if ((object->parent) && (object->parent->data == curve) &&
ELEM(object->partype, PARVERT1, PARVERT3)) {
if (old_to_new_map == NULL) {
- old_to_new_map = initialize_index_map(obedit, &old_totvert);
+ old_to_new_map = init_index_map(obedit, &old_totvert);
}
if (object->par1 < old_totvert) {
@@ -1254,7 +1254,7 @@ static void remap_hooks_and_vertex_parents(Main *bmain, Object *obedit)
int i, j;
if (old_to_new_map == NULL) {
- old_to_new_map = initialize_index_map(obedit, &old_totvert);
+ old_to_new_map = init_index_map(obedit, &old_totvert);
}
for (i = j = 0; i < hmd->totindex; i++) {
@@ -1716,7 +1716,10 @@ static bool isNurbselV(Nurb *nu, int *u, int flag)
return 1;
}
-static void rotateflagNurb(ListBase *editnurb, short flag, const float cent[3], float rotmat[3][3])
+static void rotateflagNurb(ListBase *editnurb,
+ short flag,
+ const float cent[3],
+ const float rotmat[3][3])
{
/* all verts with (flag & 'flag') rotate */
Nurb *nu;
@@ -3495,7 +3498,7 @@ static void subdividenurb(Object *obedit, View3D *v3d, int number_cuts)
BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, nextbezt)) {
float prevvec[3][3];
- memcpy(prevvec, bezt->vec, sizeof(float) * 9);
+ memcpy(prevvec, bezt->vec, sizeof(float[9]));
for (i = 0; i < number_cuts; i++) {
factor = 1.0f / (number_cuts + 1 - i);
@@ -3527,7 +3530,7 @@ static void subdividenurb(Object *obedit, View3D *v3d, int number_cuts)
beztn->radius = (bezt->radius + nextbezt->radius) / 2;
beztn->weight = (bezt->weight + nextbezt->weight) / 2;
- memcpy(prevvec, beztn->vec, sizeof(float) * 9);
+ memcpy(prevvec, beztn->vec, sizeof(float[9]));
beztn++;
}
}