[Modify] Polish it
This commit is contained in:
parent
7e86a8d773
commit
cd890d2eb4
@ -1923,9 +1923,14 @@ namespace WebSocketSharp
|
|||||||
/// </param>
|
/// </param>
|
||||||
public static void Times (this uint n, Action<uint> action)
|
public static void Times (this uint n, Action<uint> action)
|
||||||
{
|
{
|
||||||
if (n > 0 && action != null)
|
if (n == 0)
|
||||||
for (uint i = 0; i < n; i++)
|
return;
|
||||||
action (i);
|
|
||||||
|
if (action == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (uint i = 0; i < n; i++)
|
||||||
|
action (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user