Commit 33151a53 by Yunchao He Committed by Commit Bot

Code refactoring: remove unneeded variables

BUG=angleproject:1996 Change-Id: If635bf836251f90ec40d791b5f80d43f751aad9b Reviewed-on: https://chromium-review.googlesource.com/476079 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent d1bed175
......@@ -5232,7 +5232,10 @@ bool ValidateGetFramebufferAttachmentParameteriv(ValidationContext *context,
GLsizei *numParams)
{
// Only one parameter is returned from glGetFramebufferAttachmentParameteriv
*numParams = 1;
if (numParams)
{
*numParams = 1;
}
if (!ValidFramebufferTarget(target))
{
......@@ -5546,7 +5549,10 @@ bool ValidateGetBufferParameteri64vRobustANGLE(ValidationContext *context,
bool ValidateGetProgramiv(Context *context, GLuint program, GLenum pname, GLsizei *numParams)
{
// Currently, all GetProgramiv queries return 1 parameter
*numParams = 1;
if (numParams)
{
*numParams = 1;
}
Program *programObject = GetValidProgram(context, program);
if (!programObject)
......
......@@ -1091,10 +1091,9 @@ void GL_APIENTRY GetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
Context *context = GetValidGlobalContext();
if (context)
{
GLsizei numParams = 0;
if (!context->skipValidation() &&
!ValidateGetFramebufferAttachmentParameteriv(context, target, attachment, pname,
&numParams))
nullptr))
{
return;
}
......@@ -1126,9 +1125,8 @@ void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint* params)
Context *context = GetValidGlobalContext();
if (context)
{
GLsizei numParams = 0;
if (!context->skipValidation() &&
!ValidateGetProgramiv(context, program, pname, &numParams))
!ValidateGetProgramiv(context, program, pname, nullptr))
{
return;
}
......
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