Commit aa7e1660 by Ehsan Akhgari Committed by Jamie Madill

Improve the const correctness.

This improvement to the const correctness makes ProgramBinary::save compile with clang-cl as well, which is more strict than MSVC. Change-Id: Iae091643fa1df7f094b89dbe7529c4e173f04a6d Reviewed-on: https://chromium-review.googlesource.com/206714 Tested-by: <ehsan@mozilla.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent b4472275
...@@ -165,7 +165,7 @@ class BinaryOutputStream ...@@ -165,7 +165,7 @@ class BinaryOutputStream
write(v.c_str(), v.length()); write(v.c_str(), v.length());
} }
void writeBytes(unsigned char *bytes, size_t count) void writeBytes(const unsigned char *bytes, size_t count)
{ {
write(bytes, count); write(bytes, count);
} }
......
...@@ -1333,7 +1333,7 @@ bool ProgramBinary::save(void* binary, GLsizei bufSize, GLsizei *length) ...@@ -1333,7 +1333,7 @@ bool ProgramBinary::save(void* binary, GLsizei bufSize, GLsizei *length)
stream.writeInt(GL_PROGRAM_BINARY_ANGLE); stream.writeInt(GL_PROGRAM_BINARY_ANGLE);
stream.writeInt(ANGLE_MAJOR_VERSION); stream.writeInt(ANGLE_MAJOR_VERSION);
stream.writeInt(ANGLE_MINOR_VERSION); stream.writeInt(ANGLE_MINOR_VERSION);
stream.writeBytes(reinterpret_cast<unsigned char*>(ANGLE_COMMIT_HASH), ANGLE_COMMIT_HASH_SIZE); stream.writeBytes(reinterpret_cast<const unsigned char*>(ANGLE_COMMIT_HASH), ANGLE_COMMIT_HASH_SIZE);
stream.writeInt(ANGLE_COMPILE_OPTIMIZATION_LEVEL); stream.writeInt(ANGLE_COMPILE_OPTIMIZATION_LEVEL);
for (unsigned int i = 0; i < MAX_VERTEX_ATTRIBS; ++i) for (unsigned int i = 0; i < MAX_VERTEX_ATTRIBS; ++i)
......
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