1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

LibGL: Clean up reading floats and doubles from pointers

No functional changes, just removal of superfluous braces.
This commit is contained in:
Jelle Raaijmakers 2022-03-06 01:40:15 +01:00 committed by Andreas Kling
parent 4450aef175
commit c91e86e020

View file

@ -2467,18 +2467,16 @@ void SoftwareGLContext::read_from_vertex_attribute_pointer(VertexAttribPointer c
if (stride == 0)
stride = sizeof(GLfloat) * attrib.size;
for (int i = 0; i < attrib.size; i++) {
for (int i = 0; i < attrib.size; i++)
elements[i] = *(reinterpret_cast<const GLfloat*>(byte_ptr + stride * index) + i);
}
break;
}
case GL_DOUBLE: {
if (stride == 0)
stride = sizeof(GLdouble) * attrib.size;
for (int i = 0; i < attrib.size; i++) {
for (int i = 0; i < attrib.size; i++)
elements[i] = static_cast<float>(*(reinterpret_cast<const GLdouble*>(byte_ptr + stride * index) + i));
}
break;
}
}