Replace usages of std::vector::data in most cases.
In some parts of ANGLE code, we were using std::vector::data to get
a pointer to the first element. Sadly, this is c++11 only, which
isn't currently supported on Chromium. This was causing a breakage
on Android. We should probably refrain from using data except on
D3D-only code, which we know will be Visual Studio.
BUG=angle:767
Change-Id: Ibc10577368435a13f62d74d77c95076482cd8f82
Reviewed-on: https://chromium-review.googlesource.com/220920
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/tests/angle_tests/LineLoopTest.cpp b/tests/angle_tests/LineLoopTest.cpp
index 70e84cd..f827e3a 100644
--- a/tests/angle_tests/LineLoopTest.cpp
+++ b/tests/angle_tests/LineLoopTest.cpp
@@ -111,13 +111,13 @@
glDrawElements(GL_LINE_STRIP, 5, GL_UNSIGNED_BYTE, stripIndices);
std::vector<GLubyte> pixels(getWindowWidth() * getWindowHeight() * 4);
- glReadPixels(0, 0, getWindowWidth(), getWindowHeight(), GL_RGBA, GL_UNSIGNED_BYTE, pixels.data());
+ glReadPixels(0, 0, getWindowWidth(), getWindowHeight(), GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0]);
for (int y = 0; y < getWindowHeight(); y++)
{
for (int x = 0; x < getWindowWidth(); x++)
{
- const GLubyte* pixel = pixels.data() + ((y * getWindowWidth() + x) * 4);
+ const GLubyte* pixel = &pixels[0] + ((y * getWindowWidth() + x) * 4);
EXPECT_EQ(pixel[0], 0);
EXPECT_EQ(pixel[1], pixel[2]);