File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1098,11 +1098,11 @@ void DrawNode::_drawCircle(const Vec2& center,
10981098
10991099void DrawNode::_drawColoredTriangle (const Vec2* vertices3, const Color* color3)
11001100{
1101- unsigned int vertex_count = 3 ;
1102- Vec2* _vertices3 = new Vec2[vertex_count ];
1103- applyLocalTransform (vertices3, _vertices3, vertex_count );
1101+ constexpr int VERTEX_COUNT = 3 ;
1102+ Vec2 _vertices3[VERTEX_COUNT ];
1103+ applyLocalTransform (vertices3, _vertices3, VERTEX_COUNT );
11041104
1105- auto triangles = reinterpret_cast <V2F_T2F_C4F_Triangle*>(expandBufferAndGetPointer (_triangles, vertex_count ));
1105+ auto triangles = reinterpret_cast <V2F_T2F_C4F_Triangle*>(expandBufferAndGetPointer (_triangles, VERTEX_COUNT ));
11061106 _trianglesDirty = true ;
11071107
11081108 triangles[0 ] = {{_vertices3[0 ], Vec2::ZERO, color3[0 ]},
You can’t perform that action at this time.
0 commit comments