desktop/spring/fix-reinterpret_cast-in-constexpr.patch
2018-09-19 02:33:15 +02:00

16 lines
740 B
Diff

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;