From 072e7f9a823de1a8f95b530d48636e186a86add5 Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 15 Sep 2019 22:01:23 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Ext.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 9206f32a..b4586bc6 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -1871,9 +1871,14 @@ namespace WebSocketSharp /// public static void Times (this int n, Action action) { - if (n > 0 && action != null) - for (int i = 0; i < n; i++) - action (i); + if (n <= 0) + return; + + if (action == null) + return; + + for (int i = 0; i < n; i++) + action (i); } ///