[Modify] Polish it

This commit is contained in:
sta 2019-09-20 21:54:21 +09:00
parent b03ca4f56e
commit 1229f29122

View File

@ -1949,9 +1949,14 @@ namespace WebSocketSharp
/// </param> /// </param>
public static void Times (this ulong n, Action<ulong> action) public static void Times (this ulong n, Action<ulong> action)
{ {
if (n > 0 && action != null) if (n == 0)
for (ulong i = 0; i < n; i++) return;
action (i);
if (action == null)
return;
for (ulong i = 0; i < n; i++)
action (i);
} }
/// <summary> /// <summary>