From 37386f112bafa9c4e94c342f6d5f04392a5623f7 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Wed, 3 Oct 2018 13:40:37 -0400 Subject: Remove redundant "== true" code If it can be compared to a boolean, it can be evaluated as one in-place. --- core/io/multiplayer_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/io/multiplayer_api.cpp') diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 17b77bc535..d2351c8149 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -578,7 +578,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p network_peer->set_target_peer(E->get()); // To this one specifically. - if (F->get() == true) { + if (F->get()) { // This one confirmed path, so use id. encode_uint32(psc->id, &(packet_cache.write[1])); network_peer->put_packet(packet_cache.ptr(), ofs); -- cgit v1.2.3 From 4f7b33cdcfdcbc11bcc506018dff1b06db3cf3f6 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sat, 6 Oct 2018 16:20:41 -0400 Subject: Remove redundant "== false" code Some of this code has been re-organized. f --- core/io/multiplayer_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/io/multiplayer_api.cpp') diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index d2351c8149..b3f0a76a80 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -416,7 +416,7 @@ bool MultiplayerAPI::_send_confirm_path(NodePath p_path, PathSentCache *psc, int Map::Element *F = psc->confirmed_peers.find(E->get()); - if (!F || F->get() == false) { + if (!F || !F->get()) { // Path was not cached, or was cached but is unconfirmed. if (!F) { // Not cached at all, take note. -- cgit v1.2.3