Commit 3eabac0a by Nicolas Capens

Fix C++11 strict string literal const correctness.

String literals are const in C++11, and should only be assigned to const pointers. Bug swiftshader:33 Change-Id: Iefe0a1c06d58dffb69d7fbe199a2f0aa8bf3bcb1 Reviewed-on: https://swiftshader-review.googlesource.com/8990Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent c06d11cd
...@@ -197,7 +197,7 @@ void Shader::compile() ...@@ -197,7 +197,7 @@ void Shader::compile()
TranslatorASM *compiler = createCompiler(getType()); TranslatorASM *compiler = createCompiler(getType());
// Ensure we don't pass a nullptr source to the compiler // Ensure we don't pass a nullptr source to the compiler
char *source = "\0"; const char *source = "\0";
if(mSource) if(mSource)
{ {
source = mSource; source = mSource;
......
...@@ -37,7 +37,7 @@ Inspired by http://www.cs.rit.edu/~ncs/Courses/570/UserGuide/OpenGLonWin-11.html ...@@ -37,7 +37,7 @@ Inspired by http://www.cs.rit.edu/~ncs/Courses/570/UserGuide/OpenGLonWin-11.html
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
const char *className = "OpenGL"; const char *className = "OpenGL";
char *windowName = "OpenGL Cube"; const char *windowName = "OpenGL Cube";
int winX = 0, winY = 0; int winX = 0, winY = 0;
int winWidth = 300, winHeight = 300; int winWidth = 300, winHeight = 300;
float angle = 0.1f; float angle = 0.1f;
......
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