Another local ersatz vector cleaned.
This commit is contained in:
@ -141,15 +141,14 @@ void Polygon::draw (core::View *view, core::style::Style *style, int x, int y)
|
||||
if (points->size()) {
|
||||
int i;
|
||||
const bool filled = false, convex = false;
|
||||
Point *pointArray = (Point *)malloc(points->size()*sizeof(struct Point));
|
||||
std::vector< Point > pointArray( points->size() );
|
||||
|
||||
for (i = 0; i < points->size(); i++) {
|
||||
pointArray[i].x = x + points->getRef(i)->x;
|
||||
pointArray[i].y = y + points->getRef(i)->y;
|
||||
}
|
||||
view->drawPolygon(style->color, core::style::Color::SHADING_NORMAL,
|
||||
filled, convex, pointArray, i);
|
||||
free(pointArray);
|
||||
filled, convex, pointArray.data(), i);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user