Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge commit godotengine/godot@75ce426 #910

Merged
merged 63 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
f41cd8a
Make Goto line a Popup and allow column input
kitbdev Feb 22, 2024
ec650a2
[Core,Drivers] Improve use of `Ref.is_null/valid`
AThousandShips Aug 25, 2024
a864bcc
Fix button state of grid and highlight layer in tile map layer editor
Giganzo Nov 17, 2024
dd7325d
remove solid boxes voxelGI and ReflectionProbe
lander-vr Dec 13, 2024
0153cb8
Fix incorrect MODIFIER_MASK value
Yelloween10 Oct 22, 2024
0bc2c26
Fix blurred content of embedded windows
scgm0 Oct 2, 2024
9a96393
Add warped panning to every ViewPanner instance
KoBeWi Jun 3, 2024
30801af
Properly transform light rect and occluder rect to perform light2d cu…
clayjohn Dec 20, 2024
ed83e5e
Fix shader compilation errors when using MSDF fonts with Label3D nodes
clayjohn Dec 21, 2024
072ff85
[.NET] Use collection expressions in docs
raulsntos Dec 21, 2024
0e32f3b
Make `LocalVector` -> `Vector` automatic conversion safe for non-triv…
Ivorforce Dec 21, 2024
65bb722
OpenXR: Make sure wedge on DPad modifier is expressed in degrees.
BastiaanOlij Dec 20, 2024
4727f07
Jolt: Update to commit f094082aa, adding RISC-V, PPC64 and LoongArch …
akien-mga Dec 21, 2024
b8dfe2c
Editor: Restore old `Ctrl+Click` behavior
dalexeev Dec 21, 2024
23ea3ab
Improve NavigationObstacle2D debug visuals
smix8 Dec 21, 2024
25cd923
Destruct `CowData` more graciously by avoiding accidentally exposing …
Ivorforce Dec 21, 2024
a676465
Remove trailing double quote from link in GLTFState class documentation
spoxii Dec 21, 2024
ed81a17
Improve '&&' and '&' syntax highlighting by altering StringName highl…
Wierdox Dec 18, 2024
88e6997
Merge pull request #97745 from scgm0/Fix-blurred-content-of-embedded-…
akien-mga Dec 21, 2024
6f2f909
Merge pull request #100370 from lander-vr/remove-boxes-refprobes-voxelgi
akien-mga Dec 21, 2024
57d1385
Merge pull request #100561 from akien-mga/jolt-disable-rv64-ppc64
akien-mga Dec 21, 2024
4b33387
Merge pull request #100633 from BastiaanOlij/fix_openxr_dpad_angle_de…
akien-mga Dec 21, 2024
f7d6924
Merge pull request #100677 from clayjohn/light2d-cull
akien-mga Dec 21, 2024
9f42d1c
Merge pull request #100678 from clayjohn/label3d-msdf
akien-mga Dec 21, 2024
31c0777
Merge pull request #100683 from Ivorforce/localvector-vector-conversi…
akien-mga Dec 21, 2024
0454122
Merge pull request #100711 from spoxii/patch/gltfstate_link_typo
akien-mga Dec 21, 2024
d51615b
Change navigation map synchronization to an async process
smix8 Dec 15, 2024
0d182cf
Marked `EditorInterface.popup_create_dialog()` as experimental in the…
Lazy-Rabbit-2001 Dec 22, 2024
216b330
Merge pull request #100497 from smix8/navmap_async_build
akien-mga Dec 22, 2024
143e10e
Remove unused editor setting `editors/grid_map/editor_side`
spoxii Dec 21, 2024
8f03548
fix crash when using one-click deploy
beicause Dec 22, 2024
9f3067e
Fix Window size changes ignored on Android
syntaxerror247 Dec 22, 2024
d380cb1
[Android] Fix path to AAB in copyAndRenameBinary task
raulsntos Dec 22, 2024
df01daf
EditorResourcePicker: Replace options to load file with button for Qu…
stijn-h Oct 5, 2024
96c6dec
Android Code Cleanup: Rename constants to uppercase
syntaxerror247 Dec 23, 2024
73d85f4
Remove unused headers in scene.
YYF233333 Dec 20, 2024
f241c1f
Remove unused header in editor.
YYF233333 Dec 20, 2024
33817b1
Remove unused header in drivers and modules.
YYF233333 Dec 21, 2024
2f9a663
Convert Vector to LocalVector in animation system.
YYF233333 Oct 1, 2024
1c339f1
Merge pull request #100739 from YYF233333/iwyu5
Repiteo Dec 23, 2024
0c80b47
Merge pull request #97687 from YYF233333/animation
Repiteo Dec 23, 2024
3c304ab
Merge pull request #96076 from AThousandShips/improve_null_check_core…
Repiteo Dec 23, 2024
3f74cc2
Merge pull request #97860 from stijn-h/qo-button
Repiteo Dec 23, 2024
64a2c58
Merge pull request #100760 from syntaxerror247/cleanup
Repiteo Dec 23, 2024
e109ac2
Merge pull request #100708 from smix8/navobstacle2d_debug
Repiteo Dec 23, 2024
ff706b8
Merge pull request #100756 from raulsntos/android/fix-aab-path
Repiteo Dec 23, 2024
a7fb67b
Merge pull request #100746 from syntaxerror247/size-regression
Repiteo Dec 23, 2024
b77fde8
Merge pull request #100731 from Lazy-Rabbit-2001/popup_create_dialog_…
Repiteo Dec 23, 2024
01a7c81
Merge pull request #100738 from beicause/fix-crash-one-click-deploy
Repiteo Dec 23, 2024
98c5267
Merge pull request #91388 from kitbdev/fix-goto-line
Repiteo Dec 23, 2024
e041356
Merge pull request #99357 from Giganzo/tile-map-grid-button
Repiteo Dec 23, 2024
53a7e08
Merge pull request #100702 from spoxii/patch/unused_gridmap_editor_side
Repiteo Dec 23, 2024
7b42fb9
Merge pull request #100685 from raulsntos/dotnet/collection-expressions
Repiteo Dec 23, 2024
98c3138
Merge pull request #92717 from KoBeWi/twisted_frying_pan
Repiteo Dec 23, 2024
b97c8b3
Merge pull request #98441 from Yelloween10/fix-modifier-mask
Repiteo Dec 23, 2024
08d4dd7
Merge pull request #100694 from Ivorforce/cowdata-destruct-graciously
Repiteo Dec 23, 2024
3df8eb5
Merge pull request #100707 from dalexeev/editor-restore-old-ctrl-click
Repiteo Dec 23, 2024
0f95e9f
Merge pull request #100575 from Wierdox/improve_syntax_highlighting_f…
Repiteo Dec 23, 2024
c694081
Patch navigation map async synchronization
smix8 Dec 26, 2024
99a8ab7
Merge pull request #100823 from smix8/patch_async_mapsync
akien-mga Dec 26, 2024
ff83fdc
Pre-commit: Fix applying ruff to SCsub files
akien-mga Dec 28, 2024
75ce426
Merge pull request #100870 from akien-mga/ci-fix-ruff-format
akien-mga Dec 28, 2024
1609981
Merge commit godotengine/godot@75ce4266c4774b30ed5df67e6c43365418fcce5f
Spartan322 Dec 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ repos:
stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy`

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
files: (\.py|SConstruct|SCsub)$
types_or: [text]
- id: ruff-format
files: (\.py|SConstruct|SCsub)$
types_or: [text]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
Expand Down Expand Up @@ -204,7 +208,7 @@ repos:
language: python
entry: python misc/scripts/header_guards.py
files: \.(h|hpp|hh|hxx)$
exclude: ^.*/(thread|platform_config|platform_gl)\.h$
exclude: ^.*/(dummy|thread|platform_config|platform_gl)\.h$

- id: file-format
name: file-format
Expand Down
2 changes: 1 addition & 1 deletion core/input/input_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ List<StringName> InputMap::get_actions() const {
}

List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool p_exact_match, bool *r_pressed, float *r_strength, float *r_raw_strength, int *r_event_index) const {
ERR_FAIL_COND_V(!p_event.is_valid(), nullptr);
ERR_FAIL_COND_V(p_event.is_null(), nullptr);

int i = 0;
for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) {
Expand Down
4 changes: 2 additions & 2 deletions core/io/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3994,7 +3994,7 @@ Error Image::load_svg_from_buffer(const Vector<uint8_t> &p_array, float scale) {
ERR_FAIL_COND_V(buffer_size == 0, ERR_INVALID_PARAMETER);

Ref<Image> image = _svg_scalable_mem_loader_func(p_array.ptr(), buffer_size, scale);
ERR_FAIL_COND_V(!image.is_valid(), ERR_PARSE_ERROR);
ERR_FAIL_COND_V(image.is_null(), ERR_PARSE_ERROR);

copy_internals_from(image);

Expand Down Expand Up @@ -4061,7 +4061,7 @@ Error Image::_load_from_buffer(const Vector<uint8_t> &p_array, ImageMemLoadFunc
const uint8_t *r = p_array.ptr();

Ref<Image> image = p_loader(r, buffer_size);
ERR_FAIL_COND_V(!image.is_valid(), ERR_PARSE_ERROR);
ERR_FAIL_COND_V(image.is_null(), ERR_PARSE_ERROR);

copy_internals_from(image);

Expand Down
14 changes: 7 additions & 7 deletions core/io/packet_peer_udp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void PacketPeerUDP::set_broadcast_enabled(bool p_enabled) {

Error PacketPeerUDP::join_multicast_group(IPAddress p_multi_address, const String &p_if_name) {
ERR_FAIL_COND_V(udp_server, ERR_LOCKED);
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(!p_multi_address.is_valid(), ERR_INVALID_PARAMETER);

if (!_sock->is_open()) {
Expand All @@ -64,7 +64,7 @@ Error PacketPeerUDP::join_multicast_group(IPAddress p_multi_address, const Strin

Error PacketPeerUDP::leave_multicast_group(IPAddress p_multi_address, const String &p_if_name) {
ERR_FAIL_COND_V(udp_server, ERR_LOCKED);
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(!_sock->is_open(), ERR_UNCONFIGURED);
return _sock->leave_multicast_group(p_multi_address, p_if_name);
}
Expand Down Expand Up @@ -139,7 +139,7 @@ Error PacketPeerUDP::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
}

Error PacketPeerUDP::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(!peer_addr.is_valid(), ERR_UNCONFIGURED);

Error err;
Expand Down Expand Up @@ -180,7 +180,7 @@ int PacketPeerUDP::get_max_packet_size() const {
}

Error PacketPeerUDP::bind(int p_port, const IPAddress &p_bind_address, int p_recv_buffer_size) {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock->is_open(), ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(p_port < 0 || p_port > 65535, ERR_INVALID_PARAMETER, "The local port number must be between 0 and 65535 (inclusive).");
Expand Down Expand Up @@ -229,7 +229,7 @@ void PacketPeerUDP::disconnect_shared_socket() {

Error PacketPeerUDP::connect_to_host(const IPAddress &p_host, int p_port) {
ERR_FAIL_COND_V(udp_server, ERR_LOCKED);
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(!p_host.is_valid(), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(p_port < 1 || p_port > 65535, ERR_INVALID_PARAMETER, "The remote port number must be between 1 and 65535 (inclusive).");

Expand Down Expand Up @@ -280,12 +280,12 @@ void PacketPeerUDP::close() {
}

Error PacketPeerUDP::wait() {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
return _sock->poll(NetSocket::POLL_TYPE_IN, -1);
}

Error PacketPeerUDP::_poll() {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);

if (!_sock->is_open()) {
return FAILED;
Expand Down
4 changes: 2 additions & 2 deletions core/io/plist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ bool PList::load_string(const String &p_string, String &r_err_out) {
stack.push_back(dict);
} else {
// Add root node.
if (!root.is_null()) {
if (root.is_valid()) {
r_err_out = "Root node already set.";
return false;
}
Expand Down Expand Up @@ -745,7 +745,7 @@ bool PList::load_string(const String &p_string, String &r_err_out) {
stack.push_back(arr);
} else {
// Add root node.
if (!root.is_null()) {
if (root.is_valid()) {
r_err_out = "Root node already set.";
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion core/io/remote_filesystem_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

Vector<RemoteFilesystemClient::FileCache> RemoteFilesystemClient::_load_cache_file() {
Ref<FileAccess> fa = FileAccess::open(cache_path.path_join(FILES_CACHE_FILE), FileAccess::READ);
if (!fa.is_valid()) {
if (fa.is_null()) {
return Vector<FileCache>(); // No cache, return empty
}

Expand Down
6 changes: 3 additions & 3 deletions core/io/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ void Resource::reload_from_file() {

Ref<Resource> s = ResourceLoader::load(ResourceLoader::path_remap(path), get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);

if (!s.is_valid()) {
if (s.is_null()) {
return;
}

Expand Down Expand Up @@ -653,7 +653,7 @@ Ref<Resource> ResourceCache::get_ref(const String &p_path) {
ref = Ref<Resource>(*res);
}

if (res && !ref.is_valid()) {
if (res && ref.is_null()) {
// This resource is in the process of being deleted, ignore its existence
(*res)->path_cache = String();
resources.erase(p_path);
Expand All @@ -672,7 +672,7 @@ void ResourceCache::get_cached_resources(List<Ref<Resource>> *p_resources) {
for (KeyValue<String, Resource *> &E : resources) {
Ref<Resource> ref = Ref<Resource>(E.value);

if (!ref.is_valid()) {
if (ref.is_null()) {
// This resource is in the process of being deleted, ignore its existence
E.value->path_cache = String();
to_remove.push_back(E.key);
Expand Down
4 changes: 2 additions & 2 deletions core/io/resource_format_binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ Error ResourceLoaderBinary::load() {

external_resources.write[i].path = path; //remap happens here, not on load because on load it can actually be used for filesystem dock resource remap
external_resources.write[i].load_token = ResourceLoader::_load_start(path, external_resources[i].type, use_sub_threads ? ResourceLoader::LOAD_THREAD_DISTRIBUTE : ResourceLoader::LOAD_THREAD_FROM_CURRENT, cache_mode_for_external);
if (!external_resources[i].load_token.is_valid()) {
if (external_resources[i].load_token.is_null()) {
if (!ResourceLoader::get_abort_on_missing_resources()) {
ResourceLoader::notify_dependency_error(local_path, path, external_resources[i].type);
} else {
Expand Down Expand Up @@ -1389,7 +1389,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons

ERR_FAIL_COND_V(err != ERR_FILE_EOF, ERR_FILE_CORRUPT);
Ref<Resource> res = loader.get_resource();
ERR_FAIL_COND_V(!res.is_valid(), ERR_FILE_CORRUPT);
ERR_FAIL_COND_V(res.is_null(), ERR_FILE_CORRUPT);

return ResourceFormatSaverBinary::singleton->save(res, p_path);
}
Expand Down
4 changes: 2 additions & 2 deletions core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ Ref<Resource> ResourceLoader::load(const String &p_path, const String &p_type_hi
thread_mode = LOAD_THREAD_SPAWN_SINGLE;
}
Ref<LoadToken> load_token = _load_start(p_path, p_type_hint, thread_mode, p_cache_mode);
if (!load_token.is_valid()) {
if (load_token.is_null()) {
if (r_error) {
*r_error = FAILED;
}
Expand Down Expand Up @@ -947,7 +947,7 @@ Ref<Resource> ResourceLoader::ensure_resource_ref_override_for_outer_load(const
Object *obj = ClassDB::instantiate(p_res_type);
ERR_FAIL_NULL_V(obj, Ref<Resource>());
Ref<Resource> res(obj);
if (!res.is_valid()) {
if (res.is_null()) {
memdelete(obj);
ERR_FAIL_V(Ref<Resource>());
}
Expand Down
10 changes: 5 additions & 5 deletions core/io/stream_peer_tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void StreamPeerTCP::accept_socket(Ref<NetSocket> p_sock, IPAddress p_host, uint1
}

Error StreamPeerTCP::bind(int p_port, const IPAddress &p_host) {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock->is_open(), ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V_MSG(p_port < 0 || p_port > 65535, ERR_INVALID_PARAMETER, "The local port number must be between 0 and 65535 (inclusive).");

Expand All @@ -108,7 +108,7 @@ Error StreamPeerTCP::bind(int p_port, const IPAddress &p_host) {
}

Error StreamPeerTCP::connect_to_host(const IPAddress &p_host, int p_port) {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(status != STATUS_NONE, ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V(!p_host.is_valid(), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(p_port < 1 || p_port > 65535, ERR_INVALID_PARAMETER, "The remote port number must be between 1 and 65535 (inclusive).");
Expand Down Expand Up @@ -142,7 +142,7 @@ Error StreamPeerTCP::connect_to_host(const IPAddress &p_host, int p_port) {
}

Error StreamPeerTCP::write(const uint8_t *p_data, int p_bytes, int &r_sent, bool p_block) {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);

if (status != STATUS_CONNECTED) {
return FAILED;
Expand Down Expand Up @@ -240,7 +240,7 @@ Error StreamPeerTCP::read(uint8_t *p_buffer, int p_bytes, int &r_received, bool
}

void StreamPeerTCP::set_no_delay(bool p_enabled) {
ERR_FAIL_COND(!_sock.is_valid() || !_sock->is_open());
ERR_FAIL_COND(_sock.is_null() || !_sock->is_open());
_sock->set_tcp_no_delay_enabled(p_enabled);
}

Expand Down Expand Up @@ -283,7 +283,7 @@ Error StreamPeerTCP::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_rec
}

int StreamPeerTCP::get_available_bytes() const {
ERR_FAIL_COND_V(!_sock.is_valid(), -1);
ERR_FAIL_COND_V(_sock.is_null(), -1);
return _sock->get_available_bytes();
}

Expand Down
8 changes: 4 additions & 4 deletions core/io/tcp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void TCPServer::_bind_methods() {
}

Error TCPServer::listen(uint16_t p_port, const IPAddress &p_bind_address) {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock->is_open(), ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER);

Expand Down Expand Up @@ -84,13 +84,13 @@ int TCPServer::get_local_port() const {
}

bool TCPServer::is_listening() const {
ERR_FAIL_COND_V(!_sock.is_valid(), false);
ERR_FAIL_COND_V(_sock.is_null(), false);

return _sock->is_open();
}

bool TCPServer::is_connection_available() const {
ERR_FAIL_COND_V(!_sock.is_valid(), false);
ERR_FAIL_COND_V(_sock.is_null(), false);

if (!_sock->is_open()) {
return false;
Expand All @@ -110,7 +110,7 @@ Ref<StreamPeerTCP> TCPServer::take_connection() {
IPAddress ip;
uint16_t port = 0;
ns = _sock->accept(ip, port);
if (!ns.is_valid()) {
if (ns.is_null()) {
return conn;
}

Expand Down
8 changes: 4 additions & 4 deletions core/io/udp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void UDPServer::_bind_methods() {
}

Error UDPServer::poll() {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
if (!_sock->is_open()) {
return ERR_UNCONFIGURED;
}
Expand Down Expand Up @@ -90,7 +90,7 @@ Error UDPServer::poll() {
}

Error UDPServer::listen(uint16_t p_port, const IPAddress &p_bind_address) {
ERR_FAIL_COND_V(!_sock.is_valid(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock.is_null(), ERR_UNAVAILABLE);
ERR_FAIL_COND_V(_sock->is_open(), ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER);

Expand Down Expand Up @@ -125,13 +125,13 @@ int UDPServer::get_local_port() const {
}

bool UDPServer::is_listening() const {
ERR_FAIL_COND_V(!_sock.is_valid(), false);
ERR_FAIL_COND_V(_sock.is_null(), false);

return _sock->is_open();
}

bool UDPServer::is_connection_available() const {
ERR_FAIL_COND_V(!_sock.is_valid(), false);
ERR_FAIL_COND_V(_sock.is_null(), false);

if (!_sock->is_open()) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions core/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ void Object::set_script(const Variant &p_script) {
script_instance = nullptr;
}

if (!s.is_null()) {
if (s.is_valid()) {
if (s->can_instantiate()) {
OBJ_DEBUG_LOCK
script_instance = s->instance_create(this);
Expand Down Expand Up @@ -1580,7 +1580,7 @@ void Object::_clear_internal_resource_paths(const Variant &p_var) {
switch (p_var.get_type()) {
case Variant::OBJECT: {
Ref<Resource> r = p_var;
if (!r.is_valid()) {
if (r.is_null()) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion core/os/keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ enum class Key {

enum class KeyModifierMask {
CODE_MASK = ((1 << 23) - 1), ///< Apply this mask to any keycode to remove modifiers.
MODIFIER_MASK = (0x7F << 22), ///< Apply this mask to isolate modifiers.
MODIFIER_MASK = (0x7F << 24), ///< Apply this mask to isolate modifiers.
//RESERVED = (1 << 23),
CMD_OR_CTRL = (1 << 24),
SHIFT = (1 << 25),
Expand Down
Loading