mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Skip copying values constructed immediately before returning
This commit is contained in:
parent
9283328fe7
commit
754d49ac81
14 changed files with 35 additions and 60 deletions
|
|
@ -265,7 +265,7 @@ void ENetConnection::get_peers(List<Ref<ENetPacketPeer>> &r_peers) {
|
|||
}
|
||||
|
||||
TypedArray<ENetPacketPeer> ENetConnection::_get_peers() {
|
||||
ERR_FAIL_NULL_V_MSG(host, Array(), "The ENetConnection instance isn't currently active.");
|
||||
ERR_FAIL_NULL_V_MSG(host, TypedArray<ENetPacketPeer>(), "The ENetConnection instance isn't currently active.");
|
||||
TypedArray<ENetPacketPeer> out;
|
||||
for (const Ref<ENetPacketPeer> &I : peers) {
|
||||
out.push_back(I);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue