mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-24 00:26:36 +00:00
AA branch: Minor optimisations for Debug builds
This commit is contained in:
parent
0bf90770b0
commit
5bf30bd6c4
13
imgui.cpp
13
imgui.cpp
@ -8981,8 +8981,8 @@ void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32
|
||||
// Temporary buffer
|
||||
GTempPolyData.resize(points_count * 3);
|
||||
ImVec2* temp_inner = >empPolyData[0];
|
||||
ImVec2* temp_outer = >empPolyData[points_count];
|
||||
ImVec2* temp_normals = >empPolyData[points_count * 2];
|
||||
ImVec2* temp_outer = temp_inner + points_count;
|
||||
ImVec2* temp_normals = temp_inner + points_count * 2;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
@ -9095,8 +9095,9 @@ void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_coun
|
||||
// Temporary buffer
|
||||
GTempPolyData.resize(points_count * 3);
|
||||
ImVec2* temp_inner = >empPolyData[0];
|
||||
ImVec2* temp_outer = >empPolyData[points_count];
|
||||
ImVec2* temp_normals = >empPolyData[points_count * 2];
|
||||
ImVec2* temp_outer = temp_inner + points_count;
|
||||
ImVec2* temp_normals = temp_inner + points_count + 2;
|
||||
|
||||
for (int i = 0, j = points_count-1; i < points_count; j=i++)
|
||||
{
|
||||
const ImVec2& v0 = points[j];
|
||||
@ -9239,9 +9240,9 @@ void ImDrawList::Rect(const ImVec2& a, const ImVec2& b, float rounding, int roun
|
||||
|
||||
if (r == 0.0f || rounding_corners == 0)
|
||||
{
|
||||
LineTo(ImVec2(a.x,a.y));
|
||||
LineTo(a);
|
||||
LineTo(ImVec2(b.x,a.y));
|
||||
LineTo(ImVec2(b.x,b.y));
|
||||
LineTo(b);
|
||||
LineTo(ImVec2(a.x,b.y));
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user