Commit adcf0ae6 by Luc Ferron Committed by Commit Bot

Replace all NULL with nullptr

Bug: angleproject:1695 Change-Id: Ide0591ffdad5815385a4d805b320a32533bcc03a Reviewed-on: https://chromium-review.googlesource.com/883681Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Luc Ferron <lucferron@google.com>
parent 7e9b13b5
...@@ -3203,7 +3203,7 @@ yyreduce: ...@@ -3203,7 +3203,7 @@ yyreduce:
{ {
ES3_OR_NEWER((yyvsp[-3].lex).string->c_str(), (yylsp[-4]), "interface blocks"); ES3_OR_NEWER((yyvsp[-3].lex).string->c_str(), (yylsp[-4]), "interface blocks");
(yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-4].interm.typeQualifierBuilder), (yylsp[-3]), *(yyvsp[-3].lex).string, (yyvsp[-2].interm.fieldList), NULL, (yyloc), NULL, (yyloc)); (yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-4].interm.typeQualifierBuilder), (yylsp[-3]), *(yyvsp[-3].lex).string, (yyvsp[-2].interm.fieldList), nullptr, (yyloc), nullptr, (yyloc));
} }
break; break;
...@@ -3212,7 +3212,7 @@ yyreduce: ...@@ -3212,7 +3212,7 @@ yyreduce:
{ {
ES3_OR_NEWER((yyvsp[-4].lex).string->c_str(), (yylsp[-5]), "interface blocks"); ES3_OR_NEWER((yyvsp[-4].lex).string->c_str(), (yylsp[-5]), "interface blocks");
(yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-5].interm.typeQualifierBuilder), (yylsp[-4]), *(yyvsp[-4].lex).string, (yyvsp[-3].interm.fieldList), (yyvsp[-1].lex).string, (yylsp[-1]), NULL, (yyloc)); (yyval.interm.intermNode) = context->addInterfaceBlock(*(yyvsp[-5].interm.typeQualifierBuilder), (yylsp[-4]), *(yyvsp[-4].lex).string, (yyvsp[-3].interm.fieldList), (yyvsp[-1].lex).string, (yylsp[-1]), nullptr, (yyloc));
} }
break; break;
......
...@@ -3006,7 +3006,7 @@ TextureStorage *Renderer9::createTextureStorage2DMultisample(GLenum internalform ...@@ -3006,7 +3006,7 @@ TextureStorage *Renderer9::createTextureStorage2DMultisample(GLenum internalform
// 2D multisampled textures are not supported by the D3D9 backend. // 2D multisampled textures are not supported by the D3D9 backend.
UNREACHABLE(); UNREACHABLE();
return NULL; return nullptr;
} }
bool Renderer9::getLUID(LUID *adapterLuid) const bool Renderer9::getLUID(LUID *adapterLuid) const
......
...@@ -2922,7 +2922,7 @@ bool ValidateFramebufferTextureBase(Context *context, ...@@ -2922,7 +2922,7 @@ bool ValidateFramebufferTextureBase(Context *context,
{ {
gl::Texture *tex = context->getTexture(texture); gl::Texture *tex = context->getTexture(texture);
if (tex == NULL) if (tex == nullptr)
{ {
context->handleError(InvalidOperation()); context->handleError(InvalidOperation());
return false; return false;
......
...@@ -223,26 +223,26 @@ class MultiviewRenderTestBase : public MultiviewDrawTest ...@@ -223,26 +223,26 @@ class MultiviewRenderTestBase : public MultiviewDrawTest
int textureWidth = viewWidth * numViews; int textureWidth = viewWidth * numViews;
glBindTexture(GL_TEXTURE_2D, mColorTexture); glBindTexture(GL_TEXTURE_2D, mColorTexture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, textureWidth, height, 0, GL_RGBA, glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, textureWidth, height, 0, GL_RGBA,
GL_UNSIGNED_BYTE, NULL); GL_UNSIGNED_BYTE, nullptr);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glBindTexture(GL_TEXTURE_2D, mDepthTexture); glBindTexture(GL_TEXTURE_2D, mDepthTexture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, textureWidth, height, 0, glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, textureWidth, height, 0,
GL_DEPTH_COMPONENT, GL_FLOAT, NULL); GL_DEPTH_COMPONENT, GL_FLOAT, nullptr);
glBindTexture(GL_TEXTURE_2D, 0); glBindTexture(GL_TEXTURE_2D, 0);
break; break;
} }
case GL_FRAMEBUFFER_MULTIVIEW_LAYERED_ANGLE: case GL_FRAMEBUFFER_MULTIVIEW_LAYERED_ANGLE:
glBindTexture(GL_TEXTURE_2D_ARRAY, mColorTexture); glBindTexture(GL_TEXTURE_2D_ARRAY, mColorTexture);
glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_RGBA8, viewWidth, height, numLayers, 0, glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_RGBA8, viewWidth, height, numLayers, 0,
GL_RGBA, GL_UNSIGNED_BYTE, NULL); GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glBindTexture(GL_TEXTURE_2D_ARRAY, mDepthTexture); glBindTexture(GL_TEXTURE_2D_ARRAY, mDepthTexture);
glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_DEPTH_COMPONENT32F, viewWidth, height, glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_DEPTH_COMPONENT32F, viewWidth, height,
numLayers, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL); numLayers, 0, GL_DEPTH_COMPONENT, GL_FLOAT, nullptr);
glBindTexture(GL_TEXTURE_2D_ARRAY, 0); glBindTexture(GL_TEXTURE_2D_ARRAY, 0);
break; break;
default: default:
...@@ -483,7 +483,7 @@ class MultiviewRenderPrimitiveTest : public MultiviewRenderTest ...@@ -483,7 +483,7 @@ class MultiviewRenderPrimitiveTest : public MultiviewRenderTest
glBufferData(GL_ARRAY_BUFFER, vertexData.size() * sizeof(Vector2), vertexData.data(), glBufferData(GL_ARRAY_BUFFER, vertexData.size() * sizeof(Vector2), vertexData.data(),
GL_STATIC_DRAW); GL_STATIC_DRAW);
glEnableVertexAttribArray(0); glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, nullptr);
} }
void checkGreenChannel(const GLubyte expectedGreenChannelData[]) void checkGreenChannel(const GLubyte expectedGreenChannelData[])
...@@ -1703,7 +1703,7 @@ TEST_P(MultiviewSideBySideRenderTest, NoLeakingFragments) ...@@ -1703,7 +1703,7 @@ TEST_P(MultiviewSideBySideRenderTest, NoLeakingFragments)
glBufferData(GL_ARRAY_BUFFER, vertexDataInClipSpace.size() * sizeof(Vector2), glBufferData(GL_ARRAY_BUFFER, vertexDataInClipSpace.size() * sizeof(Vector2),
vertexDataInClipSpace.data(), GL_STATIC_DRAW); vertexDataInClipSpace.data(), GL_STATIC_DRAW);
glEnableVertexAttribArray(0); glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, NULL); glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, nullptr);
// Test rendering points. // Test rendering points.
{ {
......
...@@ -182,11 +182,11 @@ void MultiviewBenchmark::initializeBenchmark() ...@@ -182,11 +182,11 @@ void MultiviewBenchmark::initializeBenchmark()
glBindTexture(GL_TEXTURE_2D, mColorTexture); glBindTexture(GL_TEXTURE_2D, mColorTexture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, params->windowWidth, params->windowHeight, 0, GL_RGBA, glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, params->windowWidth, params->windowHeight, 0, GL_RGBA,
GL_UNSIGNED_BYTE, NULL); GL_UNSIGNED_BYTE, nullptr);
glBindTexture(GL_TEXTURE_2D, mDepthTexture); glBindTexture(GL_TEXTURE_2D, mDepthTexture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, params->windowWidth, params->windowHeight, glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, params->windowWidth, params->windowHeight,
0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL); 0, GL_DEPTH_COMPONENT, GL_FLOAT, nullptr);
glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer); glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer);
......
...@@ -272,7 +272,7 @@ TEST_F(LocationTest, LineOverflowRegular) ...@@ -272,7 +272,7 @@ TEST_F(LocationTest, LineOverflowRegular)
{ {
const char *str = "#line 0x7FFFFFFF\n\n"; const char *str = "#line 0x7FFFFFFF\n\n";
ASSERT_TRUE(mPreprocessor.init(1, &str, NULL)); ASSERT_TRUE(mPreprocessor.init(1, &str, nullptr));
using testing::_; using testing::_;
// Error reported about EOF. // Error reported about EOF.
...@@ -287,7 +287,7 @@ TEST_F(LocationTest, LineOverflowInComment) ...@@ -287,7 +287,7 @@ TEST_F(LocationTest, LineOverflowInComment)
{ {
const char *str = "#line 0x7FFFFFFF\n/*\n*/"; const char *str = "#line 0x7FFFFFFF\n/*\n*/";
ASSERT_TRUE(mPreprocessor.init(1, &str, NULL)); ASSERT_TRUE(mPreprocessor.init(1, &str, nullptr));
using testing::_; using testing::_;
// Error reported about EOF. // Error reported about EOF.
...@@ -303,7 +303,7 @@ TEST_F(LocationTest, LineOverflowInContinuationN) ...@@ -303,7 +303,7 @@ TEST_F(LocationTest, LineOverflowInContinuationN)
{ {
const char *str = "#line 0x7FFFFFFF\n \\\n\n"; const char *str = "#line 0x7FFFFFFF\n \\\n\n";
ASSERT_TRUE(mPreprocessor.init(1, &str, NULL)); ASSERT_TRUE(mPreprocessor.init(1, &str, nullptr));
using testing::_; using testing::_;
// Error reported about EOF. // Error reported about EOF.
...@@ -319,7 +319,7 @@ TEST_F(LocationTest, LineOverflowInContinuationRN) ...@@ -319,7 +319,7 @@ TEST_F(LocationTest, LineOverflowInContinuationRN)
{ {
const char *str = "#line 0x7FFFFFFF\n \\\r\n\n"; const char *str = "#line 0x7FFFFFFF\n \\\r\n\n";
ASSERT_TRUE(mPreprocessor.init(1, &str, NULL)); ASSERT_TRUE(mPreprocessor.init(1, &str, nullptr));
using testing::_; using testing::_;
// Error reported about EOF. // Error reported about EOF.
......
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