forked from enlightenment/efl
evas svg: avoid unnecessary memory clear.
This commit is contained in:
parent
862e65c260
commit
9e14a57020
|
@ -1650,12 +1650,12 @@ _copy_attribute(Svg_Node *to, Svg_Node *from)
|
||||||
break;
|
break;
|
||||||
case SVG_NODE_POLYGON:
|
case SVG_NODE_POLYGON:
|
||||||
to->node.polygon.points_count = from->node.polygon.points_count;
|
to->node.polygon.points_count = from->node.polygon.points_count;
|
||||||
to->node.polygon.points = calloc(to->node.polygon.points_count, sizeof(double));
|
to->node.polygon.points = malloc(to->node.polygon.points_count, sizeof(double));
|
||||||
memcpy(to->node.polygon.points, from->node.polygon.points, to->node.polygon.points_count * sizeof(double));
|
memcpy(to->node.polygon.points, from->node.polygon.points, to->node.polygon.points_count * sizeof(double));
|
||||||
break;
|
break;
|
||||||
case SVG_NODE_POLYLINE:
|
case SVG_NODE_POLYLINE:
|
||||||
to->node.polyline.points_count = from->node.polyline.points_count;
|
to->node.polyline.points_count = from->node.polyline.points_count;
|
||||||
to->node.polyline.points = calloc(to->node.polyline.points_count, sizeof(double));
|
to->node.polyline.points = malloc(to->node.polyline.points_count, sizeof(double));
|
||||||
memcpy(to->node.polyline.points, from->node.polyline.points, to->node.polyline.points_count * sizeof(double));
|
memcpy(to->node.polyline.points, from->node.polyline.points, to->node.polyline.points_count * sizeof(double));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue