mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Persistently fixing some PVS-Studio static analyzer false positive warnings.
This commit is contained in:
		@@ -689,7 +689,7 @@ void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32
 | 
			
		||||
        PrimReserve(idx_count, vtx_count);
 | 
			
		||||
 | 
			
		||||
        // Temporary buffer
 | 
			
		||||
        ImVec2* temp_normals = (ImVec2*)alloca(points_count * (thick_line ? 5 : 3) * sizeof(ImVec2));
 | 
			
		||||
        ImVec2* temp_normals = (ImVec2*)alloca(points_count * (thick_line ? 5 : 3) * sizeof(ImVec2)); //-V630
 | 
			
		||||
        ImVec2* temp_points = temp_normals + points_count;
 | 
			
		||||
 | 
			
		||||
        for (int i1 = 0; i1 < count; i1++)
 | 
			
		||||
@@ -880,7 +880,7 @@ void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_coun
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Compute normals
 | 
			
		||||
        ImVec2* temp_normals = (ImVec2*)alloca(points_count * sizeof(ImVec2));
 | 
			
		||||
        ImVec2* temp_normals = (ImVec2*)alloca(points_count * sizeof(ImVec2)); //-V630
 | 
			
		||||
        for (int i0 = points_count-1, i1 = 0; i1 < points_count; i0 = i1++)
 | 
			
		||||
        {
 | 
			
		||||
            const ImVec2& p0 = points[i0];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user