fix: Range of issues presented by analyzer (#2404)
This commit is contained in:
@@ -532,13 +532,10 @@ namespace Discord.WebSocket
|
||||
Features = model.Features;
|
||||
|
||||
var roles = new ConcurrentDictionary<ulong, SocketRole>(ConcurrentHashSet.DefaultConcurrencyLevel, (int)(model.Roles.Length * 1.05));
|
||||
if (model.Roles != null)
|
||||
for (int i = 0; i < model.Roles.Length; i++)
|
||||
{
|
||||
for (int i = 0; i < model.Roles.Length; i++)
|
||||
{
|
||||
var role = SocketRole.Create(this, state, model.Roles[i]);
|
||||
roles.TryAdd(role.Id, role);
|
||||
}
|
||||
var role = SocketRole.Create(this, state, model.Roles[i]);
|
||||
roles.TryAdd(role.Id, role);
|
||||
}
|
||||
_roles = roles;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user