mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +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
|
|
@ -298,7 +298,7 @@ void GraphNode::draw_port(int p_slot_index, Point2i p_pos, bool p_left, const Co
|
|||
Ref<Texture2D> port_icon = p_left ? slot.custom_port_icon_left : slot.custom_port_icon_right;
|
||||
|
||||
Point2 icon_offset;
|
||||
if (!port_icon.is_valid()) {
|
||||
if (port_icon.is_null()) {
|
||||
port_icon = theme_cache.port;
|
||||
}
|
||||
|
||||
|
|
@ -384,7 +384,7 @@ void GraphNode::set_slot(int p_slot_index, bool p_enable_left, int p_type_left,
|
|||
|
||||
if (!p_enable_left && p_type_left == 0 && p_color_left == Color(1, 1, 1, 1) &&
|
||||
!p_enable_right && p_type_right == 0 && p_color_right == Color(1, 1, 1, 1) &&
|
||||
!p_custom_left.is_valid() && !p_custom_right.is_valid()) {
|
||||
p_custom_left.is_null() && p_custom_right.is_null()) {
|
||||
slot_table.erase(p_slot_index);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue