diff options
author | hbina085 <hanif.ariffin.4326@gmail.com> | 2019-07-11 23:06:58 -0400 |
---|---|---|
committer | hbina085 <hanif.ariffin.4326@gmail.com> | 2019-07-11 23:06:58 -0400 |
commit | 26c0609656db0eff07bde5d0723f8ed2111b7878 (patch) | |
tree | 317efe3c1136ed805fdf23f0e76ba99fac3350ff | |
parent | 3045697e4b808a8d5a440517dbb8f90a3f0f9a93 (diff) |
Make the default return value on crash explicit
Noticed that the error condition will return a NULL instead of something more explicit like "false".
Should make the code more readable at a glance.
-rw-r--r-- | servers/visual/shader_language.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 886c0c0b00..e0be58d0c1 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -2054,11 +2054,11 @@ const ShaderLanguage::BuiltinFuncOutArgs ShaderLanguage::builtin_func_out_args[] bool ShaderLanguage::_validate_function_call(BlockNode *p_block, OperatorNode *p_func, DataType *r_ret_type) { - ERR_FAIL_COND_V(p_func->op != OP_CALL && p_func->op != OP_CONSTRUCT, NULL); + ERR_FAIL_COND_V(p_func->op != OP_CALL && p_func->op != OP_CONSTRUCT, false); Vector<DataType> args; - ERR_FAIL_COND_V(p_func->arguments[0]->type != Node::TYPE_VARIABLE, NULL); + ERR_FAIL_COND_V(p_func->arguments[0]->type != Node::TYPE_VARIABLE, false); StringName name = static_cast<VariableNode *>(p_func->arguments[0])->name.operator String(); |