diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2024-08-23 14:30:51 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2024-08-27 11:34:08 +0800 |
commit | 8bf4ecc026029eb7b16645c11930b73cf642dbfa (patch) | |
tree | f681d221372ac3ae1558941b016b4af47ff7ebe3 /scene/resources/visual_shader.cpp | |
parent | db76de5de8a415b29be4c7dd84b99bd0fe260822 (diff) | |
download | redot-engine-8bf4ecc026029eb7b16645c11930b73cf642dbfa.tar.gz |
Add `String.is_valid_unicode_identifier()`
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
Diffstat (limited to 'scene/resources/visual_shader.cpp')
-rw-r--r-- | scene/resources/visual_shader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index a144c5ba83..fcdf22c9d7 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -833,7 +833,7 @@ VisualShader::Type VisualShader::get_shader_type() const { } void VisualShader::add_varying(const String &p_name, VaryingMode p_mode, VaryingType p_type) { - ERR_FAIL_COND(!p_name.is_valid_identifier()); + ERR_FAIL_COND(!p_name.is_valid_ascii_identifier()); ERR_FAIL_INDEX((int)p_mode, (int)VARYING_MODE_MAX); ERR_FAIL_INDEX((int)p_type, (int)VARYING_TYPE_MAX); ERR_FAIL_COND(varyings.has(p_name)); @@ -4571,7 +4571,7 @@ String VisualShaderNodeGroupBase::get_outputs() const { } bool VisualShaderNodeGroupBase::is_valid_port_name(const String &p_name) const { - if (!p_name.is_valid_identifier()) { + if (!p_name.is_valid_ascii_identifier()) { return false; } for (int i = 0; i < get_input_port_count(); i++) { |