Improve use of Ref.is_null/valid

Use `is_null` over `!is_valid` and vice versa.
This commit is contained in:
A Thousand Ships
2024-08-25 14:15:10 +02:00
committed by AThousandShips
parent 0f95e9f8e6
commit a1846b27ea
177 changed files with 517 additions and 519 deletions

View File

@ -1098,7 +1098,7 @@ bool FontFile::_set(const StringName &p_name, const Variant &p_value) {
Array textures = p_value;
for (int i = 0; i < textures.size(); i++) {
Ref<ImageTexture> tex = textures[i];
ERR_CONTINUE(!tex.is_valid());
ERR_CONTINUE(tex.is_null());
set_texture_image(0, Vector2i(16, 0), i, tex->get_image());
}
} else if (tokens.size() == 1 && tokens[0] == "chars") {