Commit 08e90f0c by Nicolas Capens Committed by Nicolas Capens

Fix C++11 compilation errors.

Don't rely on friend method injection, and avoid prefixing constants with strings. Change-Id: Ide6ab73d13ba3e3534e47323b21f6e5e3ea9d0ab Reviewed-on: https://swiftshader-review.googlesource.com/1462Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent ba0716cc
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
<Add option="-Wall" /> <Add option="-Wall" />
<Add option="-fexceptions" /> <Add option="-fexceptions" />
<Add option="-fno-operator-names" /> <Add option="-fno-operator-names" />
<Add option="-ffriend-injection" />
<Add option="-msse2" /> <Add option="-msse2" />
<Add option="-D__STDC_LIMIT_MACROS" /> <Add option="-D__STDC_LIMIT_MACROS" />
<Add option="-D__STDC_CONSTANT_MACROS" /> <Add option="-D__STDC_CONSTANT_MACROS" />
......
...@@ -31,21 +31,21 @@ namespace es ...@@ -31,21 +31,21 @@ namespace es
#if defined(ANGLE_DISABLE_TRACE) #if defined(ANGLE_DISABLE_TRACE)
#define TRACE(message, ...) (void(0)) #define TRACE(message, ...) (void(0))
#else #else
#define TRACE(message, ...) es::trace("trace: %s(%d): "message"\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) #define TRACE(message, ...) es::trace("trace: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
#endif #endif
// A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing. // A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing.
#if defined(ANGLE_DISABLE_TRACE) #if defined(ANGLE_DISABLE_TRACE)
#define FIXME(message, ...) (void(0)) #define FIXME(message, ...) (void(0))
#else #else
#define FIXME(message, ...) do {es::trace("fixme: %s(%d): "message"\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); assert(false);} while(false) #define FIXME(message, ...) do {es::trace("fixme: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); assert(false);} while(false)
#endif #endif
// A macro to output a function call and its arguments to the debugging log, in case of error. // A macro to output a function call and its arguments to the debugging log, in case of error.
#if defined(ANGLE_DISABLE_TRACE) #if defined(ANGLE_DISABLE_TRACE)
#define ERR(message, ...) (void(0)) #define ERR(message, ...) (void(0))
#else #else
#define ERR(message, ...) do {es::trace("err: %s(%d): "message"\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); assert(false);} while(false) #define ERR(message, ...) do {es::trace("err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); assert(false);} while(false)
#endif #endif
// A macro asserting a condition and outputting failures to the debug log // A macro asserting a condition and outputting failures to the debug log
......
...@@ -205,7 +205,7 @@ const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name) ...@@ -205,7 +205,7 @@ const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name)
case EGL_VENDOR: case EGL_VENDOR:
return success("TransGaming Inc."); return success("TransGaming Inc.");
case EGL_VERSION: case EGL_VERSION:
return success("1.4 SwiftShader "VERSION_STRING); return success("1.4 SwiftShader " VERSION_STRING);
} }
return error(EGL_BAD_PARAMETER, (const char*)NULL); return error(EGL_BAD_PARAMETER, (const char*)NULL);
......
...@@ -106,7 +106,6 @@ ...@@ -106,7 +106,6 @@
<Add option="-Wall" /> <Add option="-Wall" />
<Add option="-fexceptions" /> <Add option="-fexceptions" />
<Add option="-fno-operator-names" /> <Add option="-fno-operator-names" />
<Add option="-ffriend-injection" />
<Add option="-msse2" /> <Add option="-msse2" />
<Add option="-D__STDC_LIMIT_MACROS" /> <Add option="-D__STDC_LIMIT_MACROS" />
<Add option="-D__STDC_CONSTANT_MACROS" /> <Add option="-D__STDC_CONSTANT_MACROS" />
...@@ -163,9 +162,7 @@ ...@@ -163,9 +162,7 @@
<Unit filename="../../Main/Register.hpp" /> <Unit filename="../../Main/Register.hpp" />
<Unit filename="../../Main/SwiftConfig.cpp" /> <Unit filename="../../Main/SwiftConfig.cpp" />
<Unit filename="../../Main/SwiftConfig.hpp" /> <Unit filename="../../Main/SwiftConfig.hpp" />
<Unit filename="../../Main/crc.c"> <Unit filename="../../Main/crc.cpp" />
<Option compilerVar="CC" />
</Unit>
<Unit filename="../../Main/crc.h" /> <Unit filename="../../Main/crc.h" />
<Unit filename="../../Main/serialcommon.h" /> <Unit filename="../../Main/serialcommon.h" />
<Unit filename="../../Main/serialvalid.cpp" /> <Unit filename="../../Main/serialvalid.cpp" />
......
...@@ -3406,9 +3406,9 @@ const GLubyte* GL_APIENTRY glGetString(GLenum name) ...@@ -3406,9 +3406,9 @@ const GLubyte* GL_APIENTRY glGetString(GLenum name)
case GL_RENDERER: case GL_RENDERER:
return (GLubyte*)"SwiftShader"; return (GLubyte*)"SwiftShader";
case GL_VERSION: case GL_VERSION:
return (GLubyte*)"OpenGL ES 2.0 SwiftShader "VERSION_STRING; return (GLubyte*)"OpenGL ES 2.0 SwiftShader " VERSION_STRING;
case GL_SHADING_LANGUAGE_VERSION: case GL_SHADING_LANGUAGE_VERSION:
return (GLubyte*)"OpenGL ES GLSL ES 1.00 SwiftShader "VERSION_STRING; return (GLubyte*)"OpenGL ES GLSL ES 1.00 SwiftShader " VERSION_STRING;
case GL_EXTENSIONS: case GL_EXTENSIONS:
// Keep list sorted in following order: // Keep list sorted in following order:
// OES extensions // OES extensions
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment