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, ...@@ -5232,7 +5232,10 @@ bool ValidateGetFramebufferAttachmentParameteriv(ValidationContext *context,
GLsizei *numParams) GLsizei *numParams)
{ {
// Only one parameter is returned from glGetFramebufferAttachmentParameteriv // Only one parameter is returned from glGetFramebufferAttachmentParameteriv
*numParams = 1; if (numParams)
{
*numParams = 1;
}
if (!ValidFramebufferTarget(target)) if (!ValidFramebufferTarget(target))
{ {
...@@ -5546,7 +5549,10 @@ bool ValidateGetBufferParameteri64vRobustANGLE(ValidationContext *context, ...@@ -5546,7 +5549,10 @@ bool ValidateGetBufferParameteri64vRobustANGLE(ValidationContext *context,
bool ValidateGetProgramiv(Context *context, GLuint program, GLenum pname, GLsizei *numParams) bool ValidateGetProgramiv(Context *context, GLuint program, GLenum pname, GLsizei *numParams)
{ {
// Currently, all GetProgramiv queries return 1 parameter // Currently, all GetProgramiv queries return 1 parameter
*numParams = 1; if (numParams)
{
*numParams = 1;
}
Program *programObject = GetValidProgram(context, program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
......
...@@ -1091,10 +1091,9 @@ void GL_APIENTRY GetFramebufferAttachmentParameteriv(GLenum target, GLenum attac ...@@ -1091,10 +1091,9 @@ void GL_APIENTRY GetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
GLsizei numParams = 0;
if (!context->skipValidation() && if (!context->skipValidation() &&
!ValidateGetFramebufferAttachmentParameteriv(context, target, attachment, pname, !ValidateGetFramebufferAttachmentParameteriv(context, target, attachment, pname,
&numParams)) nullptr))
{ {
return; return;
} }
...@@ -1126,9 +1125,8 @@ void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint* params) ...@@ -1126,9 +1125,8 @@ void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint* params)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
GLsizei numParams = 0;
if (!context->skipValidation() && if (!context->skipValidation() &&
!ValidateGetProgramiv(context, program, pname, &numParams)) !ValidateGetProgramiv(context, program, pname, nullptr))
{ {
return; 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