1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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

@@ -130,7 +130,7 @@ void Slider::gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventJoypadButton> joypadbutton_event = p_event;
bool is_joypad_event = (joypadmotion_event.is_valid() || joypadbutton_event.is_valid());
if (!mm.is_valid() && !mb.is_valid()) {
if (mm.is_null() && mb.is_null()) {
if (p_event->is_action_pressed("ui_left", true)) {
if (orientation != HORIZONTAL) {
return;