Skip to content

Commit

Permalink
perf: remove enumerator allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpach committed Mar 17, 2021
1 parent b903523 commit 502e798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Mirage/Runtime/NetworkServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public void SendToAll<T>(T msg, int channelId = Channel.Reliable)
SendToMany(Players, msg, channelId);
}

public static void SendToMany<T>(IEnumerable<INetworkPlayer> players, T msg, int channelId = Channel.Reliable)
public static void SendToMany<T, L>(L players, T msg, int channelId = Channel.Reliable) where L : IEnumerable<INetworkPlayer>
{
using (PooledNetworkWriter writer = NetworkWriterPool.GetWriter())
{
Expand Down

0 comments on commit 502e798

Please sign in to comment.