mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
This commit is contained in:
parent
0f95e9f8e6
commit
a1846b27ea
177 changed files with 517 additions and 519 deletions
|
@ -867,7 +867,7 @@ void TextShaderEditor::_check_for_external_edit() {
|
|||
|
||||
void TextShaderEditor::_reload_shader_from_disk() {
|
||||
Ref<Shader> rel_shader = ResourceLoader::load(shader->get_path(), shader->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
|
||||
ERR_FAIL_COND(!rel_shader.is_valid());
|
||||
ERR_FAIL_COND(rel_shader.is_null());
|
||||
|
||||
code_editor->set_block_shader_changed(true);
|
||||
shader->set_code(rel_shader->get_code());
|
||||
|
@ -878,7 +878,7 @@ void TextShaderEditor::_reload_shader_from_disk() {
|
|||
|
||||
void TextShaderEditor::_reload_shader_include_from_disk() {
|
||||
Ref<ShaderInclude> rel_shader_include = ResourceLoader::load(shader_inc->get_path(), shader_inc->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
|
||||
ERR_FAIL_COND(!rel_shader_include.is_valid());
|
||||
ERR_FAIL_COND(rel_shader_include.is_null());
|
||||
|
||||
code_editor->set_block_shader_changed(true);
|
||||
shader_inc->set_code(rel_shader_include->get_code());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue