[Modify] Polish it

This commit is contained in:
sta 2019-09-17 19:39:46 +09:00
parent 7a0b0db285
commit 2bde8d4d68

View File

@ -1897,7 +1897,12 @@ namespace WebSocketSharp
/// </param>
public static void Times (this long n, Action<long> action)
{
if (n > 0 && action != null)
if (n <= 0)
return;
if (action == null)
return;
for (long i = 0; i < n; i++)
action (i);
}