spring/spring-104.0-reinterpret_cast-in-constexpr.patch

16 lines
746 B
Diff
Raw Permalink Normal View History

diff --git a/rts/Rendering/GL/myGL.cpp b/rts/Rendering/GL/myGL.cpp
index 5abef32ce0..95a786970c 100644
--- a/rts/Rendering/GL/myGL.cpp
+++ b/rts/Rendering/GL/myGL.cpp
@@ -146,8 +147,8 @@ static bool GetVideoMemInfoMESA(GLint* memInfo)
typedef PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC QCRIProc;
- static constexpr const GLubyte* qcriProcName = (const GLubyte*) "glXQueryCurrentRendererIntegerMESA";
- static const QCRIProc qcriProcAddr = (QCRIProc) glXGetProcAddress(qcriProcName);
+ static const char qcriProcName[] = "glXQueryCurrentRendererIntegerMESA";
+ static const QCRIProc qcriProcAddr = (QCRIProc) glXGetProcAddress(reinterpret_cast<const GLubyte*>(qcriProcName));
if (qcriProcAddr == nullptr)
return false;