Refactoring: replace NULL by nullptr for pointers (2nd CL).
This CL mainly handles the pointer comparisons (== or !=).
BUG=angleproject:2001
Change-Id: I25ac3b61032e7ad91459a1c6541cadc87cf9b160
Reviewed-on: https://chromium-review.googlesource.com/483935
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/OutputGLSLBase.cpp b/src/compiler/translator/OutputGLSLBase.cpp
index fee3836..4d8e03e 100644
--- a/src/compiler/translator/OutputGLSLBase.cpp
+++ b/src/compiler/translator/OutputGLSLBase.cpp
@@ -368,7 +368,7 @@
for (TIntermSequence::const_iterator iter = args.begin(); iter != args.end(); ++iter)
{
const TIntermSymbol *arg = (*iter)->getAsSymbolNode();
- ASSERT(arg != NULL);
+ ASSERT(arg != nullptr);
const TType &type = arg->getType();
writeVariableType(type);
@@ -398,7 +398,7 @@
for (size_t i = 0; i < fields.size(); ++i)
{
const TType *fieldType = fields[i]->type();
- ASSERT(fieldType != NULL);
+ ASSERT(fieldType != nullptr);
pConstUnion = writeConstantUnion(*fieldType, pConstUnion);
if (i != fields.size() - 1)
out << ", ";
@@ -1090,7 +1090,7 @@
else if (loopType == ELoopWhile) // while loop
{
out << "while (";
- ASSERT(node->getCondition() != NULL);
+ ASSERT(node->getCondition() != nullptr);
node->getCondition()->traverse(this);
out << ")\n";
@@ -1104,7 +1104,7 @@
visitCodeBlock(node->getBody());
out << "while (";
- ASSERT(node->getCondition() != NULL);
+ ASSERT(node->getCondition() != nullptr);
node->getCondition()->traverse(this);
out << ");\n";
}
@@ -1140,7 +1140,7 @@
void TOutputGLSLBase::visitCodeBlock(TIntermBlock *node)
{
TInfoSinkBase &out = objSink();
- if (node != NULL)
+ if (node != nullptr)
{
node->traverse(this);
// Single statements not part of a sequence need to be terminated
@@ -1192,7 +1192,7 @@
TString TOutputGLSLBase::hashVariableName(const TName &name)
{
- if (mSymbolTable.findBuiltIn(name.getString(), mShaderVersion) != NULL)
+ if (mSymbolTable.findBuiltIn(name.getString(), mShaderVersion) != nullptr)
{
if (mCompileOptions & SH_TRANSLATE_VIEWID_OVR_TO_UNIFORM &&
name.getString() == "gl_ViewID_OVR")