summaryrefslogtreecommitdiffstats
path: root/modules/enet/enet_connection.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-08-08 00:52:20 +0200
committerkobewi <kobewi4e@gmail.com>2022-08-24 12:53:36 +0200
commitf7f4873ed08d6b465c8108f7ce0c1cb76f9caf2f (patch)
treef5644c01ab66109f8f342d784c3a38240aa295ef /modules/enet/enet_connection.cpp
parent0626ce50cfd35d1eb81c6c9627f8540be9636b4b (diff)
downloadredot-engine-f7f4873ed08d6b465c8108f7ce0c1cb76f9caf2f.tar.gz
Replace Array return types with TypedArray 3
Diffstat (limited to 'modules/enet/enet_connection.cpp')
-rw-r--r--modules/enet/enet_connection.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/enet/enet_connection.cpp b/modules/enet/enet_connection.cpp
index 629974d7c7..6a4bbecf6a 100644
--- a/modules/enet/enet_connection.cpp
+++ b/modules/enet/enet_connection.cpp
@@ -34,6 +34,7 @@
#include "core/io/compression.h"
#include "core/io/ip.h"
+#include "core/variant/typed_array.h"
void ENetConnection::broadcast(enet_uint8 p_channel, ENetPacket *p_packet) {
ERR_FAIL_COND_MSG(!host, "The ENetConnection instance isn't currently active.");
@@ -263,9 +264,9 @@ void ENetConnection::get_peers(List<Ref<ENetPacketPeer>> &r_peers) {
}
}
-Array ENetConnection::_get_peers() {
+TypedArray<ENetPacketPeer> ENetConnection::_get_peers() {
ERR_FAIL_COND_V_MSG(!host, Array(), "The ENetConnection instance isn't currently active.");
- Array out;
+ TypedArray<ENetPacketPeer> out;
for (const Ref<ENetPacketPeer> &I : peers) {
out.push_back(I);
}