diff --git a/imgui_draw.cpp b/imgui_draw.cpp index c6fd3a39cdf2f..1c0eeb0c9a10e 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -2577,13 +2577,13 @@ void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32 const int arc_count = (round_join ? points_count - (polyline.closed ? 0 : 1) : 0) + (!polyline.closed && round_cap ? 2 : 0); #if defined(IMGUI_ENABLE_SSE) -#define IM_POLYLINE_TMP_BUFFER_ROUND_UP(count, size) (((count) * (size) + sizeof(__m128) - 1) / sizeof(ImVec2)) +#define IM_POLYLINE_TEMP_BUFFER_ROUND_UP(count, size) (((count) * (size) + sizeof(__m128) - 1) / sizeof(ImVec2)) #else -#define IM_POLYLINE_TMP_BUFFER_ROUND_UP(count, size) (count) +#define IM_POLYLINE_TEMP_BUFFER_ROUND_UP(count, size) (count) #endif - const int normal_count = IM_POLYLINE_TMP_BUFFER_ROUND_UP(points_count, sizeof(ImVec2)); - const int segment_length_sqr_count = IM_POLYLINE_TMP_BUFFER_ROUND_UP(points_count + 1, sizeof(float)); + const int normal_count = IM_POLYLINE_TEMP_BUFFER_ROUND_UP(points_count, sizeof(ImVec2)); + const int segment_length_sqr_count = IM_POLYLINE_TEMP_BUFFER_ROUND_UP(points_count + 1, sizeof(float)); this->_Data->TempBuffer.reserve_discard(normal_count + segment_length_sqr_count + arc_count * sizeof(ImDrawListPolylineArc) / 3); // 'count' normals and 'count + 1 + 1 (to round up)' segment lengths ImVec2* normals = this->_Data->TempBuffer.Data;