diff options
Diffstat (limited to 'servers/rendering/shader_language.h')
| -rw-r--r-- | servers/rendering/shader_language.h | 27 | 
1 files changed, 14 insertions, 13 deletions
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h index bdc15cc4aa..beabae0dda 100644 --- a/servers/rendering/shader_language.h +++ b/servers/rendering/shader_language.h @@ -342,7 +342,7 @@ public:  		virtual String get_datatype_name() const { return ""; }  		Node(Type t) : -				next(NULL), +				next(nullptr),  				type(t) {}  		virtual ~Node() {}  	}; @@ -423,8 +423,8 @@ public:  		ArrayNode() :  				Node(TYPE_ARRAY),  				datatype_cache(TYPE_VOID), -				index_expression(NULL), -				call_expression(NULL), +				index_expression(nullptr), +				call_expression(nullptr),  				is_const(false) {}  	}; @@ -487,6 +487,7 @@ public:  		enum BlockType {  			BLOCK_TYPE_STANDART, +			BLOCK_TYPE_FOR,  			BLOCK_TYPE_SWITCH,  			BLOCK_TYPE_CASE,  			BLOCK_TYPE_DEFAULT, @@ -510,8 +511,8 @@ public:  		BlockNode() :  				Node(TYPE_BLOCK), -				parent_function(NULL), -				parent_block(NULL), +				parent_function(nullptr), +				parent_block(nullptr),  				block_type(BLOCK_TYPE_STANDART),  				block_tag(SubClassTag::TAG_GLOBAL),  				single_statement(false) {} @@ -549,8 +550,8 @@ public:  				basetype_const(false),  				datatype(TYPE_VOID),  				array_size(0), -				owner(NULL), -				index_expression(NULL), +				owner(nullptr), +				index_expression(nullptr),  				has_swizzling_duplicates(false) {}  	}; @@ -591,7 +592,7 @@ public:  				Node(TYPE_FUNCTION),  				return_type(TYPE_VOID),  				return_precision(PRECISION_DEFAULT), -				body(NULL), +				body(nullptr),  				can_discard(false) {}  	}; @@ -732,7 +733,7 @@ public:  	static bool is_token_nonvoid_datatype(TokenType p_type);  	static bool is_token_operator(TokenType p_type); -	static bool convert_constant(ConstantNode *p_constant, DataType p_to_type, ConstantNode::Value *p_value = NULL); +	static bool convert_constant(ConstantNode *p_constant, DataType p_to_type, ConstantNode::Value *p_value = nullptr);  	static DataType get_scalar_type(DataType p_type);  	static int get_cardinality(DataType p_type);  	static bool is_scalar_type(DataType p_type); @@ -824,10 +825,10 @@ private:  		IDENTIFIER_CONSTANT,  	}; -	bool _find_identifier(const BlockNode *p_block, bool p_allow_reassign, const Map<StringName, BuiltInInfo> &p_builtin_types, const StringName &p_identifier, DataType *r_data_type = NULL, IdentifierType *r_type = NULL, bool *r_is_const = NULL, int *r_array_size = NULL, StringName *r_struct_name = NULL); +	bool _find_identifier(const BlockNode *p_block, bool p_allow_reassign, const Map<StringName, BuiltInInfo> &p_builtin_types, const StringName &p_identifier, DataType *r_data_type = nullptr, IdentifierType *r_type = nullptr, bool *r_is_const = nullptr, int *r_array_size = nullptr, StringName *r_struct_name = nullptr);  	bool _is_operator_assign(Operator p_op) const; -	bool _validate_assign(Node *p_node, const Map<StringName, BuiltInInfo> &p_builtin_types, String *r_message = NULL); -	bool _validate_operator(OperatorNode *p_op, DataType *r_ret_type = NULL); +	bool _validate_assign(Node *p_node, const Map<StringName, BuiltInInfo> &p_builtin_types, String *r_message = nullptr); +	bool _validate_operator(OperatorNode *p_op, DataType *r_ret_type = nullptr);  	struct BuiltinFuncDef {  		enum { MAX_ARGS = 5 }; @@ -860,7 +861,7 @@ private:  	bool _compare_datatypes_in_nodes(Node *a, Node *b) const;  	bool _validate_function_call(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types, OperatorNode *p_func, DataType *r_ret_type, StringName *r_ret_type_str); -	bool _parse_function_arguments(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types, OperatorNode *p_func, int *r_complete_arg = NULL); +	bool _parse_function_arguments(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types, OperatorNode *p_func, int *r_complete_arg = nullptr);  	bool _propagate_function_call_sampler_uniform_settings(StringName p_name, int p_argument, TextureFilter p_filter, TextureRepeat p_repeat);  	bool _propagate_function_call_sampler_builtin_reference(StringName p_name, int p_argument, const StringName &p_builtin);  |