From c91e86e02049885fa71cfd5712f27765e4ce5b52 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 6 Mar 2022 01:40:15 +0100 Subject: [PATCH] LibGL: Clean up reading floats and doubles from pointers No functional changes, just removal of superfluous braces. --- Userland/Libraries/LibGL/SoftwareGLContext.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index 9d0fef9c94..820c262cdc 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -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(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(*(reinterpret_cast(byte_ptr + stride * index) + i)); - } break; } }