Style: Apply clang-tidy's modernize-use-nullptr

This commit is contained in:
Rémi Verschelde 2021-04-05 14:02:50 +02:00
parent 65a2888057
commit 9bbe51dc27
No known key found for this signature in database
GPG key ID: C3336907360768E1
21 changed files with 50 additions and 50 deletions

View file

@ -6825,7 +6825,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
} else {
_set_tkpos(pos2);
Node *n = _parse_and_reduce_expression(NULL, FunctionInfo());
Node *n = _parse_and_reduce_expression(nullptr, FunctionInfo());
if (!n || n->type != Node::TYPE_CONSTANT || n->get_datatype() != TYPE_INT) {
_set_error("Expected single integer constant > 0");
return ERR_PARSE_ERROR;
@ -6906,7 +6906,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (tk.type == TK_PARENTHESIS_OPEN || curly) { // initialization
while (true) {
Node *n = _parse_and_reduce_expression(NULL, FunctionInfo());
Node *n = _parse_and_reduce_expression(nullptr, FunctionInfo());
if (!n) {
return ERR_PARSE_ERROR;
}
@ -6961,7 +6961,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
constant.initializer = static_cast<ConstantNode *>(expr);
} else {
//variable created with assignment! must parse an expression
Node *expr = _parse_and_reduce_expression(NULL, FunctionInfo());
Node *expr = _parse_and_reduce_expression(nullptr, FunctionInfo());
if (!expr)
return ERR_PARSE_ERROR;
if (expr->type == Node::TYPE_OPERATOR && ((OperatorNode *)expr)->op == OP_CALL) {