diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-09 17:40:07 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-26 16:44:52 +0200 |
commit | 517e9f8aefed8925c1b66932a0d3cb887e99d267 (patch) | |
tree | e62fccf23a2f155d5c5799aebe5b0837e33c6377 /modules/multiplayer/scene_rpc_interface.cpp | |
parent | 36945dad0730ee013547493df60c4c59567b4290 (diff) | |
download | redot-engine-517e9f8aefed8925c1b66932a0d3cb887e99d267.tar.gz |
[Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'modules/multiplayer/scene_rpc_interface.cpp')
-rw-r--r-- | modules/multiplayer/scene_rpc_interface.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/multiplayer/scene_rpc_interface.cpp b/modules/multiplayer/scene_rpc_interface.cpp index da1a044c9d..48e1d13f9c 100644 --- a/modules/multiplayer/scene_rpc_interface.cpp +++ b/modules/multiplayer/scene_rpc_interface.cpp @@ -134,7 +134,7 @@ _FORCE_INLINE_ bool _can_call_mode(Node *p_node, MultiplayerAPI::RPCMode mode, i String SceneRPCInterface::get_rpc_md5(const Object *p_obj) { const Node *node = Object::cast_to<Node>(p_obj); - ERR_FAIL_COND_V(!node, ""); + ERR_FAIL_NULL_V(node, ""); const RPCConfigCache cache = _get_node_config(node); String rpc_list; for (const KeyValue<uint16_t, RPCConfig> &config : cache.configs) { @@ -145,7 +145,7 @@ String SceneRPCInterface::get_rpc_md5(const Object *p_obj) { Node *SceneRPCInterface::_process_get_node(int p_from, const uint8_t *p_packet, uint32_t p_node_target, int p_packet_len) { Node *root_node = SceneTree::get_singleton()->get_root()->get_node(multiplayer->get_root_path()); - ERR_FAIL_COND_V(!root_node, nullptr); + ERR_FAIL_NULL_V(root_node, nullptr); Node *node = nullptr; if (p_node_target & 0x80000000) { @@ -225,7 +225,7 @@ void SceneRPCInterface::process_rpc(int p_from, const uint8_t *p_packet, int p_p } Node *node = _process_get_node(p_from, p_packet, node_target, p_packet_len); - ERR_FAIL_COND_MSG(node == nullptr, "Invalid packet received. Requested node was not found."); + ERR_FAIL_NULL_MSG(node, "Invalid packet received. Requested node was not found."); uint16_t name_id = 0; switch (name_id_compression) { |