Commit 929d7bca by Jamie Madill

Re-land "Fix warnings with ANGLE and VS2015."

With fix for VS2013. BUG=None Change-Id: I9f656efa6b540a03ce21f6b65fde0753c0d72538 Reviewed-on: https://chromium-review.googlesource.com/295157Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 344bd0af
......@@ -23,7 +23,7 @@ Vector2::Vector2(float x, float y)
float Vector2::length(const Vector2 &vec)
{
float lenSquared = lengthSquared(vec);
return (lenSquared != 0.0f) ? sqrt(lenSquared) : 0.0f;
return (lenSquared != 0.0f) ? sqrtf(lenSquared) : 0.0f;
}
float Vector2::lengthSquared(const Vector2 &vec)
......@@ -62,7 +62,7 @@ Vector3::Vector3(float x, float y, float z)
float Vector3::length(const Vector3 &vec)
{
float lenSquared = lengthSquared(vec);
return (lenSquared != 0.0f) ? sqrt(lenSquared) : 0.0f;
return (lenSquared != 0.0f) ? sqrtf(lenSquared) : 0.0f;
}
float Vector3::lengthSquared(const Vector3 &vec)
......@@ -161,7 +161,7 @@ Vector4::Vector4(float x, float y, float z, float w)
float Vector4::length(const Vector4 &vec)
{
float lenSquared = lengthSquared(vec);
return (lenSquared != 0.0f) ? sqrt(lenSquared) : 0.0f;
return (lenSquared != 0.0f) ? sqrtf(lenSquared) : 0.0f;
}
float Vector4::lengthSquared(const Vector4 &vec)
......
......@@ -401,8 +401,8 @@ void PrintVariable(const std::string &prefix, size_t index, const sh::ShaderVari
default: typeName = "UNKNOWN"; break;
}
printf("%s %lu : name=%s, type=%s, arraySize=%u\n",
prefix.c_str(), index, var.name.c_str(), typeName.c_str(), var.arraySize);
printf("%s %u : name=%s, type=%s, arraySize=%u\n", prefix.c_str(),
static_cast<unsigned int>(index), var.name.c_str(), typeName.c_str(), var.arraySize);
if (var.fields.size())
{
std::string structPrefix;
......
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