From 6e209ba4f0de113e86fee92cb226ffc7dc289478 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Mon, 15 Jan 2024 17:54:22 -0600 Subject: [PATCH] slight performance increase using forEach loops Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/frag/functions/fnc_dev_clearTraces.sqf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/frag/functions/fnc_dev_clearTraces.sqf b/addons/frag/functions/fnc_dev_clearTraces.sqf index e8ebfb2b14..21a350b8c9 100644 --- a/addons/frag/functions/fnc_dev_clearTraces.sqf +++ b/addons/frag/functions/fnc_dev_clearTraces.sqf @@ -14,9 +14,10 @@ * * Public: No */ -for "_i" from 0 to count GVAR(dev_eventSpheres) - 1 do { - deleteVehicle (GVAR(dev_eventSpheres)#_i); -}; + +{ + deleteVehicle _x; +} forEach GVAR(dev_eventSpheres); GVAR(dev_eventSpheres) = []; GVAR(dev_trackLines) = createHashMap;