Commit f0ca9a0c by Corentin Wallez

Remove the usage of some c++11 library features

That were causing compilation error in Chromium Mac builds BUG=angleproject:891 Change-Id: I45777451b300928e8c8d232a5b7ecffa7f1c3cbe Reviewed-on: https://chromium-review.googlesource.com/299721Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 178e5974
...@@ -1151,14 +1151,14 @@ TEST_P(GLSLTest, VerifyMaxVertexUniformVectors) ...@@ -1151,14 +1151,14 @@ TEST_P(GLSLTest, VerifyMaxVertexUniformVectors)
for (int i = 0; i < maxUniforms; i++) for (int i = 0; i < maxUniforms; i++)
{ {
vshaderSource << "uniform vec4 v" << std::to_string(i) << ";\n"; vshaderSource << "uniform vec4 v" << i << ";\n";
} }
vshaderSource << "void main()\n{\n"; vshaderSource << "void main()\n{\n";
for (int i = 0; i < maxUniforms; i++) for (int i = 0; i < maxUniforms; i++)
{ {
vshaderSource << " gl_Position += v" << std::to_string(i) << ";\n"; vshaderSource << " gl_Position += v" << i << ";\n";
} }
vshaderSource << "}\n"; vshaderSource << "}\n";
...@@ -1192,14 +1192,14 @@ TEST_P(GLSLTest, VerifyMaxVertexUniformVectorsExceeded) ...@@ -1192,14 +1192,14 @@ TEST_P(GLSLTest, VerifyMaxVertexUniformVectorsExceeded)
for (int i = 0; i < maxUniforms; i++) for (int i = 0; i < maxUniforms; i++)
{ {
vshaderSource << "uniform vec4 v" << std::to_string(i) << ";\n"; vshaderSource << "uniform vec4 v" << i << ";\n";
} }
vshaderSource << "void main()\n{\n"; vshaderSource << "void main()\n{\n";
for (int i = 0; i < maxUniforms; i++) for (int i = 0; i < maxUniforms; i++)
{ {
vshaderSource << " gl_Position += v" << std::to_string(i) << ";\n"; vshaderSource << " gl_Position += v" << i << ";\n";
} }
vshaderSource << "}\n"; vshaderSource << "}\n";
...@@ -1231,14 +1231,14 @@ TEST_P(GLSLTest, VerifyMaxFragmentUniformVectorsFragment) ...@@ -1231,14 +1231,14 @@ TEST_P(GLSLTest, VerifyMaxFragmentUniformVectorsFragment)
for (int i = 0; i < maxUniforms; i++) for (int i = 0; i < maxUniforms; i++)
{ {
fshaderSource << "uniform vec4 v" << std::to_string(i) << ";\n"; fshaderSource << "uniform vec4 v" << i << ";\n";
} }
fshaderSource << "void main()\n{\n"; fshaderSource << "void main()\n{\n";
for (int i = 0; i < maxUniforms; i++) for (int i = 0; i < maxUniforms; i++)
{ {
fshaderSource << " gl_FragColor += v" << std::to_string(i) << ";\n"; fshaderSource << " gl_FragColor += v" << i << ";\n";
} }
fshaderSource << "}\n"; fshaderSource << "}\n";
...@@ -1272,14 +1272,14 @@ TEST_P(GLSLTest, VerifyMaxFragmentUniformVectorsFragmentExceeded) ...@@ -1272,14 +1272,14 @@ TEST_P(GLSLTest, VerifyMaxFragmentUniformVectorsFragmentExceeded)
for (int i = 0; i < maxUniforms; i++) for (int i = 0; i < maxUniforms; i++)
{ {
fshaderSource << "uniform vec4 v" << std::to_string(i) << ";\n"; fshaderSource << "uniform vec4 v" << i << ";\n";
} }
fshaderSource << "void main()\n{\n"; fshaderSource << "void main()\n{\n";
for (int i = 0; i < maxUniforms; i++) for (int i = 0; i < maxUniforms; i++)
{ {
fshaderSource << " gl_FragColor += v" << std::to_string(i) << ";\n"; fshaderSource << " gl_FragColor += v" << i << ";\n";
} }
fshaderSource << "}\n"; fshaderSource << "}\n";
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#include "test_utils/ANGLETest.h" #include "test_utils/ANGLETest.h"
#include <array>
using namespace angle; using namespace angle;
namespace namespace
...@@ -114,8 +112,8 @@ class UnpackAlignmentTest : public ANGLETest ...@@ -114,8 +112,8 @@ class UnpackAlignmentTest : public ANGLETest
glGetIntegerv(GL_UNPACK_ALIGNMENT, &readbackAlignment); glGetIntegerv(GL_UNPACK_ALIGNMENT, &readbackAlignment);
EXPECT_EQ(alignment, readbackAlignment); EXPECT_EQ(alignment, readbackAlignment);
std::array<GLubyte, 1024> buf; GLubyte buf[1024];
std::fill(buf.begin(), buf.end(), 0); memset(buf, 0, sizeof(buf));
unsigned int pixelSize; unsigned int pixelSize;
getPixelSize(format, type, &pixelSize); getPixelSize(format, type, &pixelSize);
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#include "test_utils/ANGLETest.h" #include "test_utils/ANGLETest.h"
#include <array>
using namespace angle; using namespace angle;
namespace namespace
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
static std::string ReadFileToString(const std::string &source) static std::string ReadFileToString(const std::string &source)
{ {
std::ifstream stream(source); std::ifstream stream(source.c_str());
if (!stream) if (!stream)
{ {
std::cerr << "Failed to load shader file: " << source; std::cerr << "Failed to load shader file: " << source;
......
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