Commit f0005a1d by Alexis Hetu Committed by Alexis Hétu

Android build fix

"false" could not be converted to a pointer type. Changed it to nullptr. Also changed a few other "return 0" to "return nullptr". Change-Id: Idd4573d4627bb89f1b79e3b21de5af5bd6063916 Reviewed-on: https://swiftshader-review.googlesource.com/7357Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 2a19855f
......@@ -1170,12 +1170,12 @@ const TFunction* TParseContext::findFunction(const TSourceLoc &line, TFunction*
if (symbol == 0) {
error(line, "no matching overloaded function found", call->getName().c_str());
return 0;
return nullptr;
}
if (!symbol->isFunction()) {
error(line, "function name expected", call->getName().c_str());
return 0;
return nullptr;
}
return static_cast<const TFunction*>(symbol);
......@@ -2088,7 +2088,7 @@ TIntermTyped* TParseContext::addConstructor(TIntermNode* arguments, const TType*
if(!argType.sameElementType(*type))
{
error(line, "Array constructor argument has an incorrect type", "Error");
return false;
return nullptr;
}
}
}
......@@ -2104,7 +2104,7 @@ TIntermTyped* TParseContext::addConstructor(TIntermNode* arguments, const TType*
error(line, "Structure constructor arguments do not match structure fields", "Error");
recover();
return 0;
return nullptr;
}
}
}
......@@ -2133,12 +2133,12 @@ TIntermTyped* TParseContext::foldConstConstructor(TIntermAggregate* aggrNode, co
returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), type);
}
if (returnVal)
return 0;
return nullptr;
return intermediate.addConstantUnion(unionArray, type, aggrNode->getLine());
}
return 0;
return nullptr;
}
//
......@@ -2164,7 +2164,7 @@ TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTy
error(line, "Cannot offset into the vector", "Error");
recover();
return 0;
return nullptr;
}
ConstantUnion* constArray = new ConstantUnion[fields.num];
......@@ -2215,7 +2215,7 @@ TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, c
error(line, "Cannot offset into the matrix", "Error");
recover();
return 0;
return nullptr;
}
return typedNode;
......@@ -2253,7 +2253,7 @@ TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, co
error(line, "Cannot offset into the array", "Error");
recover();
return 0;
return nullptr;
}
return typedNode;
......@@ -2288,7 +2288,7 @@ TIntermTyped* TParseContext::addConstStruct(const TString& identifier, TIntermTy
error(line, "Cannot offset into the structure", "Error");
recover();
return 0;
return nullptr;
}
return typedNode;
......
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