mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +00:00
Use range iterators for RBSet in most cases
This commit is contained in:
parent
71c40ff4da
commit
900c676b02
84 changed files with 782 additions and 782 deletions
|
|
@ -494,8 +494,8 @@ Vector<int> MultiplayerAPI::get_peer_ids() const {
|
|||
ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), Vector<int>(), "No multiplayer peer is assigned. Assume no peers are connected.");
|
||||
|
||||
Vector<int> ret;
|
||||
for (RBSet<int>::Element *E = connected_peers.front(); E; E = E->next()) {
|
||||
ret.push_back(E->get());
|
||||
for (const int &E : connected_peers) {
|
||||
ret.push_back(E);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue